English French
Check parameters in configuration file:
Close this file, then ensure that the mysqld.sock file exists by running an ls command on the directory where SQL expects to find it:
Compatiblity between different version are not allowed Just install one of them.
dnf list installed | grep -i -e maria -e mysql -e galera
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
Finally, restart the MySQL service so it can attempt to create the socket file again:
How to Access SQL Error Logs
How To Troubleshoot Issues in SQL
How To Troubleshoot Socket Errors in SQL
[id='how-to-troubleshoot-issues-in-sql']
if SQL isn’t behaving as expected, you can obtain more information about the source of the
if the file does not exist, the reason may be that MySQL is trying to create it, but does not have adequate permissions to do so. You can ensure that the correct permissions are in place by changing the directory’s ownership to the mysql user and group:
If the socket file exists, you will see it in this command’s output:
Look at Log files, can be located in `/var/log/mysql/mysqld.log` for MySQL, and `/var/log/mariabd` for MariaDB.
look for the socket parameter in the [mysqld] section of this file. It will look like this:
ls -a /var/run/mysqld/
MariaDB/MySQL Comunnity:
MySQL:
mysqld.pid mysqld.sock mysqld.sock.lock
mysqld --print-defaults