Site5 - Built For Designers & Developers MENU

What do mysql backup and restore ?

[2 Grey Star Level]

I am newbie to mysql and want to clarify below on mysql backup and restore

What are the things needed to backup mysql and restore it like database name, username, password etc.

1)I have a database which need to be restored on different server so I used mysql dump command to backup the database by using username root and now during restoration on different server what is the username and password I need to use.

2)If I have created a new empty database on new server so can I restore old database on this new database.

Answer #1


To restore a database manually, in the way you describe, you would need to know the database name, username, password, and the backup file name. If you are restoring this on our server, we can certainly do this for you; just upload the .sql file and open a ticket asking us to restore it.

If you would like to do it yourself, the SSH command would be as follows”

mysql -u username -ppassword databasename < filename.sql In the above, username is the database username, and password is the database password (note that there is no space between -p and the password). databasename is the name of the database you are restoring to, and filename.sql is the .sql backup file. You can also restore this using PHPMyAdmin, in SiteAdmin, as well, using the Import tab.

Answers Answered By: jdavey [359 Blue Star Level]

Answer #2

1. You may restore any old database to any new database irrelevant of database name, username or password differences between the old database and the new database.
The database name, the username and the password you have to use in the restoration command are those of the new database.

2. Yes

The easiest way to do the restoration is through the graphical phpMyAdmin (you may find its link in your cPanel).

Answers Answered By: swayinfo [16 Grey Star Level]

Answer #3

If you want to ask, you can to read articles:

Answers Answered By: danielriqueti [2 Grey Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »

Money Back Guarantees
Click to verify BBB accreditation and to see a BBB report.