I can't start mysql and when I run any type of start command, whether it be systemctl start mysql
or service mysql start
, I get the same error:
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
And when I run systemctl status mysql.service
I get this: https://hatebin.com/iefidgteub
Or if I run mysql
I get ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
so I looked around, and I ran find / -type s
to try and locate the mysqld.sock
file but in the output, mysqld.sock
wasn't one of the files it returned
Then, if I try running mysqld
, I get https://hatebin.com/nyszqpalec
/var/lib/mysql-files
does not exist and does not contain the mysql files. In many cases the default location is/var/lib/mysql
. Check whether they are already there, or do afind
foribdata1
. If they already exist somewhere else, set the path in/etc/my.cnf
usingdatadir=/var/lib/mysql
./var/lib/mysql
does exist, but in/etc/mysql/mariadb.conf.d/50-server.cnf
,datadir=
is already set to/var/lib/mysql
and in/etc/mysql/mysql.conf.d/my.cnf
it's set to the same thing, though I did find out that in/etc/mysql/my.cnf
one of the!includedir
was set to/etc/mysql/conf.d
instead of/etc/mysql/mysql.conf.d
where all of those configuration files are, so I updated it and tried to start mysql but I still get the same error/var/lib/mysql-files
somewhere. If you want a practical fix and don't mind a hack,mv /var/lib/mysql /var/lib/mysql-files
. Otherwise you need to sort through the config files that are being read.mysqld.sock
file? Would that have anything to do with it?