Use mysql5 The mysqldump command of version 7 backs up mysql8 An error will be reported when using the 0 version of the database:
mysqldump: Couldn't execute 'SET SQL_QUOTE_SHOW_CREATE=1/*!40102 ,SQL_MODE=concat(@@sql_mode, _utf8 ',NO_KEY_OPTIONS,NO_TABLE_OPTIONS,NO_FIELD_OPTIONS') */': Variable 'sql_mode' can't be set to the value of 'NO_KEY_OPTIONS' (1231)
The solution is as follows:
The first way is to upgrade MySQL 5 Version 7 database to MySQL 8.0 0, and then use the same command to back up
The second way is not to use MySQL 5 Version 7 database comes with the mysqldump command, but find a mysql8 Upload the mysqldump command file of version 0 database to the specified path of the host, and then use mysqldump under this path for backup operation
The second method is recommended
View the current mysqldump version command
# mysqldump --version
mysqldump Ver 10.13 Distrib 5.7.35, for Linux (x86_64)
# mysqldump --version
mysqldump Ver 8.0.25 for Linux on x86_64 (MySQL Community Server - GPL)
Similar Posts:
- mysqldump: Couldn’t execute ‘SET OPTION SQL_QUOTE_SHOW_CREATE=1’
- How to Sovle mysqldump backup Error on the MySQL command line
- How to Backup MySQL database regularly
- Solution to empty backup file generated by mysqldump scheduled task
- [Warning] Using a password on the command line interface can be insecure. (Solved)
- mysqldump unknown table ‘column_statistics’
- MySQL Use innobackupex to backup and recovery error [How to Solve]
- Mysqldump backup problems got error: 1045, error 1045 (28000), got error: 1449
- [Solved] MYSQL Command gruop by Error: this is incompatible with sql_mode=only_full_group_by
- Mysqldump: command not found [How to Solve]