Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2005
    Posts
    2

    Unanswered: 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

  2. #2
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •