Find the answer to your Linux question:
Results 1 to 6 of 6
Hello! I can`t connect to the mysql server! Last week worked just fine! I am using opensuse 10.3! I know the mysqld is the server but i can`t find it ...
  1. #1
    Linux Newbie bobescalin2005's Avatar
    Join Date
    Oct 2005
    Posts
    167

    Angry Can't connect to local MySQL server

    Hello! I can`t connect to the mysql server! Last week worked just fine! I am using opensuse 10.3! I know the mysqld is the server but i can`t find it to start and i start the mysql
    Code:
    $ su -c "/etc/rc.d/mysql start"
    Starting service MySQL warning: /var/lib/mysql/mysql.sock didn't appear within 30 seconds
                                                                          done
    when i want to see if the server run:
    Code:
     su -c "mysqladmin version"
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
    and it doesn`t exist the mysql.sock!
    Code:
    $ mysqladmin -u root password
    mysqladmin: connect to server at 'localhost' failed
    error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)'
    Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists!
    How can i start the server? The server is in:
    Code:
    $ whereis mysqld
    mysqld: /usr/sbin/mysqld /usr/share/man/man8/mysqld.8.gz
    but when i go to execute manually...
    Code:
    $ /usr/sbin/mysqld
    080526 21:40:12 [ERROR] Can't find messagefile '/var/lib/mysql/share/mysql/english/errmsg.sys'
    080526 21:40:12 [ERROR] Aborting
    Have you have any ideas? Thanks!

    Cheers!
    Registered Linux user #471256
    http://counter.li.org
    Don`t give up so easy...
    calin

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    1,946
    Try these in sequence, if the first doesn't work, the second,...

    mysqld_safe &
    /usr/bin/mysqld_safe
    /usr/bin/mysqld_safe --user=mysql &

  3. #3
    Linux Newbie bobescalin2005's Avatar
    Join Date
    Oct 2005
    Posts
    167
    Thanks for the reply but it doesn`t work! i have the same error!
    Cheers!
    Registered Linux user #471256
    http://counter.li.org
    Don`t give up so easy...
    calin

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    Verify there are no hung mysql processes (if there are, kill them off):

    Code:
    ps -ef | grep mysql
    Try and start mysql normally:

    Code:
    /etc/init.d/mysql start
    If it fails, look at your syslog for errors:

    Code:
    tail -50 /var/log/messages
    Instead of "trying a bunch of random things," troubleshoot the problem.

    MySQL Documentation

  5. #5
    Linux Newbie bobescalin2005's Avatar
    Join Date
    Oct 2005
    Posts
    167
    It isn`t working!

    Cheers!
    Registered Linux user #471256
    http://counter.li.org
    Don`t give up so easy...
    calin

  6. #6
    Linux Newbie bobescalin2005's Avatar
    Join Date
    Oct 2005
    Posts
    167
    EVRIKA!!! It works! Remember when..
    Code:
    /usr/sbin/mysqld
    080527 13:36:41 [ERROR] Can't find messagefile '/var/lib/mysql/share/mysql/english/errmsg.sys'
    080527 13:36:41 [ERROR] Aborting
    that file was in /usr/share/mysql/.....I have made a folder in /var/lib/mysql/share
    with rwx permissions for the group and owner mysql and then copy all the files from /usr/share/mysql to /var/lib/mysql/share/mysql and made again the permission rwx group and owner mysql for the folder /var/lib/mysql and then:
    Code:
    $ su -c "/etc/init.d/mysql start"
    and works great! Hope this helps someboby!

    Cheers!
    Registered Linux user #471256
    http://counter.li.org
    Don`t give up so easy...
    calin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...