Can't connect to local MySQL

software development

#1

Hi There

I am not a programmer and would very much appreciate help on the following matter. Please bare with me as if i do not using the right lingo.

I have a client who would like to transfer their web hosting to dreamhost. Their current URL is http://www.amacon.com and i have temporarily created a mirror site with all the files here:
http://www.amacon.mano-design.com/docs/

I also set up a Mysql database and uploaded all the files without error.

I was given the SQL dump and I imported it using MySql. It said it imported successfully. However when I view the website (http://www.amacon.mano-design.com/docs/) I get a lot of error messages mainly saying "Warning: mysql_connect() [function.mysql-connect]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ "

Does anyone kno what this means and how I can solve this matter. Is it a question of configuring my dreamhost account?

Please any help would be much appreciated

Thanks

Bujumbura


#2

it’s a question of configuring your script to connect to the database. Are you using ‘localhost’? Make sure that you’ve set your script to connect to the hostname and database name, user, and pass you set up for it through the panel.

–Matttail
art.googlies.net - personal website


#3

Hi Matttail

Thank you for reply so quickly. Where would I configure the script that connects to the database. Would it be within the html page or would I be using the control panel of dreamhost?

Thanks
Bujumbura


#4

I got it to work after a lot of trial and error

Thanks


#5

That’s the best way to learn. :slight_smile:


yerba# rm -rf /etc
yerba#