1. MySQL5.7.21启动时报错:
[ERROR] Can't find error-message file '/data/mysql/3307/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
2. 登录MySQL查看系统全局参数:
mysql> show global variables like '%messages%';
+-----------------+-----------------------+
| Variable_name | Value |
+-----------------+-----------------------+
| lc_messages | en_US |
| lc_messages_dir | /data/mysql/share/ |
+-----------------+-----------------------+
3. 然后发现lc_messages_dir的目录在/data/mysql/share/, 然后到系统层面查看
[root@Master mysql]# ll
total 4
drwxr-xr-x 6 mysql mysql 4096 Aug 31 11:47 3307
4. 从系统相应路径下并没有发现share目录,然后还是在系统层面找errmsg.sys文件
[root@Master mysql]# find / -name errmsg.sys
/opt/mysql3307/share/serbian/errmsg.sys
/opt/mysql3307/share/dutch/errmsg.sys
/opt/mysql3307/share/russian/errmsg.sys
/opt/mysql3307/share/swedish/errmsg.sys
/opt/mysql3307/share/portuguese/errmsg.sys
/opt/mysql3307/share/english/errmsg.sys
/opt/mysql3307/share/italian/errmsg.sys
/opt/mysql3307/share/czech/errmsg.sys
/opt/mysql3307/share/ukrainian/errmsg.sys
/opt/mysql3307/share/estonian/errmsg.sys
/opt/mysql3307/share/norwegian-ny/errmsg.sys
/opt/mysql3307/share/korean/errmsg.sys
/opt/mysql3307/share/french/errmsg.sys
/opt/mysql3307/share/spanish/errmsg.sys
/opt/mysql3307/share/hungarian/errmsg.sys
/opt/mysql3307/share/greek/errmsg.sys
/opt/mysql3307/share/german/errmsg.sys
/opt/mysql3307/share/polish/errmsg.sys
/opt/mysql3307/share/japanese/errmsg.sys
/opt/mysql3307/share/romanian/errmsg.sys
/opt/mysql3307/share/norwegian/errmsg.sys
/opt/mysql3307/share/bulgarian/errmsg.sys
/opt/mysql3307/share/slovak/errmsg.sys
/opt/mysql3307/share/danish/errmsg.sys
5. 查询了下mygtid.cnf当中并没有设定此参数,然后就把lc-messages-dir加入到mygtid.cnf当中
[root@Master mysql]# cat /data/mysql/3307/conf/mygtid.cnf
[mysqld]
##########basic settings###################
port = 3307
bind-address = 0.0.0.0
basedir = /data/mysql/3307
datadir = /data/mysql/3307/data
socket = /data/mysql/3307/mysql.sock
lc-messages = en_US
lc-messages-dir = /opt/mysql3307/share
6. 关闭MySQL实例(因为lc-messages-dir系统参数只能在实例启动的时候修改;lc-messages是动态参数可在线调整)
[root@Master mysql]# /opt/mysql3307/bin/mysqladmin -uroot -p -S /data/mysql/3307/mysql.sock shutdown
7. 重新启动MySQL实例
[root@DCSDR213 mysql]# /opt/mysql3307/bin/mysqld --defaults-file=/data/mysql/3307/conf/mygtid.cnf &
8. 查看lc-messages-dir参数
9. 此时error.log当中没有发现报错了
参考:
https://dev.mysql.com/doc/refman/5.7/en/error-message-language.html
[ERROR] Can't find error-message file '/data/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.的更多相关文章
- 安装mysql报错:Can't find messagefile '/usr/share/mysql/english/errmsg.sys'和/usr/bin/mysqladmin: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or
使用yum安装mysql服务端: [root@centos ~]# yum -y install mysql-server Loaded plugins: fastestmirror, securit ...
- Android错误:can not get file data of lua/start_v2.op [LUA ERROR] [string "require "lua/start_v2””] 已解决
错误: can not get file data of lua/start_v2.op [LUA ERROR] [string "require "lua/start_v2””] ...
- mysqld_safe error: log-error set to '/data/log/mysqld.log', however file don't exists. Create writable for user 'mysql'.The server quit without updating PID file (/data/mysql/mysqld.pid)
[oot@cent65 bin]# service mysqld startStarting MySQL.2019-10-28T15:56:47.786960Z mysqld_safe error: ...
- 【MySql】[ERROR] Can't read from messagefile '/usr/share/mysql/english/errmsg.sys'
[root@zhang bin]# ./mysql_install_db --datadir=/usr/local/mysql/mydata/data/ 2018-08-18 03:09:14 [WA ...
- The server quit without updating PID file (data mysql.pid)
(1)mysql的安装路径和运行路径 # whereis mysqld (2)PATH变量指定的路径中,搜索mysql的信息 # which mysqld (3)查看配置文件 # ...
- 源码安装mysql5.6x启动报错:[ERROR] Can't find messagefile '/data/mysqldata/3306/english/errmsg.sys'
:: mysqld_safe Starting mysqld daemon with databases from /data/mysqldata//data -- :: [Warning] The ...
- MySQL 5.6 解决InnoDB: Error: Table "mysql"."innodb_table_stats" not found.问题
在安装MySQL 5.6.30时,安装完成后,后台日志报如下警告信息:2016-05-27 12:25:27 7fabf86f7700 InnoDB: Error: Table "mysql ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) 背景: mys ...
- how to import a SQL file in MySQL command line
how to import a SQL file in MySQL command line execute .sql file, macOS $mysql> source \home\user ...
标签:opt,error,share,sys,mysql3307,file,mysql,message,errmsg From: https://www.cnblogs.com/A121/p/17467002.html