[thelist] Moving a MySQL Database

Michael Barrett mbarrett at triad.rr.com
Thu Feb 28 17:10:35 CST 2002


> How can I move the MySQl database off my
> computer to the server where the site will be hosted for a while.

>From a Unix command line, you can enter:
mysqldump databasename > filename.txt

This will create a text file containing all the SQL statements needed to
fully recreate all tables in the database. I'm not sure if this will work in
a Windoze environment.

On the new system, upload the text file to the server.
Then you would type:
mysqldump databasename < filename.txt

Notice the angle bracket 'points' in the direction the data is moving.
In the second command it's pulling the SQL into the database, in the first
it's pulling from the db into the text file.

Once you have the db in the text file, you could write a php script to
include the datafile into a connection script, and enter the data that way
if you don't have command line access on the evolt system.


--
Michael Barrett
-O^O-
  -

mbarrett at triad.rr.com
AIM: device55




More information about the thelist mailing list