SystemMen - How to install MariaDB 10.3 in Debian 8 Jessie.
This article will guide you step by step to do that.
Add MariaDB repository to the server
You execute the commands below to add MariaDB repository to the server.
Note that all of the following commands use the root user privilege.

First, install packages that need to be added to the repository.
# apt-get install software-properties-common -y
Next, add the confirmation key of the repository to the server.
# apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
Then we add the repository to the server using the following command.
# add-apt-repository 'deb [arch=amd64,i386,ppc64el] http://ftp.kaist.ac.kr/mariadb/repo/10.3/debian jessie main'
Install MariaDB server
To install MariaDB server, use the command below.
# apt-get update && apt-get install mariadb-server -y
Recommended Reading: How to install MariaDB 10.3 in Debian 9
During installation, it will ask if you want to set root password for MariaDB.
Configuring mariadb-server-10.3-------------------------------While not mandatory, it is highly recommended that you set a password for the MariaDB administrative "root" user.If this field is left blank, the password will not be changed.New password for the MariaDB "root" user:
This step will ask you 3 times. You can set a password to use later or press Enter to leave it blank.
Wait a few minutes to complete the installation.
Enable and use mysql
After installation is complete, enable the mysql service.
# systemctl enable mysql
Then start the mysql service.
# systemctl start mysql
You can check mysql service has started successfully using the following command.
# systemctl status mysql
The result looks like this.
[info] /usr/bin/mysqladmin Ver 9.1 Distrib 10.3.13-MariaDB, for debian-linux-gnu on x86_64Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.Server version 10.3.13-MariaDB-1:10.3.13+maria~jessie-logProtocol version 10Connection Localhost via UNIX socketUNIX socket /var/run/mysqld/mysqld.sockUptime: 45 secThreads: 8 Questions: 453 Slow queries: 0 Opens: 177 Flush tables: 1 Open tables: 31 Queries per second avg: 10.066.
Now, you need to run the following command to secure mysql initially.
Recommended Reading: How to install MariaDB 10.3 in CentOS 6
# mysql_secure_installation
root@debian8:~# mysql_secure_installationNOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDBSERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MariaDB to secure it, we'll need the currentpassword for the root user. If you've just installed MariaDB, andyou 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 MariaDBroot user without the proper authorisation.Set root password? [Y/n] yNew password:Re-enter new password:Password updated successfully!Reloading privilege tables..… Success!By default, a MariaDB installation has an anonymous user, allowing anyoneto log into MariaDB without having to have a user account created forthem. This is intended only for testing, and to make the installationgo a bit smoother. You should remove them before moving into aproduction environment.Remove anonymous users? [Y/n] y… Success!Normally, root should only be allowed to connect from 'localhost'. Thisensures 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 canaccess. This is also intended only for testing, and should be removedbefore 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 farwill 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 MariaDBinstallation should now be secure.Thanks for using MariaDB!
After completing the above command, you can now login to mysql and start using it.
# mysql -u root -p
Conclusion
The steps to install MariaDB server 10.3 in Debian 8 Jesssie are very simple, I successfully tested. You only need to do the exact steps in the article, I make sure it works.
«« How to install MariaDB 10.3 in Debian 9How to install latest Nginx in CentOS 6 »»