If you are moving your database from one server to another (for example to your newly created database on your Gandi server), you can simply perform the following.
Note:
This technique is especially useful when the database size is large. For smaller imports, you may also pass via phpmyadmin if you have installed that on your server.First, export your database from your existing database (the old server).
Using your preferred method, upload the dump file (ex: mydatabase.sql or mydatabase.dump, etc.) to your new server.
Insert the database dump into your new MySQL database by typing the following:
mysql -p -h localhost newdatabase < olddatabase.sql
where localhost can be replaced with the name of your server's domain name if you have one, where newdatabase is the name of your new database, and where olddatabase.sql is the name of the dump file from your old MySQL database.
Note:
In the event that you move your database from an older version to version 5, this will often cause a problem of compatibility with the older php code.If you get an error message of the type "MySQL returned error "1054: Unknown column (…)", you will need to check to see if your application that uses the database has an upgrade for version5. (for example: /maintenance/upgrade.php for MediaWiki…).
No question on this page and its children.
RSS feed for questions matching this filter (Help)Last modified: 08 Dec 2007 at 02:08 by Ryan Anderson