1. Background
After installing mysql, change the configuration file my.int, and change its data directory. Restart MySQL and it cannot be started.
2. Troubleshooting
Check the log and find that the error is:
[ERROR] Can't find error-message file '/data/mysql/share/mysql/errmsg.sys'. Check error-message file location and 'lc-messages-dir' configuration directive.
By searching the errmsg.sys file, copy it to the error directory and give corresponding permissions. Restart or report the same error. Change the MySQL configuration file back to the default. It is found that it can be started normally, and there is no other relevant error information in the log.
3. Solution
After troubleshooting for a period of time without results, I thought about whether the file could not be found due to the Linux security group SELinux. I closed SELinux randomly and found that the problem was solved.
setenforce 0 #Temporarily disable selinux
Change SELINUX=enforcing to SELINUX=disabled in the /etc/selinux/config file # permanently disable selinux
getenforce #Check the status of selinux
Similar Posts:
- How to Solve MYSQL Error: Can’t create test file xxx lower-test
- MySQL Error: The server quit without updating PID file [How to Solve]
- Linux: MySQL Start Error: Starting MySQL.Manager of pid-file quit without updating file.[FAILED]
- Centos Service Cannot Start: Failed to start Login Service Failed to start Install ABRT coredump hook
- [Solved] Linux No access to the system error: Failed to load SELinux policy. Freezing
- How to Solve Nginx Error 13: Permission denied) while connecting to upstream
- Solutions to start failed after dhcpd installation
- Solutions to start failed after dhcpd installation
- [Solved] Primary script unknown in nginx configuration PHP
- Solution to error reporting in starting MySQL