Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I restored all database backup from another server's dumpfile to my machine. At the end my mysql server's password changed to that mysql server's password. Why it got overwritten? What i need to do to prevent this? Thanks & Regards, Praveen.

share|improve this question
can you please give the command which you have used in creating dump and then restoring it... – Abdul Manaf Dec 9 '11 at 10:10
up vote 2 down vote accepted

According to me you have also dumped the mysql database which contains the users privileges in the users table of mysql database. & one more-thing you may have used --add-drop-database or --add-drop-table while generating the dump

i.e mysqldump -u user -p passwordd --add-drop-database --all-databases > /home/dump.sql

and when you have restored it on your local machine as your dump contains the drop table it had firstly dropped your user table in mysql database and then restored new one from the dump thats why you are facing the problem. so don't include the mysql database while generating the dump.

please see various option of mysqldump using mysqldump --help.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.