Mariadb installation in Ubuntu
Ubuntu version : Server version: 10.3.22-MariaDB-0ubuntu0.19.10.1 Ubuntu 19.10
Mariadb version : mariadb-server-10.3
To install mariadb on ubuntu using apt-get package
apt-get install mariadb mariadb-server -Y
List of installed mariadb packages
root@MySql:/home/kishan# apt list --installed|grep mariadb
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
mariadb-client-10.3/eoan-updates,eoan-security,now 1:10.3.22-0ubuntu0.19.10.1 amd64 [installed,automatic]
mariadb-client-core-10.3/eoan-updates,eoan-security,now 1:10.3.22-0ubuntu0.19.10.1 amd64 [installed,automatic]
mariadb-common/eoan-updates,eoan-updates,eoan-security,eoan-security,now 1:10.3.22-0ubuntu0.19.10.1 all [installed,automatic]
mariadb-server-10.3/eoan-updates,eoan-security,now 1:10.3.22-0ubuntu0.19.10.1 amd64 [installed,automatic]
mariadb-server-core-10.3/eoan-updates,eoan-security,now 1:10.3.22-0ubuntu0.19.10.1 amd64 [installed,automatic]
mariadb-server/eoan-updates,eoan-updates,eoan-security,eoan-security,now 1:10.3.22-0ubuntu0.19.10.1 all [installed]
To get a brief info on the mariadb package available in the repository
root@MySql:/home/kishan# apt-cache show mariadb-server
Package: mariadb-server
Architecture: all
Version: 1:10.3.22-0ubuntu0.19.10.1
Priority: optional
Section: universe/database
Source: mariadb-10.3
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian MySQL Maintainers <pkg-mysql-maint@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 66
Depends: mariadb-server-10.3 (>= 1:10.3.22-0ubuntu0.19.10.1)
Filename: pool/universe/m/mariadb-10.3/mariadb-server_10.3.22-0ubuntu0.19.10.1_all.deb
Size: 12700
MD5sum: 825b924e52bfca65f7f65b6fb91ff992
SHA1: 6fb3c9ec5c2de7ba17824d7915f8bd7182f55251
SHA256: 10a6ee64aea66cbdef81f029df2d7503f53c1bb3fbc6b1e278106814e8601d53
Homepage: https://mariadb.org/
Description-en: MariaDB database server (metapackage depending on the latest version)
This is an empty package that depends on the current "best" version of
mariadb-server (currently mariadb-server-10.3), as determined by the MariaDB
maintainers. Install this package if in doubt about which MariaDB
version you need. That will install the version recommended by the
package maintainers.
.
MariaDB is a fast, stable and true multi-user, multi-threaded SQL database
server. SQL (Structured Query Language) is the most popular database query
language in the world. The main goals of MariaDB are speed, robustness and
ease of use.
Description-md5: 47753d361ef73aaa0d808a49d4717d3f
Start Mariadb services
1)Check the status of the service
root@MySql:/home/kishan# systemctl status mariadb
● mariadb.service - MariaDB 10.3.22 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2020-06-07 12:10:15 IST; 39min ago
Docs: man:mysqld(8)
https://mariadb.com/kb/en/library/systemd/
Main PID: 721 (mysqld)
Status: "Taking your SQL requests now..."
Tasks: 30 (limit: 2320)
Memory: 93.5M
CGroup: /system.slice/mariadb.service
└─721 /usr/sbin/mysqld
Jun 07 12:10:07 MySql systemd[1]: Starting MariaDB 10.3.22 database server...
Jun 07 12:10:11 MySql mysqld[721]: 2020-06-07 12:10:11 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0ubuntu0.19.10.1) startin
Jun 07 12:10:15 MySql systemd[1]: Started MariaDB 10.3.22 database server.
2)If service is not active,then start the service manually
root@MySql:/home/kishan# systemctl start mariadb
3)The service is up and running.Try to connect to mariadb using root
root@MySql:/home/kishan# mysql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 19
Server version: 10.3.22-MariaDB-0ubuntu0.19.10.1 Ubuntu 19.10
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
4)List the databases
MariaDB [(none)]> show databases;
+--------------------+
| Database |
+--------------------+
| TEST |
| information_schema |
| mysql |
| performance_schema |
+--------------------+
4 rows in set (0.061 sec)
5)check the current user
MariaDB [(none)]> select current_user();
+----------------+
| current_user() |
+----------------+
| root@localhost |
+----------------+
1 row in set (0.000 sec)
6)check the list of users and host details
MariaDB [(none)]> select user,host from mysql.user;
+--------+----------------+
| user | host |
+--------+----------------+
| kishan | localhost|
| root | localhost|
| test | localhost|
These are basic things to install and practice mariadb!!