Failed to start mysql.service: Unit mysql.service is masked.
If you encounter the error “Failed to start mysql.service: Unit mysql.service is masked.”, you can try the following steps to fix it.
This typically happens when mysql.service
is linked to /dev/null
.
Remove old database setup:
1
rm -r /var/lib/mysql*
Install a new database system:
1
mysql_install_db -u mysql
Unmask the service:
This will re-enable the service for systemd.1
systemctl unmask mysql.service
Start the service:
1
service mysql start
- 标题: Failed to start mysql.service: Unit mysql.service is masked.
- 作者: jicky huang
- 创建于 : 2016-03-06 12:56:44
- 更新于 : 2025-10-05 20:36:03
- 链接: https://www.hxfund.cn/2016/03/06/failed-to-start-mysql-service-unit-mysql-service-is-masked/
- 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论