yum安装mysql
1、在线下载mysql包
yum -y install mysql mysql-server mysql-devel
2、启动mysql
/etc/init.d/mysqld start
3、通过mysql自带脚本,跟着提示按照自己需要进行设置
/usr/bin/mysql_secure_installation
4、设置完成后启动mysql,进行授权
mysql -u{username} -p
grant all privileges on *.* to 'root'@'%' identified by '*********' with grant option;
flush privileges;