I'm trying to use MySQL on Arch Linux. it is already installed but this error comes up when I try to connect:
connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2 "No such file or directory")'
I've looked for /etc/my.cfg but the file does not exist.
Something must have gone wrong during the installation.
How can I "purge" MariaDB and reinstall it?
If you're using
archlinuxit is a vital idea to understand the package manager (pacman). For the question about/etc/my.cfgyou can runthere you will see that the file is actually called:
Arch linux will not configure the package for you, that is part of the arch philosophy. It will provide example configurations, and even provide you with a
systemdunit filebut it is your responsibility to ensure that the configuration is correct and actually start the daemon.
reinstall
Since the word reinstall is in the title of the question and someone might find this question thanks to that: To reinstall
mariadbyou simply dopacmanwill reinstall a package that is already installed, there is no need to remove the package (for completeness, package removal happens withpacman -R)