Changing the Linux host name causes MySQL to fail to start and restart

Source: Internet
Author: User

Changing the Linux host name causes MySQL to fail to start and restart

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

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 updating fi [FAILED]

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

Root@bkjia.com ~ # Ps aux | grep mysql
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 704 pts/0 S + grep mysql

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

Kill-9 <mysqlpid> and then service mysql start Haha to see the green OK,

[Root @ bkjia ~] # Service mysql start
Starting MySQL. [OK]

This article permanently updates link: https://www.bkjia.com/Linux/2018-02/151070.htm

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.