How To Install MariaDB Ubuntu 20.04

How To Install MariaDB Ubuntu 20.04

How To Install MariaDB Ubuntu 20.04 In this article we will study about the MariaDB data base in details and we will install step by step in the ubuntu operation system and then create a database on it.

MariaDB is an open-source relational database management system (RDBMS), the only version of MySQL. MariaDB is a community-based project of the MySQL relational database management system that works in the same as MySQL. It is based on open source and relational database technology. You can use this database for small and big firms. The installation of database is similar to MySQL database and have more advance feature as compare to MySQL.

it is the alternative version of MySQL database . The MariaDB database is one of the most popular databases used in the world and its popularity is increasing day by day. This database is being used in all large servers. Its installation and configuration is also very easy for developers and system admins. As a relational database it provides a robust SQL interface to access and connect to the database. The latest versions of MariaDB have GIS and JSN features.

Some important feature of MariaDB

  • MariaDB operates under license from GPL, BSD or LGPL.
  • its supports PHP, which helps to access and manage the database graphically.
  • MariaDB supports various operating systems, and it supports multiple programming languages.
  • It also supports a lot of web hosting and clouding
  • It supports new storage engine which you will not find in MySQL.

How To Install MariaDB Ubuntu 20.04

Before installing the database in the server , first install the apt package and update the repository so that all the related packages of MariaDB are installed in your server without error.

Installing the MariaDB database or any packages in the system its requires full permissions in the server, so before installing the package of MariaDB, login the system from root account or have sudo privileges .

update the system package

$ sudo apt update

When your server is fully updated, then you can install the package of MariaDB with the following command.

ubuntu@dailytechreview:~$ sudo apt install mariadb-server mariadb-client
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
galera-3 libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl
libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl libjemalloc1 liblwp-mediatypes-perl libmysqlclient20
libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server-10.1 mariadb-server-core-10.1
mysql-common socat
Suggested packages:
libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx mariadb-test tinyca
The following NEW packages will be installed:
galera-3 libaio1 libcgi-fast-perl libcgi-pm-perl libconfig-inifiles-perl libdbd-mysql-perl libdbi-perl libencode-locale-perl libfcgi-perl libhtml-parser-perl
libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl libjemalloc1 liblwp-mediatypes-perl libmysqlclient20
libterm-readkey-perl libtimedate-perl liburi-perl mariadb-client mariadb-client-10.1 mariadb-client-core-10.1 mariadb-common mariadb-server mariadb-server-10.1
mariadb-server-core-10.1 mysql-common socat
0 upgraded, 30 newly installed, 0 to remove and 9 not upgraded.
Need to get 24.1 MB of archives.
After this operation, 184 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

To accept the package in your server in where you want to install MariaDB10.1, press the y key from your keyboard.

start and check the MariaDB database status

After successfully installing the MariaDB package into the server, start the service and also check the service status. To check the service, confirm the status of the service with the help of the command given in the below.

 start service in mariadb How To Install MariaDB Ubuntu 20.04

mysql_secure_installation is a shell script available on the Linux, ubuntu and UNIX system, which enables this script to be run to enable the security of MariaDB installations such as setting root password, removing anonymous users, remove test database, Refuse remote user account to login in the system.

Run the below command in the server to run the

scriptubuntu@dailytechreview:~$ sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MariaDB to secure it, we’ll need the current
password for the root user. If you’ve just installed MariaDB, and
you haven’t set the root password yet, the password will be blank,
so you should just press enter here. Enter current password for root (enter for none):
OK, successfully used password, moving on… Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation. Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
… Success! By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment. Remove anonymous users? [Y/n] y
… Success! Normally, root should only be allowed to connect from ‘localhost’. This
ensures that someone cannot guess at the root password from the network. Disallow root login remotely? [Y/n] y
… Success! By default, MariaDB comes with a database named ‘test’ that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment. Remove test database and access to it? [Y/n] y
– Dropping test database…
… Success!
– Removing privileges on test database…
… Success! Reloading the privilege tables will ensure that all changes made so far
will take effect immediately. Reload privilege tables now? [Y/n] y
… Success! Cleaning up… All done! If you’ve completed all of the above steps, your MariaDB
installation should now be secure. Thanks for using MariaDB!
ubuntu@dailytechreview:~$

Access MariaDB

After installing MariaDB in the server, use the below command to login in the system. for login into MariaDB database, you can create a database , restore the backup database.

 login in MariaDB  in Ubuntu 20.04

user login in the MariaDB and create a database and show the databases list with the help of below command.

create database in  MariaDB  in Ubuntu 20.04

created the database make tables and displaying them in MariaDB database.

conclusion

In this article, we learn about How To Install MariaDB Ubuntu 20.04 ,first we discussed in the theory about MariaDB, then we installed the database in the server in step by step. If there is any doubt and question related to this article, then you can mail us or comment in the below comment box.

We have a Hindi blog https://dailytechreview.com/ for technical where you can read all the latest technical information and technical related articles in Hindi.।

Related Posts

Leave a Reply

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

YouTube
LinkedIn
LinkedIn
Share
Instagram