1

I took dump of a DB from the production. I want to import into my local database

mysql -u user_name -p db < db.sql

But it shows some error

ERROR 1005 (HY000) at line 25: Can't create table 'table_account' (errno:13)

And I am unable to import the table. This issue is occurring when I try to Import a particular database. Tried to import some other database. It works fine.

Could anybody solve this.

Thanks in Advance.

Akhil
  • 967
  • 1
  • 7
  • 14

3 Answers3

1

Check the owner of the database directory, may be its the issue..

try this : chown -R mysql:mysql /var/lib/mysql/database_name.

Aman Aggarwal
  • 17,619
  • 9
  • 53
  • 81
  • Does that, still not working only this table has the problem. Tried out importing another one it works fine. – Akhil Jan 22 '14 at 10:49
0

Do not create any tables in the database 'mysql'; it is special. Instead CREATE some other DATABASE, and get into it with a USE.

Mukilan R
  • 445
  • 5
  • 17
0

I am re posting the answer I mentioned in the comment for easy accessibility.

Command used -> mysql -u root -p lock-tables=false db < databackup.sql

Also the below mentioned link will give you more information link

Akhil
  • 967
  • 1
  • 7
  • 14