MySQL: Troubleshoot problems with MySQL not starting

Source: Internet
Author: User

There are a number of reasons why MySQL cannot be started, and here is a situation and workaround that I have encountered.

Cause:

Recently the project needs to use MySQL, and then want to install a local database on the Mac, but actually forgot to install a version, the results found that the new server can not run.

Phenomenon:

Starting mysql:sudo/usr/local/mysql/support-files/mysql.server start from the command line

Starting MySQL

Always get this error:

error! The server quit without updating PID file (/usr/local/mysql/data/localhost.pid).

To view the error file:

sudo tail/usr/local/mysql/data/localhost.err

The results are as follows:

2014-06-24 13:50:52 37094[Note]shutting down plugin ' MyISAM '2014-06-24 13:50:52 37094[Note]shutting down plugin ' MEMORY '2014-06-24 13:50:52 37094[Note]shutting down plugin ' CSV '2014-06-24 13:50:52 37094[Note]shutting down plugin ' Sha256_password '2014-06-24 13:50:52 37094[Note]shutting down plugin ' Mysql_old_password '2014-06-24 13:50:52 37094[Note]shutting down plugin ' Mysql_native_password '2014-06-24 13:50:52 37094[Note]shutting down plugin ' Binlog '2014-06-24 13:50:52 37094[Note]/usr/local/mysql/bin/mysqld:shutdown Complete140624 13:50:52 mysqld_safe mysqld from PID File/usr/local/mysql/data/localhost.pid ended

The MySQL process is suspected to exist.

Workaround:

Find all MySQL-related processes by command: Ps-ef|grep MySQL

Then kill the process: sudo kill-9 PID

------------a successful split line----------------

Last Run command: Sudo/usr/local/mysql/support-files/mysql.server start

Get success! results.

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.