Difference between revisions of "User:Woozle/MySQL migration"

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
Jump to navigation Jump to search
m (updated tag call)
 
Line 1: Line 1:
 
Export one database schema from local machine to cloud4's attached storage:
 
Export one database schema from local machine to cloud4's attached storage:
<bash>mysqldump -uroot -p ispda_en_mw | ssh cloud4 "cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql"</bash>
+
<syntaxhighlight lang=bash>mysqldump -uroot -p ispda_en_mw | ssh cloud4 "cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql"</syntaxhighlight>
  
 
Import one database schema from cloud1 to local folder:
 
Import one database schema from cloud1 to local folder:
<bash>ssh cloud1.hypertwins.net "mysqldump -uroot -p woozalia_mw" > /mnt/cloud4-01/migrate/woozalia_mw.sql</bash>
+
<syntaxhighlight lang=bash>ssh cloud1.hypertwins.net "mysqldump -uroot -p woozalia_mw" > /mnt/cloud4-01/migrate/woozalia_mw.sql</syntaxhighlight>
 
==Notes==
 
==Notes==
 
* [https://www.maketecheasier.com/ssh-pipes-linux/ How to Use SSH Pipes on Linux]
 
* [https://www.maketecheasier.com/ssh-pipes-linux/ How to Use SSH Pipes on Linux]
 
* Add a link from [[MySQL/porting/data]] at some point.
 
* Add a link from [[MySQL/porting/data]] at some point.

Latest revision as of 00:53, 20 April 2018

Export one database schema from local machine to cloud4's attached storage:

mysqldump -uroot -p ispda_en_mw | ssh cloud4 "cat > /mnt/cloud4-01/migrate/ispda_en_mw.sql"

Import one database schema from cloud1 to local folder:

ssh cloud1.hypertwins.net "mysqldump -uroot -p woozalia_mw" > /mnt/cloud4-01/migrate/woozalia_mw.sql

Notes