This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
computing:migratewp [2019/06/16 05:50] – oemb1905 | computing:migratewp [2019/12/30 02:37] – oemb1905 | ||
---|---|---|---|
Line 33: | Line 33: | ||
| | ||
sudo scp mysqldump-all-databases.sql user@newhostorip.com: | sudo scp mysqldump-all-databases.sql user@newhostorip.com: | ||
+ | | ||
+ | Before your import the mysqldump databases into the new database, you need to create what I call a " | ||
- | Now, time to import that database into the new host: | + | CREATE DATABASE newdatabase DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; |
+ | GRANT ALL ON newdatabase.* TO ' | ||
+ | FLUSH PRIVILEGES; | ||
+ | EXIT; | ||
+ | CREATE USER ' | ||
+ | GRANT ALL PRIVILEGES ON *.* TO ' | ||
+ | |||
+ | Now, you need to create databases and grant privileges | ||
- | | + | |
+ | GRANT ALL ON restoreddb1.* TO ' | ||
| | ||
- | This will take some time. Once it finishes, log into the mysql command mode and verify the databases made it over: | + | If there are others, then repeat the commands above for each one, replacing restoreddb1 with the name of the databases you are importing and bringing in. |
+ | |||
+ | mysql -u newdatabaseuser -h localhost -p --database=newdatabase < / | ||
+ | |||
+ | Once it finishes, log into the mysql command mode and verify the original | ||
sudo mysql -u user -p | sudo mysql -u user -p | ||
Line 44: | Line 58: | ||
> EXIT | > EXIT | ||
- | Run this command on both machines, and the output should be identical. | + | If possibly, run this command on both machines, and the output should be identical. |
sudo scp -r / | sudo scp -r / | ||
| | ||
- | Put the files in the appropriate locations, and that should be it. | + | Put the files in the appropriate locations, |
+ | |||
+ | DROP DATABASE newdatabase; | ||
+ | DROP USER ' | ||
- | --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2019/06/15 23:42// | + | --- //[[jonathan@haacksnetworking.com|oemb1905]] 2019/12/30 02:37// |
| |