Cannot start mysql - Unit mysql.service is masked
Shu Shang
yzshangs at 126.com
Thu Sep 30 14:12:19 UTC 2021
I have asked this on askubuntu and no one replied so I thought of asking
here.
I am trying to install phpMyAdmin and it complained about not able to
connect to MySQL server. It seems that the relevant services are not
started but I cannot start it.
Here is the results of some commands I run.
# mysql -v
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock' (2)
# service mysql stop
# service mysql start
Failed to start mysql.service: Unit mysql.service is masked.
# service mysqld stop
# service mysqld start
Failed to start mysqld.service: Unit mysqld.service is masked.
# systemctl unmask mysql.service
# service mysql start
Failed to start mysql.service: Unit mysql.service is masked.
# systemctl unmask mysqld.service
# service mysqld start
Failed to start mysqld.service: Unit mysqld.service is masked.
Update:
$ file /lib/systemd/system/mysql.service
/lib/systemd/system/mysql.service: ASCII text
$ file /lib/systemd/system/mysqld.service
/lib/systemd/system/mysqld.service: cannot open
`/lib/systemd/system/mysqld.service' (No such file or directory)
--
From RavenclawOIer with love
More information about the ubuntu-users
mailing list