#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    1
    Rep Power
    0
    i have tried the suggested solutions at mysql.com, but am still looking for answer.

    problem:
    as root, i can connect to all databases via sockets and tcpip, but as other users or anonymous, i can only connect to databases vi TCP/IP. this includes the test database.

    e.g., when i attempt to connect to the test database:

    % mysql test

    i receive the error:
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

    however, i can connect via TCP/IP using:
    % mysql -h '127.0.0.1' test

    and this is the weird part:
    as root i can connect via sockets and TCP/IP, no problem.

    any ideas would be greatly appreciated.

    my environment:
    Caldera eDesktop Linux 2.4 (2.2.14)
    mysql 3.22.32, installed via rpm
    skip_networking is OFF

    cheers,
    victor

  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    1
    Rep Power
    0
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by vcosby:
    i have tried the suggested solutions at mysql.com, but am still looking for answer.

    problem:
    as root, i can connect to all databases via sockets and tcpip, but as other users or anonymous, i can only connect to databases vi TCP/IP. this includes the test database.

    e.g., when i attempt to connect to the test database:

    % mysql test

    i receive the error:
    ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)

    however, i can connect via TCP/IP using:
    % mysql -h '127.0.0.1' test

    and this is the weird part:
    as root i can connect via sockets and TCP/IP, no problem.

    any ideas would be greatly appreciated.

    my environment:
    Caldera eDesktop Linux 2.4 (2.2.14)
    mysql 3.22.32, installed via rpm
    skip_networking is OFF

    cheers,
    victor

    [/quote]
    Hi,
    the solution is very simple if you know how to set the sticy bit on mysql socks directory.
    Just issue "chmod 1777 dir_where_mysql_sock_file_is" and you go.
    At least it worked for me. Next you should (or not) set the privs for mysql.sock file 777.
    Bye,
    Rafal

Similar Threads

  1. Apache installation/configuration problem
    By MrSlappyPants in forum Apache Development
    Replies: 32
    Last Post: July 14th, 2005, 03:36 PM
  2. Apache freezing- help
    By mhoyt01 in forum Apache Development
    Replies: 8
    Last Post: July 22nd, 2003, 11:19 AM
  3. Why is mysql an unknown command in SSH?
    By JohnSaunders in forum MySQL Help
    Replies: 14
    Last Post: July 15th, 2002, 05:51 PM
  4. Replies: 9
    Last Post: May 22nd, 2002, 11:58 PM

IMN logo majestic logo threadwatch logo seochat tools logo