If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysql_connect(): Error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-03-05, 10:26
Martin Walters Martin Walters is offline
Registered User
 
Join Date: Mar 2005
Posts: 2
mysql_connect(): Error

May be you can help me. I am learning MySQL at the moment and I have hit a problem which I cannot solve. I have this site called matrixchat.com and I need to access the admin part of it but whenever I goto

http://www.matrixchat.com/matrixadmin/

I get these error messages below

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/matrix/domains/matrixchat.com/public_html/matrixadmin/dbconnection.php on line 2

Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in /home/matrix/domains/matrixchat.com/public_html/matrixadmin/dbconnection.php on line 3

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/matrix/domains/matrixchat.com/public_html/matrixadmin/DbSql.inc.php on line 11
Could not execute

I was wondering if anybody out there knows the solution to the above errors and how I can fix them.

I look forward to hearing from you.

Martin
Reply With Quote
  #2 (permalink)  
Old 03-04-05, 04:46
zinze zinze is offline
Registered User
 
Join Date: Mar 2005
Location: Vienna, Austria
Posts: 22
Hallo Martin

Is the mysql Server still running??
Your application runs on he same machine as the mysql server. php defaults the usage of servername='localhost' to a connection via socket.

if the server is running and the connection problem still occurs, try to connect to 127.0.0.1 instead of localhost (thus forces a connection over IP). Maybe somebody made a change to the mysql server configurationfile

greetings
Erich
__________________

Have a bit more sun in your heart
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On