Problems with MySQL on SuSE: Can't Connect (/var/lib/mysql/mysql.sock)
Hi all
Having trouble with my SuSE box. Basically, MySQL doesn't want to play ball unless I manually start it. Currently when I try to connect to mysql (using the CLI) after boot (using root) I get the following message: Code:
ERROR 2002: Can't connect to local MySQL server through '/var/lib/mysql/mysql.sock' (2) This is a development server, so needs to boot MySQL during startup. Can anybody help me? |
Find a file named mysql.server and create a symlink to this file in rc5.d or rc3.d (rc5 for x-windows and rc3 for command line login)
Code:
ln -s /path/to/mysql.server /etc/init.d/rc5.d/S99mysql |
Worked a charm! Thanks!
|
really Stuck with mysql.sock
hi all,
im a very newbie that got really badly stuck with this mysql.sock..... so, i'm workin on a redhat 9....and i'm trying to set up ACID on snort.....usin mysql all installation went fine, but when i try: $mysql i get an error: ERROR 2002: Can't connect to local MYSQL server through socket '/tmp/mysql.sock' I can't find this mysql.sock :( (neither find / nor locate worked) looked for a while on the web, & tried all the different options proposed: edit etc/my.cnf change /tmp/ to /var/lib/mysql/ :scratch: what am i supposed to so it work.... & when using the apache server to connect acid....guess what, i get the same error plz, help:confused: |
First of all don't change any config file yet because the error means that perhaps the daemon is not running. Check to see if mysqld is running:
Code:
ps -ef|grep mysqld |
i can't even lunch the mysql deamon....& 'im gettin the same error....I even tried reconfiguring with specifying the path of mysql.sock...... & still doesn't work.....
& it's not the hard drive problem..... |
Did you follow the instructions for the installation of mysql? After the installation you must run the ./mysql_install_db script to create the initial users db and after that you must start the daemon with something like: ./safe_mysqld &
So undo the changes you made in my.cnf run those scripts (if not done yet) and if you get this error again take a look at the error logfile created in the directory you specified during installation for keeping the data. The file is named something like: hostname.err Good luck |
Awesome!!
Bathory you hit it! I was having the same problems with Suse 9.1 and mysql.
I kept getting: ERROR 2002: Can't connect to local MySQL server through '/var/lib/mysql/mysql.sock' (2) after installing mysql through YAST. The exact line in needed was: ln -s /usr/share/mysql/mysql.server /etc/init.d/rc5.d/S99mysql I was trying to figure this out for days!!! Thanks |
Quote:
Utkarsh |
All times are GMT -5. The time now is 05:12 PM. |