Home » Development » How to Start Using MySql / MariaDB Database Service On CentOS
Development

How to Start Using MySql / MariaDB Database Service On CentOS

MariaDB is a service like MySql. It will give you a better speed and performance. It’s base like MySql so you can use this database service like MySql. CentOS is a popular linux operating system (OS). If you are using CentOS server. So you should use MariaDB service for your server to get better performance. If you are using CentOS 7 os on your server. Then if you need to use database service. So you need to use MariaDB database service on your server. You can also install PHP on your server and config your server with PHP. Now install mariadb and start using mariadb by following ways.

How to Start Using MySql / MariaDB Database Service On CentOS

Install MySQL / MariaDB On CentOS

To install MariaDB database service on CentOS. Please use following command with SSH.

login as: root

Use mariadb service yum install command.

yum -y install mariadb-server mariadb

Start MariaDB, MySql Service

systemctl start mariadb

Enable MariaDB service for starts at boot.

systemctl enable mariadb

Check status of MariaDB or MySql service.

systemctl status mariadb

Stop MariaDB or MySql service (If you need).

systemctl stop mariadb

You can check your MySql service by using following command.

mysql

MariaDB Failed To Start?

If you mariadb will failed to start or restart. So mainly restart your server then try to restart mariadb again. If you show this error again then you should change your web hosting server. You can also reinstall mariadb mysql service on your server. To reinstall mariadb you need to remove mariadb from your server and install it again. To remove mariadb from your server using following command.

yum remove mariadb
If you remove mariadb service. You will not loss your MariaDB MySql database and other files. It will be just uninstalled from your system. When you reinstall your mariadb database service. You will get back your database and files again.

In some linux server software will MariaDB as default database service. So if you will Unable to start MySql service. And if you Unable to connect or authenticate mysql database. So please try to start MariaDB service. But if you config your server softwares. Then use MariaDB as your default database service. It will give you more storage engines than MySQL and others.