Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to move local MYSQL DB up to remote DB server

Tags:

mysql

I have a local MYSQL DB running under WAMP that I need to move up to my production DB server. New to MySQL and need to know the best way to get this DB moved up.

like image 565
JBeckton Avatar asked Jan 21 '10 23:01

JBeckton


1 Answers

you can run this on your current server:

mysqldump -u user -p database_name > dump.txt

and then do this on your new server:

mysql -u user -p database_name < dump.txt

Replace "user" with your username and "database_name" with a name of your database. You'll be prompted for a password in both cases

Note that second command will replace old tables in your new database

like image 131
Zepplock Avatar answered Oct 03 '22 23:10

Zepplock