-
Notifications
You must be signed in to change notification settings - Fork 7
Import Live Data
wilson29thid edited this page May 25, 2015
·
2 revisions
Import the real personnel database to your Cloud9 environment
- Change directory to above the
workspace
directory (you don't want the .sql files accessible to the public) usingcd ..
to change directory up a level,ls
to list the files in the current directory, andpwd
to see what directory you're currently on - Copy the personnel sql dump and the vanilla sql dump (just change it to
vanilla.sql
at the end)
scp [email protected]:/var/www/backup/2015-05-16/personnel_v2.sql ./
(Use the Production Server
password from LastPass)
- Login to your local MySQL server with
mysql -h $IP -u $C9_USER
- List the databases you have
show databases;
- Remove
personnel_v2
andvanilla
withdrop database DATABASE_NAME;
- Create 2 new empty databases with the same names with
create database DATABASE_NAME;
- Logout of your local MySQL server and go back to the regular command line with
exit
mysql -h $IP -u $C9_USER personnel_v2 < personnel_v2.sql
mysql -h $IP -u $C9_USER vanilla < vanilla.sql