In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This article solves the following problems:
Mysql log file directory, how to view binaries, view binary garbled.
[@ more@]
1. View Archiv
Mysql > show binary logs
+-+ +
| | Log_name | File_size |
+-+ +
| | ablelee.000001 | 150462942 | |
| | ablelee.000002 | 125 | |
| | ablelee.000003 | 106 | |
+-+ +
two。 Search for the ablelee.000003 file name and you'll know where the log file is, or check the / etc/my.cnf file.
Vi / etc/my.cnf, add a line log-bin=/var/lib/mysql/mysql-bin-log under [mysqld]. Restart mysqld. Two files are generated under / var/lib/mysql/: mysql-bin-log.00001 and mysql-bin-log.index.
View:
Mysqlbinlog / var/lib/mysql/mysql-bin-log.00001 . Mysqlbinlog has many parameters, such as specifying the start time. For more information, please see mysqlbinlog-- help. If you report an error: mysqlbinlog unknown variable: "default-character-set=gbk", it is because:
The options under [client] are read by all client programs (except mysqld), but mysqlbinlog does not recognize default-character-set, and when the client does not recognize it, it will report an error and exit, and will not continue to hold the line. You can use loose-variable_name=xxx to solve the problem.
There are three solutions:
1. Modify my.cnf, comment or delete default-character-set=gbk under [client]
two。 Add-- no-defaults switch to the command line and use mysqlbinlog-- no-defaults
3. Change default-character-set=gbk to (no reboot is required):
[client]
Loose-default-character-set=gbk
In this way, all client programs (including mysqlbinlog) that do not recognize the variable will ignore it, valid up to 4.0.2, but will still have the following warning when executing mysqlbinlog:
Warning: mysqlbinlog: unknown variable 'loose-default-character-set=gbk'
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.