Importing Database


I have a WordPress database that I want to import into the DH MySQL. My panel shows the hostname as but since I haven’t transferred my domain yet that isn’t valid. I see the name mcgruff:dsouza in the panel, and I found the following command for importing a database form shell, but it’s telling me it can’t get to the database:
mysql -h mcgruff:dsouza -umyuser -pmypsw dbname < blog.sql
To be specific, if I just use “-h mcgruff” I get:
ERROR 2003 (HY000): Can’t connect to MySQL server on ‘mcgruff’ (111)
and for anything else I get:
ERROR 2005 (HY000): Unknown MySQL server host
so I think mcgruff is valid.

I’ve created a new subdomain called but I’m not sure how long it will take for the DNS reference to propagate, or if I even did that right. Then I added that in the panel as a MySQL hostname. So far of course using that as a hostname doesn’t work.

Any tips?


Just use the first host name you have - from the shell to import your script. DH servers will alwyas reference the local DNS system first, and find the local entry for that database.

Adding a sub-domain of should take an hour or less. So that should be working very shortly for you.

No, you can’ connect to your mysql host or any other DH box by mcgruff:dsouza or other names with similiar syntax - it just doesn’t work that way. :slight_smile: you have to connect with valid domain names. forinstance you can connect to (inserting your server name) for SSH, but that doesn’t work for many services.

Before you transfer your DNS over to DH your strategy should be to create mirrors at or connect directly with your own domain names when accessing from a DH box.

Hope that makes sense.

–Matttail - personal website


As you said, did resolve locally from shell. Thanks!

Unfortunately, and I completely understand why, I can’t get to phpMyAdmin at that subdomain - again because my domain is hosted elsewhere until I can get everything moved here. Can anyone suggest a way to have resolve back here? If I ping mcgruff, I get an IP. Maybe if I try to point my DNS for that subdomain to the mcgruff IP?

Actually, I can see a phpMyAdmin server at but it doesn’t accept any usernmame/psw that I can offer.

Maybe I’m impatient but after 1.5 hours I don’t see yet. I’ll give it another few hours.

Thanks again.


This DH Wiki article on hosting a subdomain for a domain hosted elsewhere might be helpful. There is another article with similar information (a little more detailed) here. :wink:



sorry to contradict rlparker, but I think one of these two solutions will be more helpful to you.

The thing I’d do would be to log into the Panel >Goodies > manage MySQL and add a new host name to your existing database at something like would work and help keep things straight.

You could also follow this Wiki article. Putting a line in your hosts file for your website and mysql server will force your computer to resolve over to DH IPs - but you won’t be able to access your ‘current’ site while that’s in your hosts file.

–Matttail - personal website


There is no reason at all to be “sorry” for contradicting my post - I agree your response is better! :slight_smile:



Actually, I have done as you guys suggest:

  • I did setup as a host in the MySQL panel. It’s now been about 15 hours and the subdomain still doesn’t resolve. I’ll recheck…
  • As far as getting to point to DH, I would but I don’t know where it should point. As I said, I can get to, and while it’s not necessary I could point to that IP, but none of my user/psw info works there. If I can’t login then it doesn’t matter which URL I use to get to that page.

As an aside, there are at least two errors in the MySQL panel : There is no explanation for that mcgruff:dsouza reference, and the example they have to access mySQL from the command line is incorrect. It says “mysql -u…” and there is no -h spec for the hostname. Since mysql isn’t hosted on the web servers this is required. I hope someone at DH checks that.

Bottom line is that I still don’t have access to administer my databases. However, my WordPress database only needed some minor tweaks which I was able to do with notepad (gasp) on the .sql file. I was able to install WordPress v2.2, point it to my database, and get my blog up within a couple hours. The actual time was spent more in tweaking the PHP pages to my preferences.

So I think the question now is which user/psw do I use at


IIRC mcgruff:dsouza refers to the server and cluster that your server is in - extra info for referencing It’s odd that your dreamhosters domain isn’t working yet… It rather should be.

I think that you can’t connect log into mcgruff.drem… because that’s not serving as access to your database for something tech support might use for administration. However, I believe that if you ping mcgruff.dre… and use that IP address in your hosts file with it will work.

The user/pass you’ll use to connect to your database is the one you selected or created when creating the database.

I’d contact support to see why that sub domain hasn’t gone through yet. And try using a ping to get the IP address for your hosts file.

–Matttail - personal website


All mysql servers are added to /etc/hosts so yes you can access them from that webserver as if DNS had already propagated. As far as also connecting using the server/service name, IE: mcgruff:dsouza you can do that as well.

The format is servername:servicedaemon so if you saw mcgruff:dsouza you would connect using
(this is only usefull if you are connecting from an external host and your domain name is not resolvable before changing DNS to DH or from another DH account in the same situation). Of course other hosts would have to be added as an allowable host for that mysql username.

Also if you know your sites IP (obtainable from Domains -> Manage DNS) by clicking the DNS link under your domain name you can access phpMyadmin by going to:



While it all looks great, and I do thank you for your time, I’m afraid that info doesn’t help.
gets redirected to
and that page doesn’t exist. It’s obviously close but no cigar. I tried gradually trimming back everything all the way up to dh_phpmyadmin with no joy.

And while this bit of advice does lead to phpmyadmin:
I am still told that the user/password I’m using is invalid.

I think I’ll have to take this through Support when I get time.