To install latest MySQL to Ubuntu perform the following steps:
1) Download and add the repositories
Download the repositories from the official download page manually. Install them.
2) Update the repository data:
sudo apt update
3) Install MySQL server via apt.
Install MySQL server with the command below. Also, take into consideration the following notes:
- During installation you will be asked for a password. Do not leave it blank. For a development computer an easy password like “root” is good enough.
- You will be asked to choose the default authentication plugin. For a development computer choose: Legacy authentication.
sudo apt install mysql-server
4) Install MySQL workbench:
Install MySQL workbench with the command below. After installation, open MySQL workbench and verify that you can connect to the server.
sudo apt install mysql-workbench-community
5) Run security installer (optional)
For improved security you should run the MySQL Security installer. You do not have to run the installer on a development computer:
sudo mysql_secure_installation
Troubleshooting
If you have problems connecting to the server check the following articles:
- https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-ubuntu-18-04
- https://memext.wordpress.com/2018/07/02/cannot-connect-to-mysql/
- https://askubuntu.com/questions/766334/cant-login-as-mysql-user-root-from-normal-user-account-in-ubuntu-16-04
References:
is amazing! when did you start this blog?