Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Installing MySQL 8.0 on Ubuntu 16.04 LTS in Five Minutes

DZone's Guide to

Installing MySQL 8.0 on Ubuntu 16.04 LTS in Five Minutes

Read this super quick tutorial in order to learn how to install MySQL 8.0 on Ubuntu 16.04 LTS. Includes pictures and step-by-step instructions.

· Database Zone ·
Free Resource

MariaDB TX, proven in production and driven by the community, is a complete database solution for any and every enterprise — a modern database for modern applications.

Do you want to install MySQL 8.0 on Ubuntu 16.04 LTS? In this quick tutorial, I show you exactly how to do it in five minutes or less.

This tutorial assumes you don't have MySQL or MariaDB installed. If you do, it is necessary to uninstall them or follow a slightly more complicated upgrade process (not covered here).

Step 1: Install MySQL APT Repository

Ubuntu 16.04 LTS, also known as Xenial, comes with a choice of MySQL 5.7 and MariaDB 10.0.

If you want to use MySQL 8.0, you need to install the MySQL/Oracle Apt repository first.

The MySQL APT repository installation package allows you to pick what MySQL version you want to install, as well as if you want access to preview versions. Let's leave them all as default:

Step 2: Update Repository Configuration and Install MySQL Server

Note: Do not forget to run "apt-get update", otherwise you can get an old version of MySQL from Ubuntu repository installed.

The installation process asks you to set a password for the root user:

I recommend you set a root password for increased security. If you do not set a password for the root account, "auth_socket" authentication is enabled. This ensures only the operating system's "root" user can connect to MySQL Server without a password.

Next, the installation script asks you whether to use Strong Password Encryption or Legacy Authentication:

While using strong passwords is recommend for security purposes, not all applications and drivers support this new authentication method. Going with legacy authentication is a safer choice.

All Done

You should have MySQL 8.0 Server running. You can test it by connecting to it with a command line client:

As you can see, it takes just a few simple steps to install MySQL 8.0 on Ubuntu 16.04 LTS.

Installing MySQL 8.0 on Ubuntu 16.04 LTS is easy. Go ahead give it a try!

MariaDB AX is an open source database for modern analytics: distributed, columnar and easy to use.

Topics:
database ,mysql 8.0 ,ubuntu 16.04 lts ,xenial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}