MySQL cannot start the mysql-bin.index 'not found (Errcode: 13)

Source: Internet
Author: User

Configure replication and add the following content to/etc/my. cnf:

Log-bin =/var/lib/mysql/binlogs/mysql-bin
Max_binlog_size = 100 M
Expire_logs_days = 5
Sync_binlog = 1
Binlog_cache_size = 1 M
Binlog-format = ROW

As a result, an error is reported during the restart:

[Root @ www.bkjia.com mysql] #/etc/init. d/mysql restart
Shutting down MySQL. [OK]
Starting MySQL. Manager of pid-file quit without updating fi [FAILED]
[Root @ www.bkjia.com mysql] #

Error message:

/Usr/sbin/mysqld: File '/var/lib/mysql/binlogs/mysql-bin.index' not found (Errcode: 13)
120719 5:50:55 [ERROR] Aborting

This is because of folder permissions. The newly created directory binlogs is under root.

Modify folder permissions, OK

[Root @ www.bkjia.com mysql] # pwd
/Var/lib/mysql
[Root @ www.bkjia.com mysql] # chown-R mysql: mysql binlogs
[Root @ www.bkjia.com mysql] #
[Root @ www.bkjia.com mysql] #/etc/init. d/mysql restart
MySQL manager or server PID file cocould not be found! [FAILED]
Starting MySQL. [OK]
[Root @ www.bkjia.com mysql] #

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.