1. Install MySQL
sudo apt-get install mysql-serversudo apt-get install mysql-clientsudo apt- Get Install Libmysqlclient-dev
2. Whether the query is successfully installed
sudo netstat-tap | grep MySQL
As shown, indicates that the installation was successful
Edit the MySQL configuration file and comment out "bind-address = 127.0.0.1"
sudo vi/etc/mysql/mysql.conf.d/mysqld.cnf#bind127.0. 0.1
Use root to enter the MySQL command line, execute the following 2 commands, example of MySQL root account password: 123456
Mysql-u root-p123456
MySQL assigns root user permission to grant all privileges on
Grant all on * * to [email protected]'%'root' with GRANT option;
Flush privileges;
Refresh flush privileges, then restart MySQL via/etc/init.d/mysql restart command
/etc/init.d/mysql Restart--restart MySQL
Create a database: Snailblog
Create User: Tinywan_user, and use Snailblog database
' Tinywan_user ' ' test123456 ';
Tinywan_user the database you see after logging in
MySQL Learning note (i) MySQL installation configuration in Ubuntu16.04