Install Mariadb Ubuntu 18.04

Posted on by admin

Jun 02, 2018  sudo yum remove mariadb-server Install MariaDB 10.3 on Ubuntu 18.04. To install MariaDB 10.3 on Ubuntu 18.04, you need to add MariaDB repository on to the system. Step 1: Install software-properties-common if missing: sudo apt-get install software-properties-common Step 2: Import MariaDB gpg key: Run the command below to add Repository Key to the system. May 3, 2018 - For the life of me, I can not figure out why I am unable to install mariadb-server 10.2 on my new install of Ubuntu Mate 18.04. I've done this twice.

MariaDB is a database server that many consider to be superior to MySQL. Both are open source. Both are multi-threaded relational databases. And both are used wide-spread. One of the biggest differences between the two is that MariaDB development is far more open and vibrant and offers faster, more transparent security releases. Couple that with the fact that a lot of web-server software titles have migrated to MariaDB, and you have reason enough to make the change. But how do you install MariaDB on Ubuntu Server 18.04? It's actually quite simple. Let me walk you through the process.

Install mariadb 5.5 ubuntu 18.04

What you need

More about Open Source

Install nginx php mariadb ubuntu 18.04

I will assume you already have an instance of Ubuntu Server 18.04 up and running and have access to an account with sudo privileges. That's all you need. Let's install.

Update and upgrade

Open a terminal window. Before we actually run the installation, we're going to update and upgrade the server. Remember this: If the kernel upgrades, you'll need to reboot the server. Because of this, you might want to run the update/upgrade commands at a time when it's okay for the server to be rebooted (if this is a production machine).

SEE: IT pro's guide to working smarter with Linux (Tech Pro Research)

Restart Mariadb Ubuntu

To run the update/upgrade, issue the command:

If everything checks out on the list of software to upgrade, type Y and then hit Enter. The update and upgrade will complete, and you're ready to install the database server.

Installation

Now let's install. From the same terminal window, issue the command:

Once the installation completes, you can start and enable the service with the commands:

Securing the installation

At this point, things will start looking very similar to that of MySQL. You'll want to create a password for the MariaDB server root account (and do away with some of the defaults). This is handled with the command:

This will first ask you to enter the password for the root user. Since you have yet to set one, just hit Enter on your keyboard. You will then be prompted to type (and verify) a new password for the root user. Once you've created the password, accept the default for the remaining questions (Figure A).

Figure A

Jan 19, 2019 - Sophos XG Series Next Generation Firewall Visio stencils for network diagram drawing. Inside the visio stencils: XG 85 Face/Ports; XG 105. Sophos xg visio stencils.

That's it. MariaDB is installed.

One caveat

You know how you're accustomed to gaining access to the MySQL prompt? You'd issue a command like:

After successfully authenticating, you'd find yourself on the database prompt. Try that with MariaDB, and you'll be greeted by an error (Figure B).

Figure B

Because of the way MariaDB is hardened, you must access the prompt with the help of sudo, like so:

Type your sudo password, followed by the MariaDB root user password, and you'll find yourself at the MariaDB prompt (Figure C).

Figure C

All there is to it

And that, my friends, is all there is to installing, securing, and logging into the MariaDB database server on Ubuntu 18.04. You should find this database server as easy to use as MySQL.

Open Source Weekly Newsletter

You don't want to miss our tips, tutorials, and commentary on the Linux OS and open source applications. Delivered Tuesdays

Sign up today Sign up today

Also see