Are you looking for a complete guide on how to install MariaDB 1053 on openSUSE 15?. MariaDB is a drop-in replacement for MySQL. It is a robust, resilient, scalable and reliable RDBMS with features previously only available in costly proprietary databases.

The latest stable release as of this writing is MariaDB 10.5. This version is available from MariaDB maintained repositories for Ubuntu/Debian/CentOS/Fedora/SUSE. Install MariaDB 10.5 on openSUSE 15 now and enjoy its breadth of features.

Step 1: Add MariaDB ZYpp repository

MariaDB Corporation provides a MariaDB Package Repository for several Linux distributions that use zypper to manage packages. Add ZYpp repository for MariaDB by running the following commands.

Fetch repository GPG key.

sudo rpm --import
sudo zypper --gpg-auto-import-keys refresh

Then add the repository:

sudo zypper addrepo --gpgcheck --refresh mariadb

Execution output:

Adding repository 'mariadb' ..............................................[done]
Repository 'mariadb' successfully added

URI         :
Enabled     : Yes                                        
GPG Check   : Yes                                        
Autorefresh : Yes                                        
Priority    : 99 (default priority)                      

Repository priorities are without effect. All enabled repositories share the same priority.

Step 2: Install MariaDB 10.5 on openSUSE 15

After the zypper repository is configured, you can install MariaDB packages using zypper. The added repository contains software packages related to MariaDB Server, including the server itself, clients and utilitiesclient librariesplugins, and Mariabackup

To install MariaDB Server and client with ZYpp, run:

sudo zypper install MariaDB-server MariaDB-client

When prompted, press “y” to agree to installation.

install mariadb opensuse 01

Step 3: Start mariadb service

After the installation, start MariaDB service and set it to start at boot.

sudo systemctl enable --now mariadb

Confirm the service is running.

$ systemctl status mariadb.service 
● mariadb.service - MariaDB 10.5.15 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor pre>
  Drop-In: /etc/systemd/system/mariadb.service.d
   Active: active (running) since Thu 2019-05-30 03:20:05 EDT; 13s ago
     Docs: man:mysqld(8)
  Process: 3517 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_STA>
  Process: 3476 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VA>
  Process: 3475 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_STAR>
 Main PID: 3486 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 30 (limit: 19660)
   CGroup: /system.slice/mariadb.service
           └─3486 /usr/sbin/mysqld

To Install the most common packages, execute the following command:

sudo zypper install galera MariaDB-shared MariaDB-backup MariaDB-common

Step 4: Secure MariaDB installation

If you’re running your server in production, it is recommended to run security script to set password for root user, remove test database and disable remote login for root user.


Secure your database by running the following script.

$ sudo mysql_secure_installation 


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: <ENTER NEW PASSWORD>
Re-enter new password: <CONFIRM 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!

Ensure you:

  • Set Database root user password
  • Remove anonymous users
  • Disallow root user remote logins
  • Remove test database and access to it

For just setting root password, the following command syntax should work for new installation.

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h linux-bswe password 'new-password'

When done, test access using the root user – without a password.

$ mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

As seen, you need to authenticate to access database console as a root user.

install mariadb opensuse 02

Confirm MariaDB version.

MariaDB [(none)]> SELECT VERSION();
| VERSION()       |
| 10.5.15-MariaDB |
1 row in set (0.000 sec)

MariaDB [(none)]> 

You now have MariaDB 10.5 installed on openSUSE 15. Start working on your projects powered by MariaDB RDMS.

Best MySQL Learning Courses on Udemy:

The Ultimate MySQL Bootcamp: Go from SQL Beginner to Expert

SQL – MySQL for Data Analytics and Business Intelligence

MySQL, SQL and Stored Procedures from Beginner to Advanced

SQL for Beginners: Learn SQL using MySQL and Database Design

The Complete MySQL Developer Course

MySQL Database Administration: Beginner SQL Database Design

Learn Database Design with MySQL

Other articles of interest.

Best Terminal File Managers for Linux

Top 10 Free Backup software for Linux

Best Linux Books for Beginners & Experts 2019

Top Open Source Cloud Platforms and Solutions

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here