Installation
Steps for a Fresh Installation of MySQL
Adding the MySQL APT Repository
wget https://repo.mysql.com//mysql-apt-config_0.8.10-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb
During the installation of the package, you will be asked to choose the versions of the MySQL server and other components that you want to install. Do not change the default options selected for you and choose Ok to finish the configuration and installation of the release package.
Update package information from the MySQL APT repository with the following command (this step is mandatory):
sudo apt-get update
Installing MySQL with APT
sudo apt-get install mysql-server -y
Make sure you remember the root password you set.
In Select default authentication plugin, select Use Strong Password Encryption (RECOMMENDED) option.
Starting and Stopping the MySQL Server
sudo service mysql status
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2018-08-21 09:43:24 UTC; 6s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Main PID: 5563 (mysqld)
Status: "SERVER_OPERATING"
CGroup: /system.slice/mysql.service
└─5563 /usr/sbin/mysqld
Aug 21 09:43:24 admatic-mysql-00 systemd[1]: Starting MySQL Community Server...
Aug 21 09:43:24 admatic-mysql-00 systemd[1]: Started MySQL Community Server.
sudo service mysql stop
sudo service mysql start