1, the first change to the system aliyun the mirror source, need wait for a while
2, the system update execution command MySQL After completion of the installation : sudo apt install mysql-server
3, see the MySQL service status : sudo service mysql status
View MySQL version : sudo mysql
4, this time MySQL is no need to set a password Password: set a password for 1234
set password for 'root'@'localhost' = password('1234');
5, set MySQL allows remote login:
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY 'Admin@123' WITH GRANT OPTION;
6, performs sudo apt install vim installed vim editor
7, before the first stopped mysql service, replication can not modify the configuration file
sudo service mysql stop
8, modify the configuration file
sudo came /etc/mysql/mysql.conf.d/mysqld.cnf
9, start the MySQL service:
sudo service mysql start
Check the service status:
sudo service mysql status
10, remote connectivity test
Navicat or SQLyog use virtual machine ip and enter the password mysql