数据库
首页 > 数据库> > Linux - Mysql - Bin log

Linux - Mysql - Bin log

作者:互联网

when you set the bin log , you may cause below problems;

1> PID not found;
for this problem , you could edit my.cnf file to add a new line
server-id=12121
(12121 is a random number, you can assume any)

2> still failed. maybe you could check your mysql data folder which is for mysql user.

[01:17:55 root@centos7 data]#ll
total 20
drwxr-xr-x  9 mysql mysql 4096 Jun 13 01:13 mysql

[01:16:53 root@centos7 mysql]#ll
total 123160
-rw-r----- 1 mysql mysql       56 Jun  2 22:00 auto.cnf
drwxr-xr-x 2 mysql mysql       77 Jun 12 14:07 backup
-rw------- 1 mysql mysql     1680 Jun  2 22:00 ca-key.pem
-rw-r--r-- 1 mysql mysql     1112 Jun  2 22:00 ca.pem
-rw-r----- 1 mysql mysql     1058 Jun 12 21:31 centos7.log
-rw-r--r-- 1 mysql mysql     1112 Jun  2 22:00 client-cert.pem
-rw------- 1 mysql mysql     1680 Jun  2 22:00 client-key.pem
drwxr-x--- 2 mysql mysql      286 Jun  9 22:26 hellodb
-rw-r----- 1 mysql mysql      324 Jun 13 01:12 ib_buffer_pool
-rw-r----- 1 mysql mysql 12582912 Jun 13 01:13 ibdata1
-rw-r----- 1 mysql mysql 50331648 Jun 13 01:13 ib_logfile0
-rw-r----- 1 mysql mysql 50331648 Jun  2 22:00 ib_logfile1
-rw-r----- 1 mysql mysql 12582912 Jun 13 01:13 ibtmp1
drwxr-xr-x 2 mysql mysql       86 Jun 13 01:13 logbin
drwxr-x--- 2 mysql mysql     4096 Jun 13 00:05 mysql
-rw-r----- 1 mysql mysql   202194 Jun 13 01:13 mysql.log
-rw-r----- 1 mysql mysql        5 Jun 13 01:13 mysql.pid
srwxrwxrwx 1 mysql mysql        0 Jun 13 01:13 mysql.sock
-rw------- 1 mysql mysql        5 Jun 13 01:13 mysql.sock.lock
drwxr-x--- 2 mysql mysql     8192 Jun  2 22:00 performance_schema
-rw------- 1 mysql mysql     1680 Jun  2 22:00 private_key.pem
-rw-r--r-- 1 mysql mysql      452 Jun  2 22:00 public_key.pem
-rw-r--r-- 1 mysql mysql     1112 Jun  2 22:00 server-cert.pem
-rw------- 1 mysql mysql     1680 Jun  2 22:00 server-key.pem
drwxr-x--- 2 mysql mysql     8192 Jun  2 22:00 sys
drwxr-x--- 2 mysql mysql       58 Jun  9 21:19 test1


then you can find the true;

01:13:46(root@localhost) [(none)]> 
01:13:47(root@localhost) [(none)]> show variables like "%log_bin%"
    -> ;
+---------------------------------+---------------------------------------+
| Variable_name                   | Value                                 |
+---------------------------------+---------------------------------------+
| log_bin                         | ON                                    |
| log_bin_basename                | /data/mysql/logbin/mysql-binlog       |
| log_bin_index                   | /data/mysql/logbin/mysql-binlog.index |
| log_bin_trust_function_creators | OFF                                   |
| log_bin_use_v1_row_events       | OFF                                   |
| sql_log_bin                     | ON                                    |
+---------------------------------+---------------------------------------+

[01:17:56 root@centos7 data]#ll mysql/logbin/
total 12
-rw-r----- 1 mysql mysql 177 Jun 13 01:12 mysql-binlog.000001
-rw-r----- 1 mysql mysql 154 Jun 13 01:13 mysql-binlog.000002
-rw-r----- 1 mysql mysql 78 Jun 13 01:13 mysql-binlog.index

 

标签:Bin,13,rw,log,22,Mysql,Jun,01,mysql
来源: https://www.cnblogs.com/noise/p/14879472.html