Mysql error

I have a script running, but on that page it says:

Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in /home/.grumpcat/mana1023/ on line 43
Cannot connect to the database. Try again.

I filled out a customer service form, but its almost a day and I’d like to get it resolved. Does anyone know what could be the problem?

Did it used to work?

Check your config for the proper username, password, database name, and database server. The server should not be ‘localhost.’ It should be the servername you created in the control panel for Manage MySQL.

To test, you can log into your database with your browser by going to (change DBSERVER to what you set up) and log in with your DBUser and DBPassword.


I’m new to dreamhost and transfering everything over from my old host, so I haven’t tried it before. I’ve checked everything for the proper names and put instead of localhost, but still it doesn’t work. I tested and it works.

You’re saying that you tested the web interface to the database? If that worked, then that’s the info you need for your config file:, the username, the password, and the database name (which is shown on the left when you first connect to But you’re saying you checked the proper names.

Weird. If all that works from your web browser, it should work from your PHP scripts. I tried, and its complaining about something in /enth/show_collective_stats.php. Is this part of the same setup that was in /aflower?


Yes, its all a part of the same setup/script. For some reason it can’t connect to the database. Could it have something to do with the database being at and the script within the subdomain

After two days of agony I just figured out what was wrong and got it to work. I was importing the mysql file from my old site after creating the database and unknown to me the old mysql file still had the old config info. Thanks for your help though! :slight_smile: