The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL - broke it sorta -- how can I fix?

Discussion in 'General Discussion' started by myrem, Jun 5, 2005.

  1. myrem

    myrem Well-Known Member

    Joined:
    Jul 14, 2002
    Messages:
    93
    Likes Received:
    0
    Trophy Points:
    6
    Had an issue a couple of months ago where PHP scripts could not connect to mysql.. I stuffed some things to make it work and I know it's not the way it's supposed to run, but it fixed the immedate problem.

    Now, the problem I have is, when a user is in jailshell telnet (works fine in normal shell) and attempts to run mysql command-line tools, they fail with:

    mysqldump: Got error: 2002: Can't connect to local MySQL server through socket
    '/var/lib/mysql/mysql.sock' (2) when trying to connect

    Works fine in a normal shell.

    Assuming it has something to do with the directory/permissions of where the socket file is located. I'd really like to get MySQL running as CP expects it.

    Currently, my.conf has:
    socket = /var/tmp/mysql.sock

    In /tmp, mysql.sock is linked to:
    mysql.sock -> ../var/tmp/mysql.sock

    /var/tmp/mysqlsock is the real socket file.

    How do I need to re-configure to get this all back to what CP expects?

    Any ideas from those smarter than I? :) Thanks in advance!
     
  2. hicom

    hicom Well-Known Member

    Joined:
    May 23, 2003
    Messages:
    272
    Likes Received:
    0
    Trophy Points:
    16
    mySQL JailShell re-visited

    I'm having the exact same problem on FreeBSD and latest stable cPanel. A user with Jailshell can't access mysql. It returns:

    mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (61) when trying to connect


    However, if I go to /home/virtfs/User/tmp it is there and if I delete it, the whole mySQL server goes down. checked the virtfs/User/etc/ and my.cnf is the exact same settings as the server, so everything is being duplicated fine.

    Any idea why Jailshell is causing this problem ? Thx!
     
Loading...

Share This Page