Enable and view mysql bin-log and mysqlbin-log

Source: Internet
Author: User

Enable and view mysql bin-log and mysqlbin-log

[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 restartShutting 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 awayNo connection. Trying to reconnect...Connection id:    2Current 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)

  

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.