MySQL installation and configuration on Linux Mint
As I am using Linux Mint 19.1 (Tessa). So, I will be installing MySQL compatible with this version.
You can check your’s version number and code name using below command.
$ lsb_release -a

I am planning to install MySQL server version 5.7 and connect it with DBeaver. Before installing let’s make sure there are any MySQL files or not. If yes, those need to be cleared.
Please follow the below steps-
- Use the below commands to remove the existing files.
$ sudo apt-get remove --purge mysql*
$ sudo apt-get purge mysql*
$ sudo apt-get autoremove
$ sudo apt-get autoclean
$ sudo apt-get remove dbconfig-mysql
2. Now make sure everything is up to date.
$ sudo apt-get update
3. Next install the MySQL server using the command line
$ sudo apt install mysql-server
4. Check the MySQL version
$ mysql --version
5. After successful installation, the MySQL service will start automatically. To check the status of the MySQL server, run the command:
$ sudo systemctl status mysql

If the MySQL server is not active then run this command:
$ sudo systemctl start mysql
If wan to stop the server then run this command:
$ sudo systemctl stop mysql
If you have not assigned a “root” password, then some applications may not allow access to all functions or you cannot login as the root user.
6. To assign a root user password use this command:
sudo mysql -u root
7. At the mysql> prompt
see what is the authentication.
SELECT user,host,authentication_string,plugin FROM mysql.user WHERE user='root';
8. To change root to password authentication — change the ‘password’ at the end to your actual password within the quotes.
ALTER USER 'root'@'localhost' IDENTIFIED WITH 'mysql_native_password' BY 'password';
9. You should execute FLUSH PRIVILEGES after making manual edits to tables such as MySQL.
FLUSH PRIVILEGES;
10. Then just Quit.
quit

11. After making this change, you should pass the -p option when invoking the MySQL shell using the below command:
$ mysql -u root -p
12. Now install DBeave and connect it to the MySQL server.
Snaps are an easy way to install and run applications on Linux operating systems because they ship with all the dependencies of an application. To run snaps, your Linux system must have snapd installed.
If you don’t have snapd installed then run this command:
$ sudo apt update && sudo apt install snapd
If you already have snapd installed then just simply copy and run the command to install the dbeaver-ce:
$ sudo snap install dbeaver-ce
13. Launch DBeaver from the start menu on Linux mint 19.1. Then click on Database from the upper bar. Create a new database connection and select MySQL.
Here Server connection has parameters like localhost, port:3306, Username: root, and password: given_password. Then click on the test connection to check.

References: