In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the solution to the failure of mysql setting log-bin, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
The solution to the failure of setting log-bin in mysql is to first modify the [my.cnf] file, then store the log file in binary form, and finally find the binary file and export it with the command.
How to solve the failure of setting log-bin in mysql:
1. Modify the my.cnf file
Log-bin=mysql-binbinlog_do_db=hello
Log-bin: set this parameter to enable the binlog feature and specify the path name
Binlog_do_db: specifies the name of the database in which to log
You need to restart the database service after modifying the file
two。 The log file exists in binary form. Find the binary file and export it using the command.
A) find the location of the binary file
[root@CCDT-gluster-1 mysql] # ps-ef | grep mysqlroot 12017 10 13:45 pts/0 00:00:00 / bin/sh / usr/bin/mysqld_safe-- datadir=/home/Mysql/MysqlData-- pid-file=/home/Mysql/MysqlData/mysql1.pidmysql 12336 12017 0 13:45 pts/0 00:00:02 / usr/sbin/mysqld-- basedir=/usr-- datadir=/home/Mysql/MysqlData-- plugin-dir=/usr/lib64/mysql/ Plugin-user=mysql-log-error=/home/Mysql/MysqlData/CCDT-gluster-1.err-pid-file=/home/Mysql/MysqlData/mysql1.pidroot 14080 26031 0 13:50 pts/0 00:00:00 grep mysqlroot 20668 10 May11? 00:00:00 mysql-u root-p
B) the binaries are stored in the same directory as the database files and exported using the mysqlbinlog command
[root@CCDT-gluster-1 mysql] # cd / home/Mysql/MysqlData [root@CCDT-gluster-1 MysqlData] # mysqlbinlog-- start-datetime='2016-11-17 12 home/Mysql/MysqlData 00lv 00'-- stop-datetime='2016-11-17 17 home/Mysql/MysqlData 00' mysql-bin.000001 >. / hello.txt Thank you for reading this article carefully. I hope it will be helpful for the editor to share the solution to the failure of setting log-bin in mysql. At the same time, I also hope that you will support it. Pay attention to the industry information channel, find problems, detailed solutions are waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.