Skip to main content

How to backup and restore MySQL Database

How to backup and restore MySQL Database
  • Backup MySQL Databaase Syntax:
  • mysqldump -u root -h localhost -p [database name] > [script file name].sql
  • after entering this command, MySQL will ask for root password. Simply supply password and press enter.
  • To Restore MySQL Database to your newly created database:
  • Make sure that the name of your new database is the same with the name of your old database.
  • mysql -u root -h localhost -p [dataabase name] < [script file name].sql
  • after entering this command, MySQL will ask for root password. Simply supply password and press enter.

Comments

Popular posts from this blog

Backup files while infected by Surabaya Virus

Yesterday while my mistress is infected by Surabaya Virus , i noticed that my brother plays DOTA and i wonder how does he do that. Then only way is by browsing each a a folder by using of "run"... by pressing the " Browse " button, i can see my other files and folder. And from there, i found out that i can browse a folder without clicking the folder icon. Just simply type in the address bar the name of your folder [ don't include the ".scr" file extension ]. And then i format the infected partition of my mistress.