LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Can't connect to local MySql server through socket '/var/run/mysqld/mysqld.sock' (2) (https://www.linuxquestions.org/questions/linux-server-73/cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysqld-sock-2-a-875630/)

thoufiq 04-18-2011 08:44 AM

Can't connect to local MySql server through socket '/var/run/mysqld/mysqld.sock' (2)
 
Hi All,
I am very very new to linux and installing mysql server manually. i have successfully installed mysql server but when i am try to create database, it shows error like this

ERROR 2002 (HY000): Can't connect to local MySql server through socket '/var/run/mysqld/mysqld.sock' (2)

** mysqld is not available in /var/run and error log file is also not available in /var/log **

Any suggestions will be appreciated..

Thanks

jschiwal 04-18-2011 08:51 AM

I sounds like the mysqld service isn't running.

lrtward 04-18-2011 12:25 PM

Agree with jschiwal. Every time I've seen that error it's because msyqld isn't running.

Code:

/etc/init.d mysqld start

vijayjohnyjohn 04-18-2011 01:05 PM

use netstat -lntp | grep mysqld .
Confirm that mysqld is running & than try to connect..!
Chau

thoufiq 04-19-2011 04:35 AM

Quote:

Originally Posted by jschiwal (Post 4327993)
I sounds like the mysqld service isn't running.

Thanks for your suggestion. Anyway when using /etc/init.d mysqld start and sudo service mysql start, it shows like this

root@dhcppc4:~# sudo service start
mysql : unrecognized sevice

root@dhcppc4:~#sudo /etc/init.d mysqld start
sudo : /etc/init.d: command not found

root@dhcppc4:~#sudo /etc/init.d/mysqld start
sudo : /etc/init.d/mysqld: command not found


Also can u pls briefly explain, why log file and mysqld is not present in var/log/... and var/run/...


All times are GMT -5. The time now is 11:30 AM.