Skip to content

Instantly share code, notes, and snippets.

@EliEladElrom
Last active December 17, 2015 22:29
Show Gist options
  • Save EliEladElrom/5682014 to your computer and use it in GitHub Desktop.
Save EliEladElrom/5682014 to your computer and use it in GitHub Desktop.
update-mysql-database.md

Login to server with database

SSH server you're copying from than:

scp -i ~/.ssh/id_dsa.pub /[file].sql [user]@[server]:/[folder]

Login to dest server

Login to server you're copying from, than drop database and update

mysql -p [user] -u

drop database [database name];

CREATE DATABASE [database name];

Load the new database

mysql -u [database name] -p [database name] < [file].sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment