Error starting MySQL: Can ' t find Messagefile '/usr/share/mysql/errmsg.sys

Source: Internet
Author: User


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.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.