How can I change the hostname of database?


#1

Hello,

I have some hostname whose domain nae has expired so I’d like to change them. Is it possible ?

If not how can I know its IP adress so that I can access it from remote mysql client ?

Thanks.


#2

the way i understand it, you can change it to whatever you like as long as it’s some subdomain of a domain hosted at dreamhost.

So if I own

example1.com
and
example2.com

i can set up mysql.example2.com and use that as the database domain even from example1.com


#3

Mostly that’s correct, one mysql hostname can be used interchangeably with others on the account. However there are exceptions! For example: my account now has databases on 2 different db servers. I have two different sets of hostnames one set that refers to server A, and one set for server B.


#4

interesting. i assumed that users were assigned to one webserver and one sql server per account. i’ve never seen a situation where an account is spread across multiple servers


#5

back in the day you could end up on multiple servers. my account has a couple of dbs on a different server from any of the newer dbs i have created.


#6

mine occurred after my webserver was changed (account was moved to new hardware). Db’s in existence before the switch are on one server, Db’s created after the switch are on another. There is a button in the panel that claims I can migrate all db’s to the new, but then i would probably have to fix broken stuff so I’ve never bothered.


#7

I stand corrected. I’m obviously the new kid on the block compared to you and LakeRat! Fortunately, then, all of my DBs are on the same server with multiple subdomains pointing to it.


#8

Yes except when you want to access phpMyAdmin : your db doesn’t show up if not the right domain. and if your domain expires you can’t access that’s my problem.


#9

the DB shown in phpMyAdmin will depend on the username/password combination you enter if there’s more than one. If they share that info, you’ll see both. if your domain expires, set up a mysql subdomain for the unexpired domain and use it.


#10

Thanks a lot that solved my problem :slight_smile: