一、 sudo apt-get updatemysql
二、 sudo apt-get install mysql-server mysql-clientsql
三、 安装过程当中,输入root的密码两次数据库
四、 sudo service mysql restart查看是否安装成功ide
五、 设置运行远程访问:rest
a> 注释修改配置文件 /etc/mysql/my.cnf 中 bind_ip/bind-address行server
b> mysql -u root -p 登入ip
c> create database test; 建立数据库get
d> use mysql;it
e>grant all privileges on *.* to username@"%" identified by "password" with grant option; #受权用户username经过密码password在任何地址访问任何库。io
f> exit 退出登入
g> sudo service mysql restart; 重启mysql服务
h> 在远程进行访问。