Database Restorations
i need to restore one database from one server to new server with new username.
For Eg: Existing database name like cpanelusername1_dbname.sql. i need to restore the content of these database to new server with cpanelusername2_dbname. Is this possible.
-
Yes possible. The name of the database backup file doesn't matter much. You can transfer the cpanelusername1_dbname.sql to a new server and with the root user use the below command to restore. example: #mysql database_name < database_backup.sql (command for root user) Or #mysql -u [database_user] -p [database_name] < database_backup.sql (command for non-root user)
In your case on the new server it will be:#mysql cpanelusername2_dbname < cpanelusername1_dbname.sql (command for root user)0 -
Thanks @kodeslogic 0
Please sign in to leave a comment.
Comments
2 comments