1、安装MySQL 5.5.x的yum源:
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2、安装MySQL客户端的支持包:
yum install libmysqlclient15 --enablerepo=webtatic
3、卸载MySQL老版本的软件包:
yum remove mysql mysql-*
4、安装MySQL 5.5的客户端和服务端:
yum install mysql55 mysql55-server --enablerepo=webtatic
5、启动MySQL系统服务,更新数据库:
/etc/init.d/mysqld restart
mysql_upgrade
6、附:此台服务器的my.cnf配置
skip-locking
skip-name-resolve
key_buffer = 1024M
back_log = 3000
max_allowed_packet = 4M
table_cache = 512
sort_buffer_size = 8M
read_buffer_size = 8M
myisam_sort_buffer_size = 1024M
thread_cache = 512
query_cache_size = 512M
set-variable = wait_timeout=60
thread_concurrency = 4
log-slow-queries = slow.log
long_query_time = 1
innodb_flush_log_at_trx_commit = 2
innodb_buffer_pool_size = 1024M
#innodb_locks_unsafe_for_binlog = 1
如果不是升级,而是新安装。还需要设置root密码,删除默认的空用户、空密码等等,这里就不说了。请参考本博其他博文或官方手册,或者google。
关于my.cnf配置更详细的说明请参考:
http://www.ha97.com/4110.html
英文原文:http://www.webtatic.com/packages/mysql55/
service mysqld
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
2、安装MySQL客户端的支持包:
yum install libmysqlclient15 --enablerepo=webtatic
3、卸载MySQL老版本的软件包:
yum remove mysql mysql-*
4、安装MySQL 5.5的客户端和服务端:
yum install mysql55 mysql55-server --enablerepo=webtatic
5、启动MySQL系统服务,更新数据库:
/etc/init.d/mysqld restart
mysql_upgrade
6、附:此台服务器的my.cnf配置
skip-locking
skip-name-resolve
key_buffer = 1024M
back_log = 3000
max_allowed_packet = 4M
table_cache = 512
sort_buffer_size = 8M
read_buffer_size = 8M
myisam_sort_buffer_size = 1024M
thread_cache = 512
query_cache_size = 512M
set-variable = wait_timeout=60
thread_concurrency = 4
log-slow-queries = slow.log
long_query_time = 1
innodb_flush_log_at_trx_commit = 2
innodb_buffer_pool_size = 1024M
#innodb_locks_unsafe_for_binlog = 1
如果不是升级,而是新安装。还需要设置root密码,删除默认的空用户、空密码等等,这里就不说了。请参考本博其他博文或官方手册,或者google。
关于my.cnf配置更详细的说明请参考:
http://www.ha97.com/4110.html
英文原文:http://www.webtatic.com/packages/mysql55/
service mysqld