Cannot start mysql - Unit mysql.service is masked
尚书
yzshangs at 126.com
Thu Sep 30 15:05:02 UTC 2021
I have solved this after some deletions. Still thanks to all!
https://askubuntu.com/questions/1366275/cannot-start-mysql-service-unit-mysql-service-is-masked
TLDR: purging doesn't remove /etc/mysql and /var/lib/mysql, hence dirty data are still there (God knows when I corrupted the data)
At 2021-09-30 22:12:19, "Shu Shang" <yzshangs at 126.com> wrote:
>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
>
>
>--
>ubuntu-users mailing list
>ubuntu-users at lists.ubuntu.com
>Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20210930/da4edd92/attachment.html>
More information about the ubuntu-users
mailing list