CentOS

Troubleshoot Error: Job for mariadb.service failed because the control process exited with error code.

Troubleshoot Error in MariaDB

See “systemctl status mariadb.service” and “journalctl -xe” for details.

While you start the installation of MariaDB on your CentOS 8 system,  you can fail to start the MariaDB services on your system. In this situation, you need some assistance to resolve a particular problem. 

In this article, we will resolve an error that can appear during the installation of Mariadb on your CentOS system. 

Try to start the MariaDB services on your system by running the below-given command:

$ sudo systemctl start mariadb.service

$ sudo systemctl status mariadb.service

To resolve the above-mentioned problem, you need to implement some set of commands on the terminal. Navigate into the data directories and list all files by using the following commands:

$ cd /var/lib/mysql
$ ls

Remove all data from the directories.

$ rm -r *

Again initialize the database directory by running the following command:

$ mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

 Start the mysqld by executing the following commands:

$ sudo systemctl start mysqld

Now, again start the MariaDB and msql service.

$ sudo systemctl start mysql.service
$ sudo systemctl start mariadb.service

You need to authenticate the user login password. Enter the password as follows:

To get the service status run the below-given command:

$ sudo systemctl status mariadb.service

From the above-mentioned information, we have seen how to resolve the above maiadb problem that may arise during the installation of MariaDB on CentOS 8. I hope now you can easily handle this problem on your system.

’

Similar Posts