Install MySQL server and Workbench in Ubuntu 18.04/18.10 or any other Debian distro

MySQL is one of the world’s most popular databases among RDBMS (Relational Database Management System). If you are a developer then MySQL may be one of the must-have software you need. Here we will show you how you can install MySQL server and workbench in Ubuntu or any other Debian based Linux distribution.

Install mysql server and workbench in Ubuntu

1.) Update your system

Your Linux repository list should be updated first.

sudo apt-get update

2.) Install server

By default, the MySQL server is included in the default repository of your Linux distribution so no need to worry about getting new repository.

 sudo apt-get install mysql-server

3.) Secure your MySQL Server installation

It is recommended to secure your installation using below command.

 sudo mysql_secure_installation

4.) Enter the password

You may have been already asked to enter a password in step 1 and if not, you will be asked to enter at this step. The message will appear something like this.

VALIDATE PASSWORD PLUGIN can be used to test passwords and improve security. It checks the strength of the password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD plugin?

After this, you will be prompted with different options. These options will be – change the password, Remove anonymous user, Disallow root login remotely, Remove test database and access to it, Remove test database,  Reload privilege tables etc. You can answer it in “Y” (yes) or any other key for No as per your requirements.

5.) Test the installation

You can check whether the installation is successful and the service is running or not with below command. If everything was correct, you will see MySQL service running with the green light in the left of it.

sudo systemctl status mysql.service

6.) Check the version

You can check the current version of your MySQL installation with below command.

sudo mysqladmin version

7.) Install MySQL Workbench

You can install the latest workbench which will provide you a graphical user interface and much more advanced functions shall you need it, use below command.

sudo apt-get install mysql-workbench

This will install the latest MySQL workbench and you should be able to see it in your distribution’s app search functionality or add a launcher.

If you are stuck at any particular point, please feel free to post in the comment, we shall get back to you faster than you can imagine.

Jigar Jani

About the Author: Jigar Jani

Hey Guys, This is Jigar. I am working as a Senior Software Engineer in one of the IT firms which deals with Banking solutions. I love to explore different horizons of Information technology. By profession, I am a developer and by passion, I am a tech explorer. I try to keep myself up to date with latest tech and gadgets. I will keep sharing my tech explorations with you frequently.

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *