Not the answer you need?
Register and ask your own question!

MySQL 5.7.23 replica failed to execute load data infile

AlexMAlexM ContributorInactive User Role Novice

Server migrated from Percona MySQL 5.7.19 to 5.7.23 failed to apply Load Data infile during replication.
- Master-master replication
- Statement based replication
- Percona MySQL 5.7.23 (both servers)
- CentOS 6.9

Error 'The MySQL server is running with the --secure-file-priv option so it cannot execute this statement' on query. Default database: 'xxxxxx'. Query: 'LOAD DATA INFILE '/var/lib/mysql/' IGNORE INTO TABLE `xxxxxx` FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' (`xxx,xxx`) SET `create_date`= now(), `create_user`= 'xxxxxxxxx', `update_user`= 'xxxxxxx''

The systems were previously running Percona MySQL 5.7.19. We did not experience this problem with that version.

Is this a Percona MySQL 5.7.23 bug?

Thank you,
Alex Malberty
BabyCenter LLC


  • AlexMAlexM Contributor Inactive User Role Novice
    As a temporary fix, we setup secure_file_priv = '', but I would like to revert that change.
  • vinicius.grippavinicius.grippa Percona Percona Staff Role
    Hi Alex,

    I was able to reproduce your issue. This is indeed a bug and it affects MySQL upstream as well, here is the bug description:

    The workaround as you mentioned is to set secure_file_priv but this might be a security issue. Another option is to set the binlog_format to ROW os MIXED.
  • AlexMAlexM Contributor Inactive User Role Novice
    Thank you Vinicious. We will change replication to ROW based.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.