The following error occurs:
Mysqldump: Got error: 1044: Access denied for user 'root' @ 'localhost' to data
Base 'test' when using LOCK TABLES
Solve the problem after adding the -- skip-lock-tables Parameter
/Usr/local/mysql/bin/mysqldump-uroot-p123456 -- default-character-set = utf8 -- skip-lock-tables -- opt $ I | gzip>/backup/$ dateDIR /data/${i1__${datedir0000. SQL .gz
Mysqldump: Got error: 1044: Access denied for user 'root' @ 'localhost' to dae 'information _ scheme' when using LOCK TABLES
It may be that the database user you used to back up does not have the permission to lock the table, you can change to a user with higher permissions, or use another option of mysqldump: -- single-transaction
/Usr/local/mysql/bin/mysqldump-uroot-p123456 -- default-character-set = utf8 -- single-transaction -- opt $ I | gzip>/backup/$ dateDIR/data /${i1__1_datedir0000. SQL .gz