Mysql.sock Problem ( mysqld.sock' (2) ) - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Mysql.sock Problem ( mysqld.sock' (2) ) (/thread-12280.html) |
Mysql.sock Problem ( mysqld.sock' (2) ) - theprincy - 11-29-2010 08:13 PM I have this problem on a server, I have unsuccessfully tried all the solutions that are being asked to be here on the forum and on google, I changed the settings in the my.cnf file on the socks but nothing has changed ... files below my.cnf, and mysql.err mysql.info Code: # This will be passed to all mysql clients /var/log/mysql.log 0 byte /var/log/mysql.err 0 byte Note also if file my.cnf , you can see a different address mysql always just look in '/var/run/mysqld/ the file socks , how can it be? /var/log/syslog Code: Nov 29 11:07:17 london mysqld_safe[27531]: A mysqld process already exists ps aux Code: mysql 26488 0.0 0.9 160112 20492 pts/1 Sl 10:53 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysql/mysqld.pid --..... I tried to kill the process, but reboots itself RE: Mysql.sock Problem ( mysqld.sock' (2) ) - kilburn - 11-29-2010 09:21 PM So, you changed the socket path from "/var/run/mysqld/mysqld.sock" to "/var/run/mysql/mysqld.sock" in your /etc/mysql/my.cnf file. Nevertheless: 1. You forgot to update /etc/mysql/debian.cnf as stated in the my.cnf file (see the following for reference Code: # Remember to edit /etc/mysql/debian.cnf when changing the socket location. 2. Are you sure that the /var/run/mysql folder exists and is owned by the mysql user/group? I bet it doesn't Anyway, why did you choose to change the socket path to begin with? RE: Mysql.sock Problem ( mysqld.sock' (2) ) - theprincy - 11-29-2010 09:37 PM (11-29-2010 09:21 PM)kilburn Wrote: So, you changed the socket path from "/var/run/mysqld/mysqld.sock" to "/var/run/mysql/mysqld.sock" in your /etc/mysql/my.cnf file. Nevertheless: cat /etc/mysql/debian.cnf # Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = debian-sys-maint password = socket = /var/run/mysql/mysqld.sock [mysql_upgrade] user = debian-sys-maint password = socket = /var/run/mysql/mysqld.sock basedir = /usr (11-29-2010 09:21 PM)kilburn Wrote: 2. Are you sure that the /var/run/mysql folder exists and is owned by the mysql user/group? I bet it doesn't yes ls -asl /var/run/mysql totale 12K 4,0K drwxr-xr-x 2 mysql root 4,0K 29 nov 10:53 . 4,0K drwxr-xr-x 14 root root 4,0K 29 nov 09:45 .. 4,0K -rw-rw---- 1 mysql mysql 6 29 nov 10:53 mysqld.pid 0 srwxrwxrwx 1 mysql mysql 0 29 nov 10:53 mysqld.sock --------- Stopping MySQL database server: mysqld. Starting MySQL database server: mysqld. Checking for corrupt, not cleanly closed and upgrade needing tables.. --- Connection failed: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) but if I access via terminal mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2783 Server version: 5.0.51a-24+lenny4 (Debian) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> RE: Mysql.sock Problem ( mysqld.sock' (2) ) - kilburn - 11-30-2010 12:50 AM From the default /etc/init.d/mysql file (debian lenny): Code: MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" Hence, if the socket path is correctly defined in /etc/mysql/debian.cnf you should not be getting this error, unless your mysqladmin is broken somehow. Hence, you should try executing: Code: mysqladmin --defaults-file=/etc/mysql/debian.cnf ping RE: Mysql.sock Problem ( mysqld.sock' (2) ) - theprincy - 11-30-2010 01:25 AM mysqladmin --defaults-file=/etc/mysql/debian.cnf ping mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysql/mysqld.sock' (111)' Check that mysqld is running and that the socket: '/var/run/mysql/mysqld.sock' exists! ls -asl /var/run/mysql/ totale 12K 4,0K drwxr-xr-x 2 mysql root 4,0K 29 nov 16:24 . 4,0K drwxr-xr-x 14 root root 4,0K 29 nov 13:51 .. 4,0K -rw-rw---- 1 mysql mysql 6 29 nov 16:23 mysqld.pid 0 -rw-r--r-- 1 mysql mysql 0 29 nov 16:24 mysqld.sock ... is a bug ? s xa | grep "mysql" 15628 pts/1 Sl 0:01 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysql/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysql/mysqld.sock 15629 pts/1 S 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld 15665 pts/1 R+ 0:00 grep mysql 30815 pts/1 S 0:00 /bin/sh /usr/bin/mysqld_safe RE: Mysql.sock Problem ( mysqld.sock' (2) ) - kilburn - 12-01-2010 02:46 AM Try to connect with the "debian-sys-maint" user instead of root. I bet it doesn't have permission to connect without password (thus causing the error). RE: Mysql.sock Problem ( mysqld.sock' (2) ) - theprincy - 12-01-2010 09:33 AM mysql -udebian-sys-maint -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3782 Server version: 5.0.51a-24+lenny4-log (Debian) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysqld.sock' (2) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysqld.sock' (2) RE: Mysql.sock Problem ( mysqld.sock' (2) ) - kilburn - 12-01-2010 09:14 PM At this point it is pretty clear that this has nothing to do with ispcp itself. Hence, you should probably go to the debian's bug tracking page... RE: Mysql.sock Problem ( mysqld.sock' (2) ) - theprincy - 12-01-2010 11:45 PM for now I solved with a symbolic link , I'll make a ticket there too and we'll see |