查看是否已安装mysql
rpm -qa|grep mysql
删除已安装
rpm -e --nodeps mysqlxxx
下载mysql
wget https://dev.mysql.com/get/mysql80-community-release-el6-1.noarch.rpm
安装
rpm -ivh mysql80-community-release-el6-1.noarch.rpm
yum install mysql-server
检查是否已安装
mysqladmin -V
启动mysql
service mysqld start
查看密码
vim /var/log/mysqld.log
登录
mysql -uroot -p