Troubleshoot MySQL installation

Source: Internet
Author: User

MySQL failure:

[Email protected]_m ~]#/etc/init.d/mysqld restart

Starting MySQL ..... error! Manager of Pid-file quit without updating file.

[[Email Protected]_m ~]#


Possible one:

The Basedir and DataDir directories in the boot profile/etc/init.d/mysqld are not specified, and the default is to find the installation directory. You need to specify a directory for DataDir.


The above two directories should be the base directory and data directory specified when initializing the database. For example, my initialization directory is the following command.

/application/mysql/bin/mysql_install_db--basedir=/application/mysql--datadir=/data--user=mysql

So I changed it to:

Vim/etc/init.d/mysqld

Basedir=/application/mysql

Datadir=/data



Probably two

The MYSQLD Data directory owner is not MySQL, or the UID is incorrect. That is, the owner of the data directory above is incorrect. Change to the same owner.

Chown-r Mysql.mysql/data


Maybe three

is the TMP directory permission problem under MySQL. Causes the socket to be created.

The following error is reported in the log:


151105 13:42:49 innodb:started; Log sequence number 0 44233

151105 13:42:49 [ERROR] Can ' t start server:bind on Unix socket:permission denied

151105 13:42:49 [ERROR] do already has another MYSQLD server running on socket:/application/mysql5.1.72/tmp/mysql.so Ck?

151105 13:42:49 [ERROR] Aborting


View/application/mysql/tmp Permissions Issues

[Email protected]_s ~]# ll/application/mysql/

Total 32

Drwxr-xr-x 2 root root 4096 Nov 5 09:32 Bin

Drwxr-xr-x 3 root root 4096 Nov 4 23:55 include

Drwxr-xr-x 3 root root 4096 Nov 4 23:55 Lib

Drwxr-xr-x 2 root root 4096 Nov 4 23:55 libexec

Drwxr-xr-x root root 4096 Nov 4 23:55 mysql-test

Drwxr-xr-x 6 root root 4096 Nov 4 23:55 Share

Drwxr-xr-x 5 root root 4096 Nov 4 23:55 sql-bench

Drwxr-xr-x 2 root root 4096 Nov 5 13:25 tmp

[[Email protected]_s ~]#


The owner of the/application/mysql/tmp directory was found to be root. But the owner of this directory should be MySQL, which is the user name you specified when initializing the database with the following command

/application/mysql/bin/mysql_install_db--basedir=/application/mysql--datadir=/data--user=mysql

So authorization for MySQL can be

[Email protected]_s ~]# chown mysql/application/mysql/tmp/

[[Email protected]_s ~]#/etc/init.d/mysqld Start

Starting MySQL. success!

[[Email protected]_s ~]#


This article is from the "Struggle Bar" blog, please be sure to keep this source http://lvnian.blog.51cto.com/7155281/1709981

Troubleshoot MySQL installation

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.