当前位置:Gxlcms > 数据库问题 > CentOS 6.*通过yum安装 MySQL-5.5

CentOS 6.*通过yum安装 MySQL-5.5

时间:2021-07-01 10:21:17 帮助过:19人阅读

  1. # Enable to use MySQL 5.5
  2. [mysql55-community]
  3. name=MySQL 5.5 Community Server
  4. baseurl=http://repo.mysql.com/yum/mysql-5.5-community/el/6/$basearch/
  5. enabled=1
  6. gpgcheck=1
  7. gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
  8. # Enable to use MySQL 5.6
  9. [mysql56-community]
  10. name=MySQL 5.6 Community Server
  11. baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/
  12. enabled=0
  13. gpgcheck=1
  14. gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
技术分享图片

3.安装mysql-5.5

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

4.调整配置

编辑 /etc/my.cnf 文件

  1. innodb_file_per_table=1 设置InnoDB为独立表空间模式,每个数据库的每个表都会生成一个数据目录
  2. innodb_buffer_pool_size= 默认值:128M,设置为操作系统内存的70%-80%最佳<br>service mysqld start 启动mysql<br>chkconfig mysqld on 设为开机启动<br><br>mysqladmin -u root password ‘root‘ 设置密码为root

CentOS 6.*通过yum安装 MySQL-5.5

标签:alt   baseurl   /etc/   x86_64   gpo   pos   默认值   table   表空间   

人气教程排行