-
修改环境中的数据库配置文件(解决编码的异常)
[mysqld] datadir=/var/lib/mysql
default-storage-engine=INNODB lower_case_table_names=1 table_open_cache=128 max_connections=2000 max_connect_errors=6000 innodb_file_per_table=1 innodb_buffer_pool_size=1G max_allowed_packet=64M transaction_isolation=READ-COMMITTED innodb_flush_method=O_DIRECT innodb_lock_wait_timeout=1800 innodb_flush_log_at_trx_commit=0 sync_binlog=0 group_concat_max_len=1024000
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
skip-name-resolve
[mysql.server] default-character-set=utf8mb4
[mysqld] character_set_server=utf8mb4 collation-server=utf8mb4_general_ci
[mysql] default-character-set=utf8mb4
[client] default-character-set=utf8mb4
2.修改 dataease.properties 数据库连接配置(解决 DataEase 启动异常:SQLNonTransientConnectionException: Public Key Retrieval is not allowed)
cd /opt/dataease/conf
vim dataease.properties
`url加上:allowPublicKeyRetrieval=true
`
3.v1.15 之后的版本还需要修改 dataease 数据库中的函数
将带有 CHARSET 的函数设置为 CHARSET utf8mb4 COLLATE utf8mb4_general_ci,如下图所示,修改所有函数