Forum Moderators: coopster & phranque

Message Too Old, No Replies

Moving a MySQL Table/DB

How to do this..

         

Nick_W

12:42 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



hi all,

I'm in the process of changing hosts and I need to move some mysql tables to the new server. Can someone please point me in the right direction regarding whay I need to swot up on to do this?

Thanks...

Nick

Robber

12:59 pm on Jan 6, 2003 (gmt 0)

10+ Year Member



Havent done it in Mysql but I would think exporting the table to perhaps a csv then rebuild the table on the new server might do it.

brotherhood of LAN

1:02 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



if your using phpmyadmin on your "old" server then just go to >exported under teh db name and dump each database into a text file, tab¦whatever delimited or as SQL

//edited

incywincy

1:11 pm on Jan 6, 2003 (gmt 0)

10+ Year Member



To dump your database try:

mysqldump --opt database > backup-file.sql

You can read this back into MySQL with:

mysql database < backup-file.sql

ukgimp

1:41 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is an option in phpmyadmin to export schema and data dump. Produces a long sql command that you can cut and past into the new with all the data in tact. I know that works fine.

Cheers

Nick_W

2:11 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks guys.

Don't use phpmyadmin but I think the way I did it last time was mysqldump. At least I think so...

incywincy, will that work for a table? - I think the DB will be set up for me, so I just need to put the backup table in it...

Thanks again..

Nick

incywincy

2:24 pm on Jan 6, 2003 (gmt 0)

10+ Year Member



nick,

i think that the option --tables caters for this.

take a look at [mysql.com ]

Nick_W

2:26 pm on Jan 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep, just what I need, thanks for all the help ;)

Nick