Find the answer to your Linux question:
Results 1 to 4 of 4
Can't connect to local mysql server through socket '/var/lib/mysql/mysql.sock' (2) This is what the shell says when i type 'mysql'. Any suggestions on how to make it work thanks for ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2003
    Posts
    6

    mysql.....again


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

    This is what the shell says when i type 'mysql'. Any suggestions on how to make it work
    thanks for any help
    Tyrone

  2. #2
    Linux Guru
    Join Date
    Apr 2003
    Location
    London, UK
    Posts
    3,284
    is the mysql server started?

    try:
    Code:
    netstat -ant | grep :3306
    If you dont get any output, then its not started.

    cd to the directory where you installed mysql, then run as root:
    Code:
    ./bin/safe_mysqld --user=mysql
    or it may be (i cannot remember):
    Code:
    ./bin/mysqld_safe --user=mysql
    If you used an RPM to install it, then the chances are that it is not installed anywhere inparticular (thanks redhat!), so just run safe_mysqld or mysqld_safe (i cannot remember).

    Jason

    Jason

  3. #3
    Linux Engineer
    Join Date
    Jul 2003
    Location
    Farnborough, UK
    Posts
    1,305
    As root type

    service mysqld start

    hth
    Lansbury's Lido

    thekiadriver on #linuxforums - fleetingly

  4. #4
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Check if your mysql-processes are up and running...

    Code:
    ps -efl | grep mysql
    If so verify if mysql have binded a socket with

    Code:
    netstat -anp |grep LIST |grep mysql
    If you dont get any hits on thoose 2 commands something is wrong with mysql, have you verifed that its installed and are attempt to start??

Posting Permissions

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