2.6.1.16. Create a copy of the database
Universal way
If during the backup process you want to save the dump or make changes to it:
Through the console
- Connect to hosting via SSH.
- Run the command:
mysqldump --no-tablespaces -h host1 -u login1 --password='password1' title1 | mysql -h host2 -u login2 --password='password2' title2
In the team instead of
host
,login
password
andtitle
use appropriate connection data to the database (with the number 1 - the data of the database, a copy of which you want to create, with the number 2 - the data of the empty database). The password must be enclosed in quotation marks. - Wait for the command to complete.
With site migration
Suitable only for situations where the source and target databases are in different hostingaccounts.
- Switch to the hosting account where the source database is located.
- Open the request form for automatic site transfer.
- In the first window select any a website and a hosting account that will host a copy of the database.
- Takeoff all ticks, except «Copy database», select the source database, name the target database, and submit the request.
- Wait for the operation to complete.