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.

Can't connect to my mysql

Discussion in 'General Discussion' started by nawialkair, Sep 18, 2007.

  1. nawialkair

    nawialkair Member

    Joined:
    Nov 29, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi
    I tried to make the mysql space be counted in the overall account space using this command:

    /scripts/updatemysqlquota

    after that I got an error :

    #1040 - Too many connections


    in all the sites hosted on the server.

    After restarting the mysql I got a different error


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

    I thought the it was moved so I used this one:
    ln -s /home2/mysql/mysql.sock /var/lib/mysql/mysql.sock

    now I got this error
    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)



    Could someone please help me?


    thanks infront
     
  2. Ranjit_Tech

    Ranjit_Tech Registered

    Joined:
    May 13, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Try putting following lines in /etc/my.cnf to optimise your mysql

    ==========================
    [mysqld]
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    skip-locking
    skip-innodb
    query_cache_limit=1M
    query_cache_size=32M
    query_cache_type=1
    max_user_connections=25
    max_connections=500
    interactive_timeout=10
    wait_timeout=10
    connect_timeout=10
    thread_cache_size=128
    key_buffer=16M
    join_buffer=1M
    max_allowed_packet=16M
    table_cache=1024
    record_buffer=1M
    sort_buffer_size=2M
    read_buffer_size=2M
    max_connect_errors=10
    # Try number of CPU's*2 for thread_concurrency
    thread_concurrency=8
    myisam_sort_buffer_size=64M
    #log-binserver-id=1
    [mysql.server]
    user=mysqlbasedir=/var/lib
    [safe_mysqld]
    err-log=/var/log/mysqld.log
    pid-file=/var/lib/mysql/mysql.pid
    open_files_limit=8192
    [mysqldump]
    quickmax_allowed_packet=16M
    [mysql]
    no-auto-rehash
    #safe-updates
    [isamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    [myisamchk]
    key_buffer=64M
    sort_buffer=64M
    read_buffer=16M
    write_buffer=16M
    [mysqlhotcopy]
    interactive-timeout
    ==========================

    update if it helped out or not ..........
     
  3. nawialkair

    nawialkair Member

    Joined:
    Nov 29, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Thanks but it did not work

    I still get this message when I try to open phpmyadmin:

    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)
     
  4. lmnop

    lmnop Registered

    Joined:
    Nov 18, 2004
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I have the same problem when trying to open phpmyadmin,
    #2002 - The server is not responding (or the local MySQL server's socket is not correctly configured)

    Any idea?
     
  5. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Did you check to be sure the socket does exist?
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If you use /scripts/updatemysqlquota you have to ensure that none of the accounts on the server are overquota or mysql will fail to start. You need to increase the quota on the account or remove some of its files before mysql will start.
     
  7. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    Just run /scripts/upcp --force

    fixed it for me.
     
Loading...

Share This Page