MySQL initialization error "one" Can ' t find error-message file '/usr/local/mysql/errmsg.sys '

Source: Internet
Author: User

Environment: CentOS 7.2

MySQL 5.7.18

Download the RPM package to the server locally from the MySQL official website and install the following RPM package in turn:

mysql-community-common-5.7.18-1.el7.x86_64.rpm

mysql-community-server-5.7.18-1.el7.x86_64.rpm

mysql-community-client-5.7.18-1.el7.x86_64.rpm

mysql-community-libs-5.7.18-1.el7.x86_64.rpm

mysql-community-devel-5.7.18-1.el7.x86_64.rpm

After the Yum installation is complete, start initializing:

Mysqld--initialize

Since Yum was installed, the configuration file my.cnf configuration for MySQL has been configured, so the my.cnf file is copied directly to/etc/. However, in the process of initialization to view the error log, found an error:

[ERROR] Can ' t find error-message file '/usr/local/mysql/share/mysql/errmsg.sys '.

Check error-message file location and ' Lc-messages-dir ' configuration directive

On the official website query, Errmsg.sys log is Comp_err this project generated, in the MySQL creation process will be automatically generated, I first find a bit, but there is no file information, after Google, According to the above alarm information in the MY.CNF to specify the value of the Lc-message-dir parameter, and then restart, but the error log is still an error message, the can ' t find ..... Errmsg.sys, then I touch create this file, restart after the report error can ' t read .....

Then I sent this question to the technical group to ask, there is the great God told me the general initialization of the various errors caused by the main reason is due to the parameter configuration error, it is recommended that I should slowly according to MY.CNF inside the configuration parameters to exclude.

Follow-up I found that at the beginning of the log error is:

[ERROR] Can ' t find error-message file '/usr/local/mysql/share/mysql/errmsg.sys '.

This time I was thinking about this Share/mysql how these two directories come from, because the Basedir and datadir specified in my parameters contain both subdirectories, but I'm sure the file is still related to Basedir because I basedir specify/usr/ local/mysql/; basedir Specifies the file that is the bin,lib of the database, but I installed it because it is yum, the default path for all these files is under/usr/share/mysql, So basedir This parameter can not be specified, or directly to the/usr/share/mysql/directory below.

Then I made the changes in MY.CNF:

#basedir =/usr/local/mysql Comment out Basedir, then reinitialize or reboot mysqld.

Sure enough the log does not have this error.

As for the specified basedir=/usr/share/mysql has been verified, the specified words will still be error.

[ERROR] Can ' t find error-message file '/usr/share/mysql/share/mysql/errmsg.sys '. Check error-message file location and ' Lc-messages-dir ' configuration directive

MySQL initialization error "one" Can ' t find error-message file '/usr/local/mysql/errmsg.sys '

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.