報錯日誌如下:
2019-08-16t06:10:30.156632z 0 [error] [my-010338] [server] can't find error-message file '/soft/src/mysql/mysql8/share/mysql-8.0/errmsg.sys'. check error-message file location and 'lc-messages-dir' configuration directive.
配置檔案my.cnf如下:
[client]
port = 3303
socket = /soft/src/mysql/mysql8/sock/mysqlx.sock
max_allowed_packet = 48m
[mysql]
no-auto-rehash
socket = /soft/src/mysql/mysql8/sock/mysqlx.sock
[mysqldump]
quick
max_allowed_packet = 64m
[isamchk]
key_buffer = 128m
sort_buffer_size = 128m
read_buffer = 2m
write_buffer = 2m
[myisamchk]
key_buffer = 128m
sort_buffer_size = 128m
read_buffer = 2m
write_buffer = 2m
[mysqlhotcopy]
interactive-timeout=1800
[mysqld_safe]
open-files-limit = 8192
[mysqld]
server-id = 50
port = 3303
basedir = /soft/src/mysql/mysql8
datadir = /soft/src/mysql/mysql8/data
datadir = /soft/src/mysql/mysql8/data
socket = /soft/src/mysql/mysql8/sock/mysqlx.sock
pid-file = /soft/src/mysql/mysql8/mysql.pid
log-error = /soft/src/mysql/mysql8/logs/mysql.err
#default-character-set=utf8
character-set-server = utf8
back_log = 512
wait_timeout=1800
lock_wait_timeout=1800
interactive_timeout=1800
max_connections = 2048
connect_timeout = 20
max_connect_errors = 128
open_files_limit = 8192
table_open_cache = 2048
max_allowed_packet = 16m
read_buffer_size = 32m
sort_buffer_size = 32m
read_rnd_buffer_size = 16m
join_buffer_size = 32m
key_buffer_size = 1024m
bulk_insert_buffer_size = 64m
thread_cache_size = 8
thread_stack = 240k
ft_min_word_len = 4
default-storage-engine = innodb
transaction_isolation = repeatable-read
tmp_table_size = 256m
max_heap_table_size = 64m
log-bin=/soft/src/mysql/mysql8/logs/mysql-bin
binlog_format=mixed
binlog_cache_size = 1m
expire_logs_days = 15
slow_query_log = on
slow_launch_time = 2
slow_query_log_file = /soft/src/mysql/mysql8/logs/slow.log
long_query_time = 1
myisam_sort_buffer_size = 64m
myisam_max_sort_file_size = 2g
myisam_repair_threads = 1
myisam-recover-options = backup,force
innodb_data_file_path = ibdata1:10m:autoextend
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_thread_concurrency = 16
innodb_flush_log_at_trx_commit = 1
#memlock
innodb_buffer_pool_instances=4
innodb_buffer_pool_size = 1g
innodb_log_file_size = 512m
innodb_lock_wait_timeout = 60
innodb_flush_log_at_trx_commit = 0
### small swap / io
innodb_flush_method = o_direct
innodb_log_buffer_size = 8m
innodb_log_files_in_group = 3
innodb_max_dirty_pages_pct = 90
innodb_file_per_table = 1
innodb_open_files = 2048
skip-external-locking
secure-file-priv=/soft/src/mysql/mysql8/tmp
log_queries_not_using_indexes = 0
解決:
[root@localhost share]# pwd
/usr/share
[root@localhost share]# cp -r mysql-8.0/ /soft/src/mysql/mysql8/share/
[root@localhost share]# systemctl restart mysqld
另一種方法:
直接修改配置檔案my.cnf,在mysqld下面加入一條
lc-messages-dir = /usr/share/mysql-8.0/
然後報錯就沒了~不知道對不對坐等大神
坐等~~等~
mysql8 0 安裝時密碼忘記處理
在安裝完成後,配置mysql時,如果之前安裝過mysql,這裡要求直接輸入原密碼 而不是那種新密碼和確認密碼的 本文介紹如果處理忘記密碼的問題 兩種方法 1 方法1 mysqld basedir mysql目錄 datadir data目錄 2 cmd操作 以管理員身份開啟cmd 切換到mysql的...
MySQL8 0安裝時踩的坑
今早一起來,mysql workbench打不開,mysql也無法正常使用,都說重灌解決百分百的問題,我就直接卸了重灌了。解除安裝mysql需要解除安裝乾淨,我除了在360的軟體中心刪除外,還刪除了c盤programdata裡的mysql資料夾,programdata預設隱藏,如圖示勾選隱藏的專案可...
MySQL8 0安裝教程
環境 mysql8.0.20,windows10專業版 2.配置環境變數,在path中新增值為 c program files x86 mysql mysql 8.0.20 winx64 bin 3.開啟cmd,輸入 mysqld initialize insecure user mysql 然後輸...