[PHP] Move Database

2002-12-09 Thread Shaun
Hi,

I am moving my site from one server to another, how can i copy all the data
in my datbase to my new server? Also is it possibel to do this one table at
a time?

Thanks for your help



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Move Database

2002-12-09 Thread Krzysztof Dziekiewicz
 Hi,

 I am moving my site from one server to another, how can i copy all the data
 in my datbase to my new server? Also is it possibel to do this one table at
 a time?

Backup from command line:
   mysqldump -h MYSQLHOST -u MYSQLUSER -p DATABASE  backup.sql
or
   mysqldump -h MYSQLHOST -u MYSQLUSER -p DATABASE TABLE 1
   TABLE 2 ... TABLE N backup.sql
In backup.sql you get CREATE and INSERT syntax.

In new server you can execute:
   mysql -h NEWMYSQLHOST -u MYSQLUSER -p DATABASE  backup.sql

Of course in new server you must create DATABASE before.

-- 
Krzysztof Dziekiewicz


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php