安装MySQL
执行命令
rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
执行命令 yum install -y mysql-server mysql-devel
执行命令 service mysqld start 重启服务
执行命令 mysql_secure_installation #MySQL安全配置向导
Enter current password for root (enter for none):
<–初次运行直接回车
Set root password? [Y/n]
<– 是否设置root用户密码,输入y并回车或直接回车
Remove anonymous users? [Y/n]
<– 是否删除匿名用户,生产环境建议删除,所以直接回车
Disallow root login remotely? [Y/n]
<–是否禁止root远程登录,根据自己的需求选择Y/n并回车,建议禁止
Remove test database and access to it? [Y/n]
<– 是否删除test数据库,直接回车
Reload privilege tables now? [Y/n]
<– 是否重新加载权限表,直接回车
验证服务是否启动 lsof -i:3306
如何卸载:https://blog.csdn.net/q_Catherine/article/details/90680245