<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><p style="margin: 0;"><br></p><p style="margin: 0;"><br></p><p style="margin: 0;"><br></p><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard">I have solved this after some deletions. Still thanks to all!<br></div><p style="margin: 0;"><br>https://askubuntu.com/questions/1366275/cannot-start-mysql-service-unit-mysql-service-is-masked</p><div>TLDR: purging doesn't remove /etc/mysql and /var/lib/mysql, hence dirty data are still there (God knows when I corrupted the data)</div><div><br></div><div><br></div><pre>At 2021-09-30 22:12:19, "Shu Shang" <yzshangs@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@lists.ubuntu.com
>Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
</pre></div><br><br><span title="neteasefooter"><p> </p></span>