Bobcares

MariaDB failed to start – Reasons and quick solutions

by | Nov 10, 2019

MariaDB failed to start errors literally make websites standstill.

One of the typical error is Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.

Unfortunately, this error may happen once the MariaDB installation has gone wrong or when an option file contains an invalid option, etc.

At Bobcares, we often get requests from our customers to fix MariaDB failed to start error as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix these errors.

 

Why MariaDB failed to start error?

There are many reasons that cause MariaDB to fail to start.

How do you find the reasons that make MariaDB fail to start?

This is where the error log comes as a help. Whenever we try to restart the MariaDB, the reason for the failure will certainly be written in the error log.

In Linux, the error log located in /var/log/mysql and C:\Program Files\MariaDB x.y\data for Windows.

Some common reasons include,

  1. Invalid option or option Value in the option file.
  2. When the critical system tables are either missing or are in the wrong location.
  3. Permission error on the directory.
  4. InnoDB crash.

Here, let’s see how our Support Engineers fix these problems.

 

MariaDB failed to start – How we fixed

At Bobcares, where we have more than a decade of expertise in managing servers, we see many customers face problems with the MariaDB SQL server.

Now, let’s see the major reasons for MariaDB errors and how our Support Engineers fix this error.

 

1. Invalid option or option Value in the option file

Sometimes, the bad configuration settings in the option file block the MariaDB from start. Also, the default option file is called my.cnf.

We can check which configuration options MariaDB server will use from its option files by running the following command.

mysqld --print-defaults

Whenever an option file contains an invalid option or an invalid option value, it doesn’t allow MariaDB to start.

Occasionally, this may happen when we upgrade to a new version of MariaDB, because the valid values for options may change in new versions of MariaDB.

Then, the error may show the following error.

140514 12:19:37 [ERROR] /usr/local/mysql/bin/mysqld: unknown variable 'option=value'.

This error indicates that valid values in an option file may change. Then, our Support Engineers make sure that the option file is set up as correctly or not.

When the option is completely invalid, we remove it from the option file and if the option’s name has changed, then we fix the name. Also, we change the option’s value to a valid one, if the option’s valid values have changed.

In addition, the error may arise due to a simple typo. So, we will then fix the typo.

 

2. Missing system tables

Similarly, missing system tables can also result in MariaDB failure.

In such cases, while checking the error log, we often see the following error.

System error 1067 has occurred.
Fatal error: Can't open privilege tables: Table 'mysql.host' doesn't exist

This error says that the critical system tables are either missing or are in the wrong location. Usually, it occurs after the MariaDB upgrade, if the option files set the basedir or datadir to a non-standard location and still the new server is using the default location.

Therefore, our Support Engineers make sure that the basedir and datadir variables are correctly set.

 

3. Improper MariaDB installation

Recently, one of our customers had a problem with his SQL Server. He got an error when he tried to start the MariaDB. The error said,

"Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details".

So. our Support Engineers installed the MariaDB properly as below.

1. Initially, we uninstalled the mariadb, maridb-server packages.

2. Then, we removed the directory /var/lib/mysql and reinstalled the Mariadb, Mariadb-server packages.

3. At last, we enabled and started the mariadb service.

systemctl enable mariadb

systemct start mariadb

This is how we fixed the error.

 

[Need assistance to fix MariaDB errors? We’ll help you.]

 

Conclusion

In short, there are many reasons that MariaDB fails to start. It occurs once the MariaDB installation has gone wrong or when an option file contains an invalid option or an invalid option value and etc. Today, we saw how our Support Engineers assisted our customers to solve the error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF