Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to restart mysql.service: Unit mysql.service is masked in Ubuntu 20.04 after an upgrade from 18.4

I upgraded my ubuntu from ubuntu 18.04 to ubuntu 20.04. On running my MySQL via the terminal, I am not able to access my DBS on running the command

 service MySQL start

I get the error message

Unit mysql.service is masked.
like image 754
stanley mbote Avatar asked Dec 01 '20 14:12

stanley mbote


People also ask

How do I restart MySQL server?

First, open the Run window by using the Windows+R keyboard. Second, type services. msc and press Enter : Third, select the MySQL service and click the restart button.

How do you check MySQL server is installed or not in Ubuntu?

Installation. Once the installation is complete, the MySQL server should be started automatically. You can quickly check its current status via systemd: sudo service mysql status ● mysql.

What does it mean when MySQL service not found?

This means that you do not have the MySQL client program (it’s called mysql, as opposed to the server (daemon) program, which is called mysqld) installed on your machine. Thank you so much. Thank a lot dude !! Thank you so much!!! ARIGATO!! Thanks, Man ! Failed to start mysql.service: Unit mysql.service not found.

Why did my job for MySQL job fail?

Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. Failed to start LSB: Start and stop the mysql database server daemon.

Why can't I start MySQL?

If you have the same issue, then first of all you have to check that, if your disk is full then your MySQL cannot start. Sometime this problem occurring only when if you made some changes in your log files.


1 Answers

If you are receiving the error message

MySQL services are masked

I simply solved mine by running the below code

systemctl unmask mysql.service

Then restart your MySQL

service mysql start
like image 161
stanley mbote Avatar answered Oct 24 '22 01:10

stanley mbote