Installing MariaDB for Ubuntu

Time:2022-2-22

MariaDB is a branch of MySQL, which is mainly used to replace mysql. It is GPL licensed, open source and fully compatible with MySQL, including API and command line. By the founder of MySQLMichael WideniusLead development. Why develop MariaDB? Because MySQL has long been sold to sun, and sun was acquired by Oracle, that is to say, the ownership of MySQL is in Oracle’s hands.
Maria isMichael WideniusDaughter’s name.
The package of MariaDB is not in the Ubuntu warehouse package. Here is a record of the installation of MariaDB for easy viewing next time.

Set up warehouse

First installadd-apt-repositoryThe installed commands can be ignored:

sudo apt-get install software-properties-common

Get key:

sudo apt-key adv –recv-keys –keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db

Add MariaDB’srepository:

sudo add-apt-repository ‘deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main’

Update local warehouse:

sudo apt-get update

Install MariaDB

sudo apt-get install mariadb-server

Input will be required during installationrootpassword:

Installing MariaDB for Ubuntu
From the command line, enter MariaDB:

mysql -uroot -p

Installing MariaDB for Ubuntu

Start MySQL service:

sudo /etc/init.d/mysql start

 * Starting MariaDB database server mysqld
   ...done.
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

Stop MySQL service:

sudo /etc/init.d/mysql stop

* Starting MariaDB database server mysqld
   ...done.
 * Checking for corrupt, not cleanly closed and upgrade needing tables.

reference resources:http://www.linuxtechi.com/install-mariadb-in-ubuntu/