ashique
ashique

Reputation: 1285

mysqldump: Got error: 1044: Access denied for user 'username'@'localhost' to database 'databasename' when using LOCK TABLES

when I use the command mysqldump -u user -p my_db > my_db.sql I could dump one database, same time I couldn't dump the other database on MySQL server.it shows the error

mysqldump: Got error: 1044: Access denied for user 'user'@'localhost' to database 'my_db' when using LOCK TABLES

how this happen??

Upvotes: 0

Views: 2400

Answers (1)

ashique
ashique

Reputation: 1285

use the same mysqldump command, simply adding the --single-transaction flag, eg. mysqldump --single-transaction -u dbuser -p my_db > my_db.sql --set-gtid-purged=OFF

Upvotes: 1

Related Questions