Web Hosting Talk







View Full Version : Moving MySQL Databases


webworldire
06-21-2002, 06:23 AM
Im looking to move a couple of MySQL databases, some are running on Windows NT and others on Linux, is there any software out there that can do this? I would normally use phpMyAdmin but Im just wondering if there are any easier solutions out there.

~ Dave ~
daveg@webworld.ie

mlovick
06-21-2002, 06:35 AM
Why not just use mysqldump.
:confused:

kreativ
06-21-2002, 06:46 AM
This is for Linux.
SSH to the server and type this in:
mysqldump -uUsername -p dbname | gzip > dbname.sql.gz

This gives you a gzip'ed archive of your complete database.

Then on the new server, upload it, and in SSH type this:
gunzip < dbname.sql.gz | mysql -uUsername -p dbname

Compressing the database really helps if they're large in size.

webworldire
06-21-2002, 06:47 AM
Well, we are moving a databases from another host to one of our servers, unfortunitely we dont have root access on the remote server to use the mysqldump command. I guess if we could import the data that would work too.

~ Dave ~
daveg@webworld.ie

mlovick
06-21-2002, 06:52 AM
Why do you need root access to run mysqldump?

Or can you use phpmyadmin if you dont get SSH access.