1.) Databases:
- Get list of databases
- Dump all databases
Note: you can dump only the databases that you want to move. Also, you need to exclude the “mysql” database itself if you are moving into an mysql server with existing records.
* Transfer sql dumps to new server with your preferred way (ftp, scp, rsync, etc)
- Create Databases on new server.
- Import database dumps to new server
2.) Database Users and Privileges:
- Get list of database users and their privileges.
- Then get the privileges and password hash for each users from the above step.
Note: Above command will output similar to these two lines or you will get more if the db_user has access to more than one databases.
- Then you need to execute all these lines or queries on the new MySQL server. You can put them all in a text file (example: users.txt) and add semi-colon on each line, then import to mysql (example below):
No comments:
Post a Comment