MySQL is an open source software to manage database . It is very popular database management software . MySQL is an open source RDBMS which is created by MySQL AB . It is now owned by oracle . The default port of MySQL server is 3306 . In this article we will see how to install MySQL on ubuntu.

It is primary database management application until MariaDB .
What Is New in MySQL 8.0

  • MySQL now incorporates a transactional data dictionary
  • Supports roles, a collection of privileges.
  • Enhancements to MySQL Replication
  • Stores password history
  • Default character set has changed from latin1 to utf8mb4.
  • Enhancements in InnoDB and JSON
  • Better resource management
  • Error logging has been rewritten to use the MySQL component architecture

Install MySQL 8.0 on Ubuntu 18.04

As the first step, we have to set up the MySQL repository on the system. You can download MySQL repository by clicking here

Install the repository package using the dpkg command.

The MYSQL installer will prompt you to select the MySQL repository. Based on your selection, the installer will configure repositories on the system to receive the appropriate version of MySQL.

Here I will choose mysql-8.0 by default and press OK.

mysql

Use the apt command to install the latest stable version of MySQL.

The package installer will prompt you to set the MySQL root password.

mysql password

Please re-enter root password.

mysql password

MySQL 8.0 uses a new authentication based on improved SHA 256 password methods. If you choose this option, old clients may not be able to connect to the server. You can change the default authentication any time by setting default-authentication-plugin = mysql_native_password in the config file.

Select default authentication plugin

mysql

Secure MySQL Server

After the installation, we need to run MySQL secure script that comes with the package to make this MySQL instance more secure.

This command need root password. please enter root password and go through instruction.

After MySQL installation completed . you can login by running the command

Now you can install mysql on ubuntu. If you want to know common interview questions asked in interview from MySQL. You can go through

30 MySQL Interview Question for Database Administrator