Today to add a few database backup, in the execution of Mysqldump, incredibly reported Mysqldump:got Error:1044:access denied for user ' jpzen ' @ ' localhost ' to database ' info Rmation_schema ' When using LOCK TABLES, a search on the internet, feel that there may be permission issues, immediately view the MySQL operation Records, the implementation of tail-n 40000. Mysql_history|grep GRANT, found that only give Select,insert,update,delete these several permissions, in order to not change the permissions of the case, it can only use the following method.
That might be the database you used to back up. The user does not have permission to lock table, can change to a higher-privileged user, or use another option of mysqldump:--single-transaction
Mysqldump-uyourusername-pyourpassword--single-transaction Yourdb > Yourdb.sql
Solve one:
Add the-skip-lock-tables option. That
[root@xok.la]# mysqldump-u dbuser-ppass db--skip-lock-tables > Db.sql
Solution 2:
Use root account backup.
PS: When exporting, add the--skip-lock-tables option.
But this method in the amount of data is too large, there will be card death, so it is best to check the SQL backup frequently, to avoid the use of backup when the Cup