MySQL startup error: File./mysql-bin.indexnotfound (Errcode: 13

Source: Internet
Author: User
Linux installation after the initialization of MySQL database, use mysqld_safe to start mysql database, the following found that the startup failed [root @ SVNServerbin] #. mysqld_safe-usermysqlnbsp; etcinit. dmysqldstartStartingMySQL. ERROR! TheserverquitwithoutupdatingPIDfile (datamy

After installing and initializing the MySQL database in Linux, use mysqld_safe to start the mysql database. The following shows that the startup failed [root @ SVNServer bin] #. /mysqld_safe-user = mysqlnbsp;/etc/init. d/mysqld start Starting MySQL. ERROR! The server quit without updating PID file (/data/my

After installing and initializing the MySQL database in Linux, use mysqld_safe to start the mysql database.

[Root @ SVNServer bin] #./mysqld_safe-user = mysql &

Or

[Root @ SVNServer bin] #/etc/init. d/mysqld start
Starting MySQL. ERROR! The server quit without updating PID file (/data/mysql/AY14020816093477605eZ. pid ).

Restarting mysql will throw a red font error.

You can only see the mysql startup failure. for specific reasons, you need to view the. err file in the database directory and view the. err file. The content is as follows:

140726 00:18:10 mysqld_safe mysqld from pid file/data/mysql/AY14020816093477605eZ. pid ended

140726 00:31:19 mysqld_safe Starting mysqld daemon with databases from/data/mysql

/Usr/local/mysql/bin/mysqld: File './mysql-bin.index' not found (Errcode: 13)

140726 0:31:19 [ERROR] Aborting

140726 0:31:19 [Note]/usr/local/mysql/bin/mysqld: Shutdown complete

This error report is marked in red. errcode13 is generally a permission issue. Check whether the mysql user has the write permission on all files in the database directory, modify the user and user group permissions of the MySQL directory:

Chown-R mysql: mysql/usr/local/mysql

View the/usr/local/mysql directory permissions, as shown in figure

When the problem is found, it is indeed a permission problem. The following troubleshooting is simple. Assign all the users in the data directory to the mysql user.

Available in redhat System: Chown mysql. mysql-R/usr/local/mysql

Available in CentOS: Chown mysql: mysql-R/usr/local/mysql

Now, start mysql again. For example, no error is reported.

[Root @ SVNServer bin] #/etc/init. d/mysqld start

If an error is still reported, it may be caused by the permission setting of the/usr/local/mysql directory. The permission setting is as follows:

Chmod 755/usr/local/mysql

After setting, view the permission as follows: ll/usr/local/mysql

Drwxr-xr-x 9 mysql 12288 July 26 09:50 mysql

Try to connect, for example, OK

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.