Saturday, January 19, 2013

mysqldump: Got error: 1146: Table 'tablename' doesn’t exist when doing LOCK TABLES

if you receive the error message while mysql database backup



There are few possible reason of this error:


  • permission and ownership on tables files in /var/lib/mysql is not correct, ideal ownership should be to mysql user and permission 660.
  • table not exist, check with show tables.
  • table created in uppercase, set lower_case_table_names as per your application requirement.
  • table is corrupt, repair the table.

if all above points are ok then use --skip-lock-tables parameter with mysqldump.

I am sure this will resolve the error.

 

1 comment:

  1. This article was good and it resolved my issues. Thanks for your valuable information

    ReplyDelete