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
Hello,
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.