noviembre 25, 2014

mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES

mysqldump: Got error: 1044: Access denied for user ‘root’@’localhost’ to database ‘information_schema’ when using LOCK TABLES


I'm trying to make backups using the mysqldump command and getting the following error or warning:
mysqldump: Got error: 1044: Access denied for user 'root'@'localhost' to database 'information_schema' when using LOCK TABLES
How do I fix this problem?

You can pass the --single-transaction option to mysqldump command:
$ mysqldump --single-transaction -u user -p DBNAME > backup.sql

Another option is to grant LOCK TABLES to your user:
$ mysql -u root -p

And type:
mysql> GRANT SELECT,LOCK TABLES ON DBNAME.* TO 'username'@'localhost'; 

Fuente: http://www.cyberciti.biz/faq/linux-unix-mysqldump-got-error1044-access-denied/

No hay comentarios:

¿Cómo poner el conteo de las filas en una consulta en MySql?

 ¿Cómo poner el conteo de las filas en una consulta en MySql? SELECT  @rownum := @rownum + 1 AS contador,  /*Contador*/ t.*  /* nombre d...