In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Cause of error in restarting MySQL database
[root@guoqing mysql] # service mysql restart
MySQL server PID file could not be found! [failure]
Starting MySQL...The server quit without updating PID file (/ usr/local/mysql/data/guoqing.pid). [failure]
There are many possible causes of problems, and the best way to find out exactly what causes them is to check the error log first:
1. It may be that / usr/local/mysql/data/guoqing.pid file does not have write permission
Solution: give permission, execute "chown-R mysql:mysql / usr/local/mysql/data"chmod-R 755 / usr/local/mysql/data" and then restart mysqld!
two。 The mysql process may already exist in the process.
Solution: use the command "ps-ef | grep mysqld" to see if there are any mysqld processes, and if so, use the "kill-9 process number" to kill, and then restart mysqld!
3. This may be the second time that mysql is installed on the machine, and there is residual data that affects the startup of the service.
Solution: go to mysql's data directory data. If mysql-bin.index exists, delete it as soon as possible. It's the culprit.
4.mysql will use the / etc/my.cnf configuration file when it starts without specifying a configuration file. Please open this file to see if there is a data directory (datadir) specified under the [mysqld] section.
Solution: please set this line under [mysqld]: datadir = / usr/local/mysql/data
5.skip-federated field problem
Solution: check the / etc/my.cnf file to see if there are any skip-federated fields that have not been commented out, and if so, comment them out immediately.
6. Error log directory does not exist
Solution: use the "chown"chmod" command to give the mysql owner and permissions
7.selinux caused the disaster. If it is centos system, selinux will be enabled by default.
Solution: close it, open / etc/selinux/config, change SELINUX=enforcing to SELINUX=disabled, then save and exit and restart the machine.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.