Ubuntu 16.04安装MySQL
sudo apt-get update
sudo apt-get install mysql-server
mysql_secure_installation
#配置各个选项
#创建myuser账户
mysql -u root -p 123456
create schema dbxxxx default character set utf8 collate utf8_general_ci;
CREATE USER 'myuser'@'%' IDENTIFIED BY '123456';
GRANT ALL ON dbxxxx.* TO 'myuser'@'%';
# 远程访问
Removing the line bind-address 127.0.0.1 from /etc/mysql/mysql.conf.d/mysqld.cnf solved the issue.
# 启动控制
systemctl restart mysql.service