Mysql error - Can't connect to local MySQL server through socket mysqld.sock

preview_player
Показать описание
i get error like this :

You can fixing by : sudo apt-get install mysql-server

===================================
update 15 september2019

if still not worked, you need to kill mysql process and restart the mysql

ps -A|grep mysql
sudo pkill mysql
ps -A|grep mysqld
sudo pkill mysqld

sudo service mysql restart
Рекомендации по теме
Комментарии
Автор

after trying many things, it was the only thing worked! thank you!

ioannagkartzonika
Автор

Thanks man! It works! May God bless you!

TheDagoberto
Автор

Its work. Thank you so much, God bless you 😊

sitifarida
Автор

Man, it does not solve the problem, it creates a new installation and where the existing databases are not ...

paivamarcelo
Автор

What was the problem that was occurred???

abhishekm
Автор

fedora 8 not work
mysqlcheck: Got error: 2002: Can't connect to local MySQL server through socket '/var /lib/mysql/mysql.sock'

jordancomitevski
Автор

Please have you any solution for windows, i have same error on it ?

mouloudisoumia
Автор

I did this several times and some reboots later it happens again. The problem is not the socket location. When the program starts well it creates a a folder and the socket inside. Even the .log is not created when we have this problem. I think I have this problem since I installed the PHP package. PHP package installs PHP-MySQL package. Maybe it is a conflict. But I try to search for services using the port 3306 and no one is using. I don't know...

TheRagreis
Автор

can you suggest me the steps for MacOs.

saiyyamd.chhetri
Автор

Are we installing mysql again and previous data will be lost?

harshadaraut
Автор

why after I run 'sudo apt-get install mysql-server' the mysqld.sock file still not created?
I am using ubuntu 14.04

bobbysugianto
Автор

not working
can you please mention ubuntu version

sagargajre
Автор

guys I was having the same problem just
Just go to database settings and turn on the option "Connect directly from my computer" and that should do the job

rahat
Автор

how to solve if the problem in hosting. Please give a solution?

belajarapasaja
Автор

ps -A|grep mysql
sudo pkill mysql
ps -A|grep mysqld
sudo pkill mysqld


sudo service mysql restart


mysql: unrecognized service

jordancomitevski
Автор

pls i wanna this by windows pls help help
email me

nihalahmed
Автор

helpe me!,
I never ask for a password.
what is the password for user root ?

diegovilcavela