[ERROR] Can't find error-message file '/data/mysql/share/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
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 ...
随机推荐
- Codeforces Round #419 A+B
A. Karen and Morning time limit per test 2 seconds memory limit per test 512 megabytes Karen is ...
- 对WebSocket技术的学习与探索(一)
WebSocket 简要介绍 WebSocket protocol 是HTML5一种新的协议. 它实现了浏览器与服务器全双工通信(full-duple). 一开始的握手需要借助HTTP请求完成. We ...
- vue组件编写知识点
- C#多线程顺序依赖执行控制
在开发过程中,经常需要多个任务并行的执行的场景,同时任务之间又需要先后依赖的关系.针对这样的处理逻辑,通常会采用多线程的程序模型来实现. 比如A.B.C三个线程,A和B需要同时启动,并行处理,且B需要 ...
- xml-treeview转换
XML——>treeciew using System; using System.Collections.Generic; using System.Text; using System.Wi ...
- MySQL高可用架构之Keepalived+主从架构部署
针对目前公司的数据库架构要做统计规划和调整,所以针对不同的业务环境要选择合适的架构就比较重要,同时作为运维人员又要考虑到维护的便捷性(不能做过多架构维护),最终停留在mha+vip/主从+vip/my ...
- 面向对象进阶------>内置函数 str repr new call 方法
__new__方法: 我们来讲个非常非常重要的内置函数和init一样重要__new__其实在实例话对象的开始 是先继承父类中的new方法再执行init的 就好比你生孩子 先要把孩子生出来才能对孩子 ...
- [翻译] GSProgressView
GSProgressView 本人极不推荐使用drawRect的方式来绘制下载进度条,无论机器的性能怎么高,使用drawRect用于绘制图形都是低效的. A cute little circular ...
- django导入/导出原始数据
1.使用dumpdata命令导出指定app对应数据库中的数据: python manage.py dumpdata your_app --indent 4 > your_app/fixture ...
- Linux入门-8 Linux系统启动详解
系统启动流程 BIOS MBR GRUB KERNEL INIT 单用户修改root密码 GRUB加密 系统启动流程 BIOS MBR: Boot Code 执行引导程序 - GRUB 加载内核 执行 ...