1、安装 mysql
- 1
- 1
- 1
- 1
- 1
- 1
期间会弹出设置root账户的密码框,输入两次相同密码。
2、查询是否安装成功
- 1
- 1
- 1
- 2
- 3
- 1
- 2
- 3
3、开启远程访问mysql
- 编辑mysql配置文件,注释掉“bind-address = 127.0.0.1”
- 1
- 1
- 1
- 1
- 进入mysql root账户
- 1
- 1
- 在mysql环境中输入grant all on . to username@’%’ identified by ‘password’;
- 或者grant all on . to username@’%’ identified by ‘password’ with grand option;
- 1
- 1
- 刷新flush privileges;然后重启mysql,通过/etc/init.d/mysql restart命令
- 1
- 1
- 1
- 1
- 远程连接时客户端设置: