MySQL as a popular open-source database management system is widely used in various scenarios, Alibaba Cloud provides high available ApsaraDB RDS for MySQL with enhanced MySQL service is now supporting businesses fighting Coronavirus COVID-19.
An error occurred in the startup database, and the error message is:
[ERROR] Can ' t find messagefile '/usr/share/mysql/errmsg.sys '
root@debian:/usr/local#/etc/init.d/mysql3306 Start
Starting MySQL
... The server quit without updating PID file (/home/www/mysql/m3306/mysql3306.pid). ... failed!
root@debian:/usr/local/mysql3306# Cat/home/www/mysql/m3306/mysql3306.err
120102 14:11:58 Mysqld_safe starting mysqld daemon with databases from/home/www/mysql/m3306
120102 14:11:58 [ERROR] Can ' t find messagefile '/usr/share/mysql/errmsg.sys '
120102 14:11:58 [note] Plugin ' federated ' is disabled.
120102 14:11:58 innodb:the InnoDB memory heap is disabled
120102 14:11:58 innodb:mutexes and rw_locks use GCC atomic builtins
120102 14:11:58 innodb:compressed tables use zlib 1.2.3
120102 14:11:58 innodb:using Linux native AIO
120102 14:11:58 innodb:initializing buffer pool, size = 128.0M
120102 14:11:58 innodb:completed initialization of buffer pool
120102 14:11:58 innodb:highest Supported file format is barracuda.
120102 14:11:58 innodb:waiting for the background threads to start
120102 14:11:59 innodb:1.1.8 started; Log sequence Number 1595675
120102 14:11:59 [ERROR] Aborting
120102 14:11:59 innodb:starting shutdown ...
120102 14:12:00 Innodb:shutdown completed; Log sequence Number 1595675
120102 14:12:00 [note]
120102 14:12:00 mysqld_safe mysqld from PID File/home/www/mysql/m3306/mysql3306.pid ended
The solution is:
root@debian:/usr/local# VI mysql3306/my.cnf
Add language configuration items, because I was installed using a binary distribution, and by default, MySQL will go to/usr/local/mysql/share/english to find the file,
But since my MySQL installation path is/usr/local/mysql3306/, it is as follows:
[Mysqld]
Pid-file =/home/www/mysql/m3306/mysql3306.pid
Log-error =/home/www/mysql/m3306/mysql3306.err
Language =/usr/local/mysql3306/share/english #此处为language配置项
Port = 3306
Socket =/tmp/mysql3306.sock
Basedir =/usr/local/mysql3306
DataDir =/home/www/mysql/m3306
Reboot:
root@debian:/usr/local#/etc/init.d/mysql3306 Start
Starting MySQL
...
Started successfully.