Current time: 11-23-2024, 09:43 PM Hello There, Guest! (LoginRegister)


Post Reply 
Mysql.sock Problem ( mysqld.sock' (2) )
Author Message
theprincy Offline
Member
***

Posts: 311
Joined: Nov 2008
Reputation: 2
Post: #3
RE: Mysql.sock Problem ( mysqld.sock' (2) )
(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:

1. You forgot to update /etc/mysql/debian.cnf as stated in the my.cnf file (see the following for referenceSmile
Code:
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
[client]
port            = 3306
socket          = /var/run/mysql/mysqld.sock


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 Tongue

Anyway, why did you choose to change the socket path to begin with?

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>
(This post was last modified: 11-29-2010 09:42 PM by theprincy.)
11-29-2010 09:37 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Mysql.sock Problem ( mysqld.sock' (2) ) - theprincy - 11-29-2010 09:37 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)