CentOS 6.5通过yum安装 MySQL-5.5

树叶云

1.安装mysql-5.5的yum源

rpm -ivh http://repo.mysql.com/yum/mysql-5.5-community/el/6/x86_64/mysql-community-release-el6-5.noarch.rpm

2.修改安装好的yum源

编辑 /etc/yum.repos.d/mysql-community.repo文件,将5.5的enabled改为1,5.6的enabled改为0

# Enable to use MySQL 5.5
[mysql55-community]
name=MySQL 5.5 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/$basearch/enabled=1gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

# 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/6/$basearch/enabled=0
gpgcheck=1
gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

3.安装mysql-5.5

 yum install mysql-community-client mysql-community-devel mysql-community-server php-mysql

4.调整配置

编辑 /etc/my.cnf 文件

innodb_file_per_table=1 设置InnoDB为独立表空间模式,每个数据库的每个表都会生成一个数据目录
innodb_buffer_pool_size= 默认值:128M,设置为操作系统内存的70%-80%最佳

文章来源网络,作者:运维,如若转载,请注明出处:https://shuyeidc.com/wp/217068.html<

(0)
运维的头像运维
上一篇2025-04-13 00:35
下一篇 2025-04-13 00:36

相关推荐

发表回复

您的邮箱地址不会被公开。必填项已用 * 标注