开启和查看mysql的bin-log日志

2018-06-18 01:04:22来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

[root@VM_0_7_centos data]# vim /etc/my.cnf 
[root@VM_0_7_centos data]# vim /etc/my.cnf 
[root@VM_0_7_centos data]# /etc/init.d/mysqld restart
Shutting down MySQL.... SUCCESS! 
Starting MySQL. SUCCESS! 
[root@VM_0_7_centos data]# grep log_bin /etc/my.cnf 
[root@VM_0_7_centos data]# grep log-bin /etc/my.cnf 
log-bin=/opt/mysql/data/mysql-bin
mysql> show variables like '%log_bin%';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id:    2
Current database: wordpress

+---------------------------------+---------------------------------+
| Variable_name                   | Value                           |
+---------------------------------+---------------------------------+
| log_bin                         | ON                              |
| log_bin_basename                | /opt/mysql/data/mysql-bin       |
| log_bin_index                   | /opt/mysql/data/mysql-bin.index |
| log_bin_trust_function_creators | OFF                             |
| log_bin_use_v1_row_events       | OFF                             |
| sql_log_bin                     | ON                              |
+---------------------------------+---------------------------------+
6 rows in set (0.01 sec)

  

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:[日常] MySQL内存不足启动失败的解决方法

下一篇:MySQL管理表和索引