环境:
centos7,阿里云
步骤:
- 更新下yum源 : yum update
- 列出可安装的包 :yum list | grep mysql-community
- 选择server的5.6版本进行安装 :yum install mysql-community-server-5.6.44-2.el7.x86_64
- 设置为开机启动 :systemctl enable mysqld
- 启动mysql : systemctl start mysql
- 查看mysql状态 :systemctl status mysql
- 设置账号密码(这里都为root): mysqladmin -uroot password root
- 进入mysql : mysql -uroot -proot
- 查看mysql版本 : select version();
- 开始远程连接授权
grant all privileges on *.* to ‘root‘@‘%‘ identified by ‘root‘ with grant option;
flush privileges;
- 阿里云开放3306端口,让外部可以连接到
- Navicat连接
mysql安装
原文:https://www.cnblogs.com/hunter-007/p/11167180.html