MySQL Socket problem

Hello guy's i have this problem :

Code:
root@Myname:~ # mysql -p
Enter password:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (38)
root@Myname:~ # chown -R mysql /var/db/mysql
chown: mysql: illegal user name
root@Myname:~ #

I do not know how to fix this please help

System operations : FreeBSD 9.2 x64

In the system there was nothing installed except MySQL
 
Are you sure mysql is running?
What user is mysql running as?
ps aux | grep mysqld

If it is...

What are the permissions on the socket?
ls -l /tmp/mysql.sock
 
Looks like you're missing the needed mysql user account. Did the installation succeed successfully?

Try adding the account by hand:
pw groupadd mysql -g 88
pw useradd mysql -u 88 -g 88 -s /usr/sbin/nologin -d /var/db/mysql -c "MySQL Daemon"
 
wksfighter said:
In the system there was nothing installed except MySQL
And to provide yet another theory: is it possible that only the client tools were installed? Because there are two MySQL ports available; the client and the server. Usually these get installed together, but it's perfectly possible for the client tools to get installed without the server.

And that could lead up to your example above; you'll have the mysql command available but you won't be able to connect to a local server.
 
Back
Top