Cannot start mysql - Unit mysql.service is masked
Colin Law
clanlaw at gmail.com
Thu Sep 30 14:36:20 UTC 2021
On Thu, 30 Sept 2021 at 15:14, 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.
I don't know if it will help, but what does this show?
systemctl status mysql
> # 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
More information about the ubuntu-users
mailing list