phpBB Installation

I’ve been having trouble setting up phpBB on my site. Can anyone shed some light as to where I might be going wrong? These are the settings I’ve been using:

Database Server Hostname / DSN: (also tried localhost)
Your Database Name: mydbname
Database Username: mydbusername
Database Password: ********* (correct password)

I have created the db hostname in the panel, and it has been up for several days, but I keep getting the same error:

phpBB : Critical Error
Could not connect to the database

Any help would be greatly appreciated.

You need to set-up a hostname from the control panel; it’s not just

Thanks for the quick reply. I tried it, setting up a separate MySQL Hostname from the panel (like,, but got the same result:

Database Server Hostname / DSN: (also tried mymsgboard)
Your Database Name: mydbname
Database Username: mydbusername
Database Password: ********* (correct password)

In part, I’m confused as to the terminology. “MySQL Hostname” is used on the panel for both databases and hostnames? What is the relationship between these two? Do I somehow need to tie them together?

Thanks in advance.

The relationship is what machine is hosting the database (hence “hostname”) and once connected to that machine, the particular database you want to use (“database name”).

You can have more than one database hosted by the same machine, but the way DreamHost has their Web Panel set up, each database has to have its own hostname to access the machine it is on.

The database name is a MySQL identifier and according to the docs the acceptable characters are “Any character that is allowed in a directory name except /',’ or `.’.” and up to 64 characters long.

Naturally a hostname follows different set of characters, for example you can’t have underscores. And it will be a subdomain of one of your domains.

Hostnames for the databases are just like hostnames for web sites. The MySQL client (PHP/phpBB) has to use DNS to get the IP address for “” then connects to that machine.

Once the client has connected, it logins in and says it wants to use the database called “database name”.

Okay, thanks everyone. I got it working. I was doing something dumb. :frowning:


i’m having the same problem. have change mysql hostname and have tried every combination i can think of only to still receive cannot connect to database error.

alan…what did you do to fix your problem?

I’ve never had to run phpBB through php-cgi FWIW.


does this look right?

database server hostname:
database name: drdaoc
database username: User
database password: ******

in my dreamhost panel i have created a mysql hostname for the database i created called drdaoc and the hostname is

on the line for DSN should i put the full context of or just drdaoc?

looks good, if the info you’ve displayed from your config file:

database server hostname:
database name: drdaoc
database username: User
database password: ******[/color]

matches what you’ve set up in your web panel under Goodies > MySQL you should be up and running.

Are you still having problems?


i think right now i’m waiting on the database mysqlhostname and the DNS servers to sync up…

when it’s ready should i be able to ping the database? or is there any test i can do other than trying to install phpbb?

ah yeah, I made a new hostname a few days ago that took about 6 hours for me to be able to use, it sucked. They normally kick in pretty quick but I had just changed the domain from a mirror to fully hosted then immediately set up the new DB/user/hostname on it so that slowed things down a bit. Should be a couple of hours at the most if everything’s running ‘normally’

since it’s the db for your phpBB, you may as well use that as the test, when it’s working it’s working :wink:


/em twiddles thumbs and hums for a bit longer…

it’s working working working…

thx guys

i hear yas on the reflex action

and yeah them there subdomains/hostnames are kinda flaky lately, you need to order them the night before for sure, if you have the luxury of knowing you’re going to need it the night before

grease that squeek, she jangles me nerves cap’n! arrr.


oops, lost my cookies, that was me :wink: