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] #