Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,356

    Default /easyapache took down MySQL on the whole server?

    Here is the error for every site, and every option when trying to work with MySQL:

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

    It's like it's gone completely.

    I chose the advanced option but left all the default options and added GD, cross protect., and raised apache limit.

    Any thoughts?


    Another thought is a step by step on upgrading without easy/apache/ if this was a populated server the problem would be huge...

    Thanks,

    cPanel.net Support Ticket Number:

  2. #2
    Member
    Join Date
    Feb 2003
    Location
    Sachse, TX
    Posts
    567

    Default Re: /easyapache took down MySQL on the whole server?

    Originally posted by DWHS.net
    Here is the error for every site, and every option when trying to work with MySQL:

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

    It's like it's gone completely.

    I chose the advanced option but left all the default options and added GD, cross protect., and raised apache limit.

    Any thoughts?


    Another thought is a step by step on upgrading without easy/apache/ if this was a populated server the problem would be huge...

    Thanks,

    cPanel.net Support Ticket Number:
    I thought MySQL and Apache are two completely different entities.. Have you restarted MySQL from WHM?

    cPanel.net Support Ticket Number:

  3. #3
    Member
    Join Date
    Aug 2002
    Posts
    1,052

    Default

    ps -auxxx | grep mysql

    Does this show a bunch of MySQL processes with your grep process at the bottom?

    If so, then:

    ls -la /tmp/mysql.sock

    Does this return a result? Or do you get an error like: /bin/ls: /tmp/nothing: No such file or directory

    If you don't get an error, then:

    edit /etc/my.cnf
    insert under [mysqld]: socket=/var/lib/mysql/mysql.sock
    save & close.
    service mysql stop
    service mysql start

    If you do get an error, then: service mysql start

    cPanel.net Support Ticket Number:

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    4

    Default

    I have the same problem and followed those steps but it didn't work.

    ls -la /tmp/mysql.sock
    lrwxrwxrwx 1 root root 25 Apr 17 20:28 /tmp/mysql.sock -> /var/lib/mysql/mysql.sock

    I then edited the /etc/my.cnf file

    root@river [~]# service mysql stop
    No mysqld pid file found. Looked for /var/lib/mysql/river.tsnhost.com.pid.
    root@river [~]# service mysql start
    root@river [~]# Starting mysqld daemon with databases from /var/lib/mysql
    030619 22:31:26 mysqld ended

    cPanel.net Support Ticket Number:

  5. #5
    Member
    Join Date
    Aug 2002
    Posts
    1,052

    Default

    Originally posted by grey259
    I have the same problem and followed those steps but it didn't work.

    ls -la /tmp/mysql.sock
    lrwxrwxrwx 1 root root 25 Apr 17 20:28 /tmp/mysql.sock -> /var/lib/mysql/mysql.sock

    I then edited the /etc/my.cnf file

    root@river [~]# service mysql stop
    No mysqld pid file found. Looked for /var/lib/mysql/river.tsnhost.com.pid.
    root@river [~]# service mysql start
    root@river [~]# Starting mysqld daemon with databases from /var/lib/mysql
    030619 22:31:26 mysqld ended

    cPanel.net Support Ticket Number:
    tail -f /var/lib/mysql/river.tsnhost.com.err what do you see?

    What are the permissions/ownership like on /var/lib/mysql and /var/lib/mysql/* ?

    cPanel.net Support Ticket Number:

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,356

    Default

    I thought MySQL and Apache are two completely different entities.. Have you restarted MySQL from WHM?
    I did the reboot from my sql and got the error from above, but i rebooted the server and it kicked in.

    To be honest I am not sure what the heck this is and how a reboot can differ from the restart services.

    I also don't know why easy Apache would of effected this. I also did the upgrade 7, so it may of this been that some how.

    It's All fixed now from the reboot. I guess I should of rebooted before posting. Shoulda, woulda,



    Thanks for all the help,

    cPanel.net Support Ticket Number:

  7. #7
    Member nitromax's Avatar
    Join Date
    Feb 2002
    Posts
    189

    Default

    I had been running MySQL 4 for over a month with no problems. Then I updated to WHM 7.1.0 cPanel 7.1.0-R20. Still no problems at this point. Then I updated /scripts/easyapache to the July 1st build. At that point MySQL gave me the following error:

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)


    Then after trying some of the suggestions the error changed to this:

    Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)


    I followed the directions in all of the related posts and nothing seemed to work for me. So here is what I did to finally make it work:

    I read a post at the RackShack forum that the following needed to be in the /etc/my.cnf file:

    [mysqld]
    set-variable = max_connections=500

    [client]
    port = 3306
    socket = /tmp/mysql.sock
    [mysqld]
    port = 3306
    socket = /tmp/mysql.sock


    I only had the first 2 lines, so I added the [client] and [mysqld] parts.


    Then I shut down mysql and chkservd with the following commands:

    service mysql stop
    /etc/rc.d/init.d/chkservd stop


    Then I removed the following files:

    rm -rf /tmp/mysql.sock
    rm -rf /var/lib/mysql/mysql.sock


    Now restart mysql and chkservd with the following commands and mysql will create the mysql.sock file in the /tmp directory as oulined in the updated my.cnf file:

    service mysql start
    /etc/rc.d/init.d/chkservd start


    Now create the softlink with this:

    ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock


    There were a couple of variations in that last last command to create the softlink. I guess it depends on where mysql creates the mysql.sock file when it starts. So if you are trouble shooting you might shut down mysql as shown above, then remove the mysql.sock files. Then restart mysql as shown above and see where it creates the mysql.sock file. If it creates it in the /tmp directory then you need the softlink command shown above. If it creates the mysql.sock file in the /var/lib/mysql directory then you problaby need to use the softlink command like this as shown in some of the other related posts:

    ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock


    That worked for me. Hope this helps someone down the line.

    cPanel.net Support Ticket Number:

  8. #8
    Member
    Join Date
    Jan 2003
    Posts
    27

    Default

    I am having the same error, I have tried all of the above and i still have the problem


    Any more suggestions?

    cPanel.net Support Ticket Number:

  9. #9
    cPanel Partner NOC cPanel Partner NOC Badge DWHS.net's Avatar
    Join Date
    Jul 2002
    Location
    LA, Costa RIca
    Posts
    1,356

    Default

    Check this out,

    I just had this happen yesterday:

    http://forums.cpanel.net/showthread....hlight=symlink

    -Charles

    cPanel.net Support Ticket Number:

Similar Threads & Tags
Similar threads

  1. MySQL SOCK Goes Away During EasyApache Update
    By rvelton in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-18-2011, 08:17 PM
  2. EasyApache and MySQL
    By Serverji in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-31-2009, 06:02 AM
  3. Use System Mysql module in easyapache
    By manokiss in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-29-2004, 10:17 AM
  4. easyapache & updating MYSQL
    By jdearing in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-21-2004, 06:25 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube