Changing Domain Names - mysql Remains in the old one

wordpress

#1

I’m moving my Wordpress install from one domain to another and planning to eventually eliminate the old domain name. Since the database is located on the old domain, I’ve been working with these two articles:

to move the content and migrate the database. Wordpress is now up and working on the new domain, but using the old domain’s mysql database. I have the database exported, but unable to import it into the new database on the new domain.

The error from phpMyAdmin is: MySQL said: Documentation
#1007 - Can’t create database ‘ausgebikenet_com_4’; database exists

That’s the database on the old domain. I know how to point WP to the new database, but unsure how to migrate the database without the conflicting database name.

If I was planning to keep the old domain, everything would be fine…but eventually I’ll let it expire, which will break things.

Any advice appreciated


#2

Maybe this is a non-issue, it’s not clear to me where the database actually resides. There is a mysql.OLDDMAINNAME.com entry in the control panel that I think requires that domain name to be accessible and registered to me. But, if not, the database name is generic and I could just continue to use the existing one.


#3

You don’t need to move the database. Just add a new MySQL hostname with the new domain and you’re done.

Longer explanation: Your databases exist on a database server. (A shared server by default, or possibly on a MySQL VPS or a dedicated server if you have one.) MySQL hostnames are names for that server, and all of the hostnames you create for a database server are fully interchangeable.


#4

I had already added a new MySQL hostname but wasn’t clear on the reason. I think I understand now, the databases are not on my hosting, but elsewhere and the MySQL hostnames are just to facilitate WordPress finding the database names. Makes sense (sort of), I had noticed “Hostname (these are all interchangeable)” on the control panel but wasn’t clear on the meaning.

Wouldn’t I need (eventually, at least) to also change wp_config.php to point to the new hostname in the DB_HOST field? It works currently but I would think when the old domain goes away, that could break it?

Appreciate your help!


#5

Yes update wp_config.

To add to what Andrew said… Your MySQL server is different than your web server. The interchangeable hostnames all point to the same IP, that’s the interchangeable part. So if you have MySQL.newdomain.com and MySQL.olddommain.com those both point to the same place.


#6

Cool, thanks to both of you. In the end, this was easier that I expected but the database was the tricky part. I’ll fix up wp_config.

I think this would be worth a Wiki update…AFAIK, the DH Wiki’s aren’t user accessible. I hope this helps other users. Thanks, again.


#7

Sure they are. See:

http://wiki.dreamhost.com/Main_Page#If_you_wish_to_make_edits

and

http://wiki.dreamhost.com/index.php?title=Special:UserLogin&returnto=Main+Page&type=signup