1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error in connecting to MySQL

Discussion in 'C' started by imported_Hamed, Sep 28, 2010.

  1. imported_Hamed

    imported_Hamed New Member

    Joined:
    Sep 13, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    In the name of Allah
    Hello
    I wrote a code to connect to MySQL in Fedora 9 using mysql_real_connect function but I recieved the error by mysql_error (Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)).
    I checked "mysql_config --socket", it returned /var/lib/mysql/mysql.sock
    I checked 'SHOW VARIABLES LIKE '%SOCKET%'', it returned /var/lib/mysql/mysql.osck
    I modified my.cnf file
    But I still recieved this error
    Please, help me how to solve this error

    Thanks in advance
    Hamed
     

Share This Page