Mysql hostnames

software development

#1

Am I supposed to be able to add more than one mysql database to a single mysql hostname? It seems logical, but I can’t figure out how to do this using the dreamhost goodies panel or the mysqladmin web interface. When I try to do it in command line, it says I don’t have permission. In other words, do I need to create a new mysql hostname for every database? Thanks.


#2

Yes, you do have to create a new hostname for every database you have.

I’m not sure why this is, it could be to do with the fact that phpmyadmin is installed by default on the MySQL hostname and more that one database on the same hostname would confuse the installation?

  • wil

#3

The last mysql hostname I created took about 48 hours to where I could connect using the phpMyAdmin link on the panel. This is somewhat longer than others I’ve created in the past. I’m training myself not to think of database creation as an impluse decision :slight_smile:


#4

Indeed. The keyword here is planning.

I remember a quote a high-school teacher used to drum into us all the time:

“Fail to prepare; prepare to fail”.

  • wil

#5

[quote]I’m not sure why this is

[/quote]

I think it’s mostly to do with a short-sighted assumption on our part, or possibly a desire to get something that will work for 95% of the people out there 95% of the time.

There has been talk about fixing this for a while now, but I’m not sure when it’ll happen. It might wait until we make a major revamp in our database offerings.

Look at the bright side: It wasn’t that long ago you could only have a single database, and it was only available on our two highest-end plans. :>

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#6

There’s also a practical reason - it’s useful for us to be able to move databases individually, for instance if a database machine is overloaded. Making sure that each database has a unique hostname gives us the most flexibility.


#7

[quote]There’s also a practical reason - it’s useful for us to be able to
move databases individually, for instance if a database machine
is overloaded. Making sure that each database has a unique
hostname gives us the most flexibility.

[/quote]

Again, it is shown that I tend to view things from either a Development or Marketing perspective.

Thanks, Will, for providing some additional background from the Admin side of things.

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#8

Will, that sure makes sense. I can definitily see the advantage in that.

Jeff, thanks for the info. Maybe now we can poke you into upgrading to MySQL 4 or better still, Postgresql. :slight_smile:

/me whistles.

  • wil

#9

[quote]Jeff, thanks for the info. Maybe now we can poke you into
upgrading to MySQL 4 or better still, Postgresql. :slight_smile:

[/quote]

MySQL 4 is a definite possibility, now that it’s deemed production-worthy. I wouldn’t hold my breath for InnoDB support, though, as it’s apparently a big pain on the Admin side of things.

PostgreSQL is a bit less likely, as we really don’t get a lot of demand for it.

That’s kind of surprising, actually - I’ve been playing with it over the weekend (personal stuff, not DH stuff) and it’s pretty nice. Definitely not as user friendly or easy to set up, but it seems to perform relatively well and has some features that could make it better for certain kinds of high-end applications. I could see it (and InnoDB-supported MySQL 4) on our dedicated server line, perhaps.

Do you have much experience with it, Wil? I’m in the process of cross-porting one of my own projects so that it works on both MySQL 3.23 and PostgreSQL 7.3, and have run into some interesting differences. Quite eye-opening, to say the least!

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#10

I have very limited hands-on experience with either MySQL or Postgresql to be honest. The team I work with however swear by Postgresql. Yes, a little more complex to use and understand but better performance on large-scale website, especially those who do a lot of inserts and update queries apparently. I’m told that MySQL is great for reading data out of a website flat, such as Yahoo! Finance using it for their front end finance site, but if you’re altering/updating data then give it a miss.

Saying that, we’ve had some interesting experience with MySQL/Postgresql. We’ve moved sites in the past, or ported them over to Postgresql and found greater speed difference, most stability and less corrupt tables. It’s either that, or our folks prefer and are better working with it I don’t know.

But everyone seems very excited about MySQL 4 and especially the caching possibilities built into it. I think this will make a great difference to high traffic sites.

But I doubt MySQL 4 will make it into the stable release of Debian for a long while. Or at least, I don’t think it will. If it does get packaged next week, don’t quote me on this thread. :slight_smile:

Fire away with your findings, though, I’d be interested to see what you’ve run into, and who knows I might be able to help.

  • wil

#11

[quote]I remember a quote a high-school teacher
used to drum into us all the time:

“Fail to prepare; prepare to fail”.

[/quote]

Thanks, guys.

Wil, not only did you answer my question, you gave me a great line to use on my own high school students.


#12

[quote]But I doubt MySQL 4 will make it into the stable release of Debian
for a long while. Or at least, I don’t think it will. If it does get
packaged next week, don’t quote me on this thread. :slight_smile:

[/quote]

I’m not sure what Admin’s official policy is on this (so don’t quote me), but I’m pretty sure we compile our own custom MySQL binaries anyhow, so waiting for Debian to do it on our behalf may not be the deciding factor in this case.

Obviously, there’s a lot more demand for something like this than Random::PerlModule, anyhow. :>

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#13

Well we do use the Debian package for the MySQL client - not sure if you can use the older client with the newer server.

We usually use MySQL’s Linux binaries for MySQL, and then build our own .debs using these… although we may be compiling our own now.


#14

[quote]Wil, not only did you answer my question, you gave me a great line to use on my own high school students.

[/quote]

Hah! Glad I could be of some use. :slight_smile:

  • wil

#15

I’m going to be porting a FileMaker Pro database into Postgresql at my day job this summer (yes, I finally reverted to having a day job, albeit a part-time one, due to the generally crappy state of the web industry). It’s the only type of database their web host supports, and alas, they’re locked into a long-term contract with that host, so I can’t talk them into changing. So I’m going to have to learn all about Postgresql (a process I am not entirely looking forward to) and can let you know if I discover anything especially interesting…

Lynna

Business: http://www.spidersilk.net
Personal: http://www.wildideas.net


#16

Hi Lynna -

[quote]So I’m going to have to learn all about Postgresql (a process I
am not entirely looking forward to) and can let you know if I
discover anything especially interesting…

[/quote]

Porting over from FM Pro sounds potentially difficult. :expressionless:

I’m 80% or so through with cross-porting a heavily MySQL dependent web application to Postgres. The big trick is to avoid anything even vaugely database-specific. That’s easier said than done, however, as some very important pieces of functionality are handled in very different ways.

  • Jeff @ DreamHost
  • DH Discussion Forum Admin

#17

[quote]Porting over from FM Pro sounds potentially difficult. :expressionless:

[/quote]

Having been working on it for a while now, I think I can definitely say yes. Yes, it is. :frowning:

However, I’m starting to like PostgreSQL a lot. I don’t know whether it’s just that I’m having to learn it in more depth than I ever did MySQL, but it seems to me to be a lot more powerful. Someone who knows MySQL better than me could probably correct me on this, but I don’t think it has views, stored procedures, triggers, or the sort of referential integrity checking that PostgreSQL does. And most of the comments comparing the two that I’ve seen online seem to indicate that PostgreSQL is faster and more stable.

So… I know you said you’re not likely to offer it any time soon due to lack of demand, but you can add me to the list of people who’d love to have it and would probably use it in preference to MySQL where possible, if that improves the demand any.

Lynna

Business: http://www.spidersilk.net
Personal: http://www.wildideas.net


#18

Yes, definitily add me to that list too. I’d love to see Dreamhost support Postgres.

/me nudges. :>

  • wil

#19

AOLServer? How evil. :>

  • wil

#20

[quote]AOLServer? How evil.

[/quote]

From what I’ve heard, AOLServer is actually quite a good piece of software.

http://www.aolserver.com/