How To Import And Export Mysql Database From Old Server To New Server


How To Import And Export Mysql Database From Old Server To New Server
  Forums Index
      » MYSQL Forums
        » » how to import and export mysql database from old server to new server



How To Import And Export Mysql Database From Old Server To New Server
Post Description:
Post Tags: how, to, import, and, export, mysql, database, from, old, server, to, new, server, mysql database, support, help, answers, questions, help
This Post Has Been Viewed 260 Times Since Sun Mar 23, 2008 1:08 pm Posted By hostman with 0 replies
How To Import And Export Mysql Database From Old Server To New Server
i use this command to make mysqldump from the old server
mysqldump -h localhost -u [MySQL user, e.g. root] -p[database password] -c --add-drop-table --add-locks --all --quick --lock-tables [name of the database] > sqldump.sql


and i use this command to dump the data into the new server
mysql -h localhost -u [MySQL user, e.g. root] -p[database password] [name of the database] < [name of your sql dump, e.g. sqldump.sql]


so using the above i can give you and example.

user: root
password: mypass
dbname: mydata
name of sql dump: mydump.sql

NEW SERVER:
mysqldump -h localhost -u root -pmypass -c --add-drop-table --add-locks --all --quick --lock-tables mydata > mydump.sql


OLD SERVER:
mysql -h localhost -u root -pmypass mydata < mydump.sql


done

Leave Your Comments
* Your Name

  * Your Email Address (Will Not Be Published)

* Your Comments


Add Picture To Comments
Yes No             upload
Receive Replies on my Comments
(An email will be sent to you when someone replies to your comments)

     




Comments and replies About How To Import And Export Mysql Database From Old Server To New Server






(0) Comments