我的个人博客地址:
添加源
下载rpm包wget http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
安装Mysql源sudo rpm -Uvh mysql-community-release-el6-5.noarch.rpm
查看mysql源 yum repolist all | grep mysql
如果正常 你就能看到mysql 5.6社区版啦。
编辑下载源
在 /etc/yum.repos.d/mysql-community.repo
中你可以看到类似
# Enable to use MySQL 5.6
[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
通过配置 enable
等于1
或者0
来决定启用那个版本。
例如我启用了Mysql5.7
# Note: MySQL 5.7 is currently in development. For use at your own risk.
# Please read with sub pages: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/
[mysql57-community-dmr]
name=MySQL 5.7 Community Server Development Milestone Release
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
安装mysql
开始安装sudo yum install mysql-community-server
启动mysqlservice mysqld start
如果是mysql5.7会生成初始密码,用下面命令查看sudo grep 'temporary password' /var/log/mysqld.log
然后你就可以对mysql 为所欲为了。
配置mysql
然而事情并没有结束,mysql初始配置,占用的内存非常高。Then,what can I do.
参考。相当详细。
当然你也可以参考,非常详细。请叫我教程搬运工。