User Tools

Site Tools


computing:migratewp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
computing:migratewp [2019/08/17 19:58] oemb1905computing:migratewp [2022/01/29 01:06] oemb1905
Line 41: Line 41:
   EXIT;   EXIT;
   CREATE USER 'newdatabaseuser'@'%' IDENTIFIED BY 'temporarypassword';   CREATE USER 'newdatabaseuser'@'%' IDENTIFIED BY 'temporarypassword';
-  GRANT ALL PRIVILEGES ON *.* TO 'newdatabaseuser'@'%WITH GRANT OPTION;+  GRANT ALL ON newdatabase.* TO 'newdatabase'@'localhost' IDENTIFIED BY 'temporarypassword'; 
 +   
 +Now, you need to create databases and grant privileges to the surrogate user for each of them.  You do this as follows:
  
-Now, time to import that database into the new host:+  CREATE DATABASE restoreddb1 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; 
 +  GRANT ALL ON restoreddb1.* TO 'newdatabaseuser'@'localhost' IDENTIFIED BY 'temporarypassword'; 
 +   
 +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.  Now, time to import that database into the new host:
  
   mysql -u newdatabaseuser -h localhost -p --database=newdatabase < /path/to/backup-databases.sql   mysql -u newdatabaseuser -h localhost -p --database=newdatabase < /path/to/backup-databases.sql
-   + 
-This will take some time.  Once it finishes, log into the mysql command mode and verify the databases made it over:+Once it finishes, log into the mysql command mode and verify the original databases made it over:
  
   sudo mysql -u user -p   sudo mysql -u user -p
Line 62: Line 67:
     DROP USER 'newdatabaseuser'@'localhost';     DROP USER 'newdatabaseuser'@'localhost';
  
- --- //[[netcmnd@jonathanhaack.com|oemb1905]] 2019/06/15 23:42//  + --- //[[jonathan@haacksnetworking.com|oemb1905]] 2019/12/30 02:37//
      
computing/migratewp.txt · Last modified: 2022/09/03 23:11 by oemb1905