PDA

View Full Version : How to fix messed up mysql



shajal16
2018-05-08, 20:55
hello I am Using kali 18.2.I probably messed up my mysql while trying to install xampp and tweaked some settings. right now I am not able to use mysql at all. when ever I try to use .. it shows my this error
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2 "No such file or directory") '

... cant access mysql -u root ....

mysql -u root -p does letme enter password but next the same error.
# service mysql status shows me this output
● mysql.service - LSB: Start and stop the mysql database server daemon
Loaded: loaded (/etc/init.d/mysql; generated)
Active: active (exited) since Tue 2018-05-08 16:13:27 EDT; 1min 34s ago
Docs: man:systemd-sysv-generator(8)
Process: 18544 ExecStart=/etc/init.d/mysql start (code=exited, status=0/SUCCES

May 08 16:13:27 shakali systemd[1]: Starting LSB: Start and stop the mysql datab
May 08 16:13:27 shakali systemd[1]: Started LSB: Start and stop the mysql databa


grep mysql /var/log/daemon.log
May 8 15:56:29 shakali systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
May 8 15:56:29 shakali systemd[1]: Started LSB: Start and stop the mysql database server daemon.
May 8 16:05:20 shakali systemd[1]: Stopping LSB: Start and stop the mysql database server daemon...
May 8 16:05:20 shakali systemd[1]: Stopped LSB: Start and stop the mysql database server daemon.
May 8 16:13:27 shakali systemd[1]: Starting LSB: Start and stop the mysql database server daemon...
May 8 16:13:27 shakali systemd[1]: Started LSB: Start and stop the mysql database server daemon.

even when i tried to purge mysql while trying to delete phpmyadmin database same error occured. How can I fix this?

grid
2018-05-09, 13:42
I'd try using apt remove mysql, then run apt install mysql.

shajal16
2018-05-09, 13:56
Thank you. It removed mysql . Forgot to reply in the thread. Solving the issue went to sleep 😛

grid
2018-05-16, 15:41
You're welcome...glad it worked :)