当前位置:网站首页>MySQL读取Binlog日志常见错误和解决方法
MySQL读取Binlog日志常见错误和解决方法
2022-06-27 16:21:00 【51CTO】
1.查看binlog,打开是乱码模式,看不到执行的sql语句
发现MySQL库的binlog日志出来都是乱码,如下所示: BINLOG ’ IXZqVhNIAAAALQAAAGcBAAAAAHoAAAAAAAEABHRlc3QAAno0AAEDAABUOcnY
IXZqVh5IAAAAKAAAAI8BAAAAAHoAAAAAAAEAAgAB//4BAAAAcu+UpA==,如果强行用-v出来也得不到具体执行的sql语句
解决方法为:
可以用--base64-output=DECODE-ROWS -v查看出来sql语句
例如:
/usr/local/mysql/bin/mysqlbinlog--base64-output=DECODE-ROWS -v mysql-bin.000003
2. mysqlbinlog: [ERROR] unknown variable 'default-character-set=utf8mb4'
当我们在my.cnf中添加default-character-set=utf8mb4选项,那么在mysqlbinlog查看binlog时就会报错。
解决方法:mysqlbinlog 后面添加 --no-defaults 选项表示不读取配置文件中的任何设置
/usr/local/mysql/bin/mysqlbinlog--no-defaults mysql-bin.000003
边栏推荐
- Win10 LTSC 2021 wsappx CPU usage high
- Seata server database connection user and service database undo_ What permissions do log users need?
- Market status and development prospect forecast of global off-road recovery rope industry in 2022
- The difficulty of realizing time series database "far surpassing" general database in specific scenarios
- OpenSSF 安全计划:SBOM 将驱动软件供应链安全
- About redis master-slave replication
- TDengine在数控机床监控中的应用
- Common optimization techniques for Web Performance
- Part 30 supplement (30) ECMAScript object
- Advanced learning of MySQL -- Application -- view, stored procedure, trigger
猜你喜欢

如何制作登录界面

国内首家!EMQ加入亚马逊云科技“初创加速-全球合作伙伴网络计划”

Common optimization techniques for Web Performance

喜讯丨英方软件2022获得10项发明专利!

广汽三菱全新欧蓝德首次国内亮相于年内上市 产品力全面焕新

How to create a login interface

Oracle TRUNC function processing date format

The data synchronization tool dataX has officially supported reading and writing tdengine

Optimal binary search tree

Simple anti shake for wechat applet
随机推荐
VSCode 建议你启用 gopls,它到底是个什么东东?
Characteristics of time series data
ansible环境安装及数据恢复
MFS distributed file system
Use lamda expression and stream flow to traverse map and list
时间序列数据的特点
Teach you how to realize pynq-z2 bar code recognition
The incluxdb cluster function is no longer open source, and the tdengine cluster function is even better
Wechat applet association search
How to use the low code platform of the Internet of things for picture management?
On array-_-
Android kotlin learning
产学合作协同育人,麒麟软件携手南开大学合力完成《软件测试与维护》实践课程
Repeatedly recognized by authoritative organizations! Smartbi was selected into the top three lists of high-tech and high growth enterprises
The data synchronization tool dataX has officially supported reading and writing tdengine
TP5 restrict access frequency
Control file related views
[UVM foundation] UVM_ Is in agent_ Active variable definition
Study on heritability and field experiment design
如何制作登录界面