yum list | grep mysql 查看yum上提供的mysql数据库可用版本
yum install -y mysql-server mysql mysql-devel 一键安装并配置
设置开机自启
chkconfig mysqld on
常用命令
service mysqld start 启动
service mysqld stop 关闭
service mysqld restart 重启
service mysqld status 状态查看
设置mysql允许远程连接
GRANT ALL PRIVILEGES ON *.* TO root@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;(红色处为自己的root密码)