一、安装
(1)linux版
A.linux普通版
http://www.jb51.net/article/104107.htm
B.ubuntu版
1.安装
sudo apt-get install mysql-server
apt-get isntall mysql-client
sudo apt-get install libmysqlclient-dev
2.设置密码
cd /etc/mysql
vi debian.cnf #查看debian-sys-maint用户的密码
#按用户 user “debian-sys-maint”登陆
mysql -u debian-sys-maint -p
#输入debian-sys-maint用户的密码
#成功登陆
mysql>SET PASSWORD FOR 'root'@'localhost' =PASSWORD('新密码’); #修改localhost域名下的密码
mysql>flush previleges; #刷新权限
mysql>quit
(2)window版
A.解压版
https://segmentfault.com/a/1190000005125623
B.Installer安装版
https://www.2cto.com/database/201506/409821.html
C.安装包版
https://jingyan.baidu.com/article/ab69b270b1873c2ca7189f19.html
二、远程登录
(1)开启mysql远程登录权限
#开放权限
mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;
#刷新权限
mysql>flush privileges;
(2)防火墙
A.window
开放mysql的连接端口(默认3306)
http://maximumpcguides.com/windows-7/open-a-port-in-windows-7s-firewall/
B.linux
https://www.2cto.com/database/201412/359998.html
注意:ubuntu默认不开启防火墙