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?
as of 7-28-17 I had to do this on a new install. Newbie here might save someone some time. It was a real pain.
OK HERE IS THE DEAL!!!!! INSTALL APACHE _ NO PROB
INSTALL MYSQL _PROBLEM pacman -S mysql then before starting service
MUST UNCOMMENT INNODB IN:
nano /etc/mysql/my.cnf
then must initialize datadirectory before starting service:
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
You need to initialize the MariaDB data directory prior to starting the service. This can be done with mysql_install_db command, e.g.: mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql Optional dependencies for mariadb galera: for MariaDB cluster with Galera WSREP perl-dbd-mysql: for mysqlhotcopy, mysql_convert_table_format and mysql_setpermission