简体   繁体   English

查询已在mysql Binlog中更改-加载数据查询

[英]Query has been changed in mysql Binlog - Load data query

I had run the below mysql query in master server 我已经在主服务器上运行了以下mysql查询

load data local infile '/tmp/LRD.csv'
into table **offline**.LPLRD_Updates
  fields terminated by ',' ENCLOSED BY '"'
  lines terminated by '\n';

but this has been change in binlog as 但这已在binlog中更改为

LOAD DATA LOCAL INFILE '/tmp/SQL_LOAD_MB-597-0'
INTO TABLE `LPLRD_Updates`
  FIELDS TERMINATED BY ',' ENCLOSED BY '"' ESCAPED BY '\\'
  LINES TERMINATED BY '\n'

I have mentioned offline database in my query but it has changed to default database in binlog . 我在查询中提到了离线数据库,但是在binlog中它已更改为默认数据库。

This creates the problem in replication as default database do not have this table. 由于默认数据库没有此表,因此在复制中会产生问题。

Try doing use db_name; 尝试使用db_name; and then load data to the table. 然后将数据加载到表中。 Replication breaks or has some documented disadvantages in statement based logging. 在基于语句的日志记录中,复制中断或具有某些已记录的缺点。 By the way you cannot really claim data with it on DR site. 顺便说一下,您不能真正在灾难恢复站点上使用它声明数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 MySQL - 事务记录 - binlog? 一般查询日志? 登录数据库? - MySQL - Transaction Logging - binlog? general query log? log to database? MySQL 日志表查询以获取更改的数据 - MySQL Logs Table Query to fetch changed data MySQL更新查询在常规日志中,但数据未更改 - Mysql update query is in general log but data is not changed 启用mysql binlog后,为什么仍需要innodb重做日志? - Why we still need innodb redo log when mysql binlog has been enabled? mysql查询来计算每个id的使用次数 - mysql query to count number of times each Id has been used 将Mysql查询存储在php变量中后对其进行过滤 - Filter Mysql Query after it has been stored in php variable 是否有查询以了解是否已为 mysql 用户授予特定权限? - Is there a query to know if a particular privilege has been granted for a mysql user? MySql Binlog 更新语句 Where Clause 包含所有表列,即使客户端在运行查询时只在 Where 子句中使用主键 - MySql Binlog Update Statement Where Clause Has All Table Columns, Even If Client Uses Just Primary Key In Where Clause When Running Query 执行MySQL查询之前已发送NodeJS响应 - NodeJS response has been sent before MySQL query execution 如何使用已到达时间的mysql查询发送电子邮件 - How to send email with mysql query whose time has been reached
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM