how to restore MySQL database

0

I tried to do the following to restore the database:

root@m9r9w9gae3 [/bkp/var/lib/mysql]# mysqldump -u root -p nomedobd > /home/nmedobd.sql

or:

root@m9r9w9gae3 [/bkp/var/lib/mysql/nomedobd]# mysqldump -u root -p cfellini_wp > /home/nomedobd.sql

The following error appeared:

mysqldump: Got error: 1017: 
 Can’t find file: ‘./nomedobd/cf_commentmeta.frm’ (errno: 13) when using LOCK TABLES
    
asked by anonymous 04.08.2016 / 05:20

1 answer

1

If you want to RESTORE an existing backup file, you can use the following command:

#mysql -u root -p nomedobd < /home/nmedobd.sql

If you want to GENERATE a backup file, you can use the following command:

#mysqldump  -u root -p nomedobd > /home/nmedobd.sql

I hope I have helped. Any questions, leave a comment.

    
04.08.2016 / 11:09