268   MySQL

Problem

[root@~]# mysqldump -u username -p -h 10.123.456.789 -P 3306  database > ~/database.sql
Enter password: 
mysqldump: Got error: 1044: Access denied for user 'username'@'10.123.456.789' to database 'database' when using LOCK TABLES

Reason

User has no permission to lock tables

Solution

Add parameter to skip lock tables

[root@~]# mysqldump -u username -p -h 10.123.456.789 -P 3306 --skip-lock-tables database > ~/database.sql



Leave a Reply

Your email address will not be published. Required fields are marked *