当前位置:网站首页>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
边栏推荐
- About binary
- Hikvision Tools Manager海康威视工具大全(含SADP、录像容量计算等工具)百万安防从业者的实用工具
- Explain in detail the differences between opentsdb and tdengine in system functions
- [UVM foundation] UVM_ Is in agent_ Active variable definition
- MySQL中的行转列和列转行
- [Tang Laoshi] C -- encapsulation: member method
- 新产品新人事新服务,英菲尼迪继续深耕中国未来可期!
- Advanced learning of MySQL -- Application -- view, stored procedure, trigger
- Bit.Store:熊市漫漫,稳定Staking产品或成主旋律
- Wanzhou gold industry: what are the differences between gold t+d investment and other investments?
猜你喜欢

Advanced learning of MySQL -- Application -- view, stored procedure, trigger

Alibaba cloud server is invaded

Uploading multiple attachments from canvas apps to SharePoint

Simple anti shake for wechat applet

Good news - British software 2022 has obtained 10 invention patents!

Asemi rectifier bridge kbp307 parameters, kbp307 details, kbp307 pictures

【协会通知】关于举办人工智能与物联网领域暑假专题师资培训的通知

Teach you to use elastic search: run the first hello world search command

开源之夏 2022 | openGauss 项目中选公布

2022 Liaoning latest fire facility operator simulation test question bank and answers
随机推荐
GAC Mitsubishi's new outlander made its first domestic debut in the year, and its product strength was fully renewed
Contest3182 - the 39th individual training match for 2021 freshmen_ F: ss
OpenSSF 安全计划:SBOM 将驱动软件供应链安全
Teach you to use elastic search: run the first hello world search command
Common optimization techniques for Web Performance
MFS分布式文件系统
Market status and development prospect forecast of global triisopropyl chlorosilane industry in 2022
Teach you to use elastic search: run the first hello world search command
[UVM foundation] build of UVM_ Phase execution sequence
如何查看 MySQL 表的索引信息?
DOM object in JS
Wechat applet payment countdown
On array-_-
D use in
Tdengine connector goes online Google Data Studio store
How to arrange digital collections on online platforms such as reading and Chinese online? Will "read/write-to-earn" products be launched in the future?
Hikvision Tools Manager海康威视工具大全(含SADP、录像容量计算等工具)百万安防从业者的实用工具
[leetcode] 2. Add two numbers (user-defined listnode), medium
Study on heritability and field experiment design
Seata中 SelectForUpdateExecutor 可以先获取全局锁,再执行 sql吗?