Can someone help me? I've tried searching for a few ways to fix it, but no success!
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
To solve this issue you need to stop mysql process either through:
systemctl stop mysql or
service mysql stop after than you’ll need to expose the directory which has the socket configurations to the user who is running the process, this can happen through:
sudo usermod -d /var/lib/mysql/ mysql then go back and start / restart mysql process again through:
systemctl start mysql or
service mysql start If you have this error during the process to install mariadb (exemple) :
Enter current password for root (enter for none): ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2) You have to start mariadb in the first place :
systemctl start mariadb Or if you are using WSL :
service start mariadb