MySQL v5.6版本安装

查询系统中已有的MySQL

rpm -qa|grep mysql

如果有卸载MySQL并删除相关文件(这里是基于默认安装的)

yum remove -y mysql mysql-libs mysql-common
rm -rf /var/lib/mysql
rm -rf /etc/my.cnf

安装v5.6 MySQL

wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
rpm -ivh mysql-community-release-el6-5.noarch.rpm
yum install -y mysql-community-server

配置MySQL

vim /etc/my.cnf

启动MySQL

service mysqld start

设置root密码

/usr/bin/mysqladmin -u root password '123456'

你可能感兴趣的:(环境部署)