mysql restore and overwrite -


i have backup of entire host 11 db , tables. messed stuff , want restore , while restoring overwrite.

mysql -u root -p < plasesavetheday.sql

i errors database existing , duplicate entry '11' key 'id'. how can tell import or edit file overwtire.

thanks

it sounds dump file has create database in it. if so, should drop database before load dump file:

$ mysqladmin -u root -p drop database 

now can load dump file:

$ mysql -u root -p < plasesavetheday.sql 

of course, might want backup database first, in case!


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -