MySQL ?: Transferring database from one host to DH


Hey there,

I am moving a new domain to DH and it has a MySQL database which I have installed phpMyAdmin to monitor and allow me to export as gzip files. I am wondering if someone might have some guidance about getting it installed on DH once I have the gzip files. I am assuming I can unzip them and not have to rebuild the tables, but not sure how. I do figure I am going to have to work via telnet as I haven’t changed the DNS because need the database up before making the site live at DH–at least hoped to.

Well, hopefully this rambling makes sense and I would be very grateful for any words of wisdom!

Thanks in advance,


Assuming that the gzip file actually contains an. sql file, you would need to decompress the .sql file and then have mysql execute the statements in the .sql file:

gzip -d database.sql.gz mysql --database=name --host=hostname --user=username --password=password < database.sql



Working like a charm. Won’t know if everything is working until the DNS propagates. Then I am sure I will have some work, but this was a big chunk of worry that you alleviated. Now too make sure all the cgi is working when the website comes live.

Thanks again for the help,


Hi deb -

It may be too late now, but you might want to consider creating a ‘’ type sub-domain for testing. That way - assuming you’ve used relative links - you can test it out prior to DNS propagation.

In any case, good luck. :>

  • Jeff @ DreamHost
  • DH Discussion Forum Admin