[SOLVED] Warning: mysql_connect(): Can't connect

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
Frapster
Forum Newbie
Posts: 22
Joined: Thu Jan 06, 2005 8:42 am

[SOLVED] Warning: mysql_connect(): Can't connect

Post by Frapster »

Ok I've posted my php page to my site and have my database set up correctly. I built a smaller version of my page and tested it out at my personal hosting service but when I post the 'real' version to my company site I get teh following error.
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /var/lib/apache/websites/australiangold.com/color/quiz.php on line 7
Error connecting to mysql
Does anyone recognize this error? Any suggestions on what's wrong with a push in the right direction to fix it?

thanks

Frap
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

it's quite possible the mysql server was down for maintainence or some other reasons by your host. That's where I've gotten that error before.
Frapster
Forum Newbie
Posts: 22
Joined: Thu Jan 06, 2005 8:42 am

fixed

Post by Frapster »

it turns out that I was using hte wrong 'host'. it works now.
Post Reply