MySQL cannot start or restart because the Linux host name and mysql host name have been changed.

Source: Internet
Author: User
Tags mysql host

MySQL cannot start or restart because the Linux host name and mysql host name have been changed.

MySQL cannot be restarted, shut down, started, or used. If you modify the host name, you can disable all mysql processes and start some mysql processes!

 

Today, I saw that my host name was incorrect. So I changed it to distinguish the server. The following error occurs when I only restarted mysql:

MySQL manager or server PID file cocould not be found! [FAILED]
Starting MySQL. Manager of pid-file quit without updatingfi [FAILED]

Why can't I find the PID? See the following:

Root@daban114.com ~ # Ps aux | grepmysql
Mysql 16433 0.0 0.2 36636 5756? Sl/usr/local/mysql/libexec/mysqld -- basedir =/usr/local/mysql -- datadir =/usr/local/mysql/var -- user = mysql -- log- error =/usr/local/mysql/var/hao9goAndSecondWeb. err -- pid-file =/usr/local/mysql/var/hao9goAndSecondWeb. pid -- socket =/tmp/mysql. sock -- Ports = 3306
Root 16992 0.0 0.0 4020 704pts/0 S + grep mysql

The original PID is still the original host name. pid, run:

Kill-9 <mysqlpid> then servicemysql start Haha saw the green OK,

[Root @ daban114 ~] # Service mysql start
StartingMySQL. [OK]

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.