mysql

Discussion in 'General' started by sudha, Dec 29, 2006.

  1. sudha

    sudha New Member

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

    iam getting the above error message

    i tried all these..

    updatedb
    locatemysqld.sock
    locatemysql.sock

    but i cud'nt find anything

    please help me..
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    netstat -tap

    and

    ps aux | grep mysql
     
  3. sudha

    sudha New Member

    OUTPUT OF netstat -tap

    (Not all processes could be identified, non-owned process info
    will not be shown, you would have to be root to see it all.)
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:32769 *:* LISTEN -
    tcp 0 0 localhost.localdo:32770 *:* LISTEN -
    tcp 0 0 *:netbios-ssn *:* LISTEN -
    tcp 0 0 localhost.localdoma:ipp *:* LISTEN -
    tcp 0 0 *:smtp *:* LISTEN -
    tcp 0 0 *:microsoft-ds *:* LISTEN -
    tcp 0 0 192.168.0.7:60368 192.217.199.105:www TIME_WAIT -
    tcp 0 0 192.168.0.7:35364 213.200.109.22:www ESTABLISHED8559/firefox-bin
    tcp 0 0 192.168.0.7:58374 cs52.msg.dcn.yahoo:5050 ESTABLISHED8526/gaim
    tcp 0 0 localhost.localdo:32769 localhost.localdo:40429 ESTABLISHED-
    tcp 0 0 192.168.0.7:53660 red.as-us.falkag.ne:www TIME_WAIT -
    tcp 0 0 192.168.0.7:53658 red.as-us.falkag.ne:www TIME_WAIT -
    tcp 0 0 localhost.localdoma:ipp localhost.localdo:52588 ESTABLISHED-
    tcp 0 0 192.168.0.7:47183 209.50.189.199:www TIME_WAIT -
    tcp 0 0 192.168.0.7:39536 209.50.189.199:www ESTABLISHED8559/firefox-bin
    tcp 0 0 192.168.0.7:58866 66.249.89.99:www ESTABLISHED8559/firefox-bin
    tcp 0 0 192.168.0.7:58851 66.249.89.99:www ESTABLISHED8559/firefox-bin
    tcp 0 0 localhost.localdo:52588 localhost.localdoma:ipp ESTABLISHED8524/gnome-cups-ico
    tcp 0 0 localhost.localdo:40429 localhost.localdo:32769 ESTABLISHED-
    tcp6 0 0 *:www *:* LISTEN -

    OUT PUT OF ps aux | grep mysql
    sudhagar 14178 0.0 0.1 2936 608 pts/2 R+ 18:28 0:00 grep mysql
     
  4. falko

    falko Super Moderator Howtoforge Staff

    MySQL isn't running at all. Please start it:
    Code:
    /etc/init.d/mysql start
    or
    Code:
    /etc/init.d/mysqld start
    (depends on your distribution).
     
  5. Craig

    Craig New Member

    If you are in the ISPConfig web interface, you can also go to [Management] > [Server] > [Services] and restart it from there. If one or both of these two methods don't work, you definitely should post back because something a bit more serious is wrong.
     
  6. sudha

    sudha New Member

    i got the below error when i tried /etc/init.d/mysql start


    Starting MySQL database server: mysqld...failed.
    Please take a look at the syslog.
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Which errors do you get in your syslog (/var/log/syslog or /var/log/messages)?
     
  8. sudha

    sudha New Member

    my syslog file looks sm thing like this..

    1 Jan 2 13:07:55 localhost syslogd 1.4.1#17ubuntu3: restart.
    2 Jan 2 13:07:55 localhost anacron[8531]: Job `cron.daily' terminated
    3 Jan 2 13:07:55 localhost anacron[8531]: Normal exit (1 job run)
    4 Jan 2 13:09:01 localhost /USR/SBIN/CRON[9340]: (root) CMD ( [ -d /var/lib/php4 ] && find /var/lib/php4/ -type f -cmin +$(/usr/lib/php4/maxlifetime) -print0 | xargs -r -0 rm)
    5 Jan 2 13:10:58 localhost kernel: [4295288.549000] atkbd.c: Unknown key pressed (translated set 2, code 0xaa on isa0060/serio0).
    6 Jan 2 13:10:58 localhost kernel: [4295288.549000] atkbd.c: Use 'setkeycodes e02a <keycode>' to make it known.
    7 Jan 2 13:11:00 localhost kernel: [4295289.817000] atkbd.c: Unknown key released (translated set 2, code 0xaa on isa0060/serio0).
    8 Jan 2 13:11:00 localhost kernel: [4295289.817000] atkbd.c: Use 'setkeycodes e02a <keycode>' to make it known.
    (translated set 2, code 0xaa on isa0060/serio0).

    ...

    .
    .
    .

    47,1 Top
     
  9. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /var/run/mysqld
    ?

    Which distribution do you use?
     
  10. sudha

    sudha New Member

    The output of ls -la /var/run/mysqld is..
    total 8
    drwxr-xr-x 2 mysql root 4096 2006-12-15 20:46 .
    drwxr-xr-x 16 root root 4096 2007-01-04 14:36 ..
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Looks ok. What's the output of
    Code:
    updatedb
    locate mysqld.sock
    ?
    What exactly did you do before this error occurred for the first time?
    Which distribution do you use?
     
  12. sudha

    sudha New Member

    fatal error: updatedb: You are not authorized to create a default slocate database!

    so i did sudo updatedb...
    and did locate mysqld.sock
    this did not give me anything.
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Please do this as root.
     
  14. sudha

    sudha New Member

    ...this is what i got when i did.


    root@sudha:/# updatedb
    root@sudha:/# locate mysqld.sock
    root@sudha:/#


    ...and iam using UBUNTU.
     
  15. falko

    falko Super Moderator Howtoforge Staff

    And what's the output of
    Code:
    locate mysql.sock
    ?
    Also, did you try
    Code:
    /etc/init.d/mysql start
    as root?
     
  16. sudha

    sudha New Member

    i got this when i did "/etc/init.d/mysql start"

    Starting MySQL database server: mysqld...failed.
    Please take a look at the syslog.
    /usr/bin/mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!



    i checked for mysqld.sock it does not exisit in /var/run/mysqld/

    also i did "locate mysqld.sock" and "locate mysql.sock " i could'nt able to find it.:(

    i did all this as root.
     
    Last edited: Jan 19, 2007
  17. falko

    falko Super Moderator Howtoforge Staff

    What exactly did you do before this error occurred for the first time? I guess MySQL was running fine in the beginning because otherwise you couldn't have installed ISPConfig.
     
  18. sudha

    sudha New Member

    I dont really remember what did i do in the begining, i was
    installling php and mysql everything went fine i got my php
    installed and after installing mysql i just tried to create
    a table to test if its been properly installed , but i could'nt
    coz it said " The server is not responding (or the local MySQL server's socket is not correctly configured) "..
    then i tried locating mysql.sock and mysqld.sock it could'nt find those anywhere.
    basically mysql.sock or mysqld.sock does'nt exists

    so what is the solution for this !! how can i fix this...should i need to completly remove the mysql folder from "var/www/mysql" and install it again. PLease advice me.
     
    Last edited: Jan 23, 2007
  19. falko

    falko Super Moderator Howtoforge Staff

    And you really didn't do anything in between?
    You can try this:
    Code:
    apt-get --purge remove mysql-client mysql-server
    This will remove MySQL. Afterwards you can install it again.
     
  20. sudha

    sudha New Member

    Thanks ....
    all these problems seems to be getting sorted out , now i have a new issue!!!
    i recently changed the /etc/sudoers file , so i cannot use sudo and i forgot the root password.If i try to do
    apt-get --purge remove mysql-client mysql-server
    i get
    "E: Could not open lock file /var/lib/apt/lists/lock - open (13 Permission denied)
    E: Unable to lock the list directory"

    so i tried doin it as root by using sudo ...but it says
    "sudhagar is not in the sudoers file. This incident will be reported. "

    Please help me.

    :(
     

Share This Page