![]() |
|
Customer Support
How do I export and move my database tables between servers or copy databases?
First, see this FAQ about how to create your MySQL database using OnSite.The first step is to dump out the contents of the database running on the old server. You can do this by using the "mysqldump" command on the old server. This command will create all the sql necessary to recreate all the tables in your database, and is called a "dump". A dump can either be printed to your screen, or if there is a lot of data, the dump can be directed into to a file.
To dump your database from the old host, get a shell prompt there with telnet or ssh, and then type this all on 1 single line:
mysqldump -u DBUSER -p DBNAME > DBNAME.sqlsubstituting DBUSER with your MySQL username at the old host and DBNAME with your database name from the old host.
You will be prompted for your old host's MySQL password, which will not echo back at you as you type. After you provide the right password, you will have a file in your current directory called DBNAME.sql containing your entire database.
You'll need to get this file moved onto our system by either 1) FTP'ing it down to your own computer and then uploading it from there to your account on our system, or, 2) by moving the file directly from the old host to your account here with the 'ftp' or 'scp' command.
After you have the moved the dumpfile from the old host to your account here, follow these instructions on how to import the dump into your MySQL database running here.
User-Contributed Notes |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
Related Questions:
How do I import delimited data into MySQL?
How do I change my MySQL password?
How do I import a MySQL dumpfile into my database?
How can I export data in CSV or tab delimited format?
How do I connect to my MySQL database?
Why do i get a query syntax error 1064 from MySQL when the syntax seems correct?
I can't connect to local MySQL server through socket 'mysql.sock'
How do I create a .my.cnf MySQL preference file?
What is my database server name?
How do I change MySQL timezone?
What is my MySQL Username or Database Name?
MySQL says I have too many connections.
How do I check how much disk space my database is using?
A MySQL MYI table has errors in it.
Can I connect to MySQL remotely?
Can I connect to my MySQL database from my own computer?
I can't get phpMyAdmin to work.
phpMyAdmin gives SQL syntax error when I try to create table.
How can I use odbc_connect() in my PHP scripts to connect to MySQL?
What kind of database server do you offer?
How many databases do I get?
What am I allowed to do with my MySQL database?
Will we be able to do our own MySQL admin?
How do I import a MySQL dumpfile into my database via phpMyAdmin?
Do you offer MySQL 5?
How do I export a MySQL dumpfile via phpMyAdmin?
Browse Categories:Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales |
