Start MySQL times wrong

Source: Internet
Author: User

Compile and install MySQL today at startup, the following error is reported:

Starting MySQL ......... ........ error! The server quit without updating PID file (/usr/local/mysql/data/k8s-1.pid)


Workaround

1. See if the/usr/local/mysql/data/mysql.pid file has permission to write
Workaround: Give permission, execute "chown-r mysql:mysql/var/data" "Chmod-r 755/usr/local/mysql/data" and restart mysqld!

2. The MySQL process may already exist in the process
Workaround: Use the command "Ps-ef|grep mysqld" to see if there is a mysqld process, kill with "kill-9 process number" and then restart mysqld! that's the way I solved it.


3, may be the second time to install MySQL on the machine, there are residual data affect the start of the service.
workaround: Go to MySQL data directory/data See, if there is mysql-bin.index, quickly delete it, it is the culprit.

4, MySQL will use the/ETC/MY.CNF configuration file when the configuration file is not specified at startup, please open this file to see if there is a specified data directory (DATADIR) under the [Mysqld] section.
Workaround: Please set this line under [mysqld]: DataDir =/usr/local/mysql/data


Start MySQL times wrong

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.