设为首页 加入收藏

TOP

MySQL Study之--Percona Server 5.5升级5.6(一)
2015-12-15 22:18:19 来源: 作者: 【 】 浏览:27
Tags:MySQL Study --Percona Server 5.5 升级 5.6

系统环境:


一、升级的目的


? ? 为什么MySQL升级是必须的? 原因有很多,比如:为了使用新增的特性,基于性能方面的考量, 修复的bug. 但是在没有充分的测试以前就应用到你的应用中是非常危险的, 因为升级可以能会让你的应用不能正常运作- 也可能引起性能的问题. 此外, 我建议你关注MySQL的发布信息和Percona Server - 看看最近的版本有什么变化. 也许在在最新的版本中已修复了某个你正在烦恼的问题.


二、升级的方式?


通常情况下,有两中升级方式:


直接升级:安装好新版本数据库后,利用已经存在的数据文件夹,同时运行mysql_upgrade脚本来升级。


SQL 导出: 从一个较老版本的mysql把数据导出,然后恢复到新版本的数据库中。(利用mysqldump工具)。


相比之下,第二种方式更安全些,但是这也会使得升级的过程要慢一些。


理论上讲,最安全的方式是:


导出所有用户的权限


导出所有数据并恢复到新版本数据库中


恢复用户权限到新数据库中


三、升级的步骤


1、安装percona server 5.5


[root@cent65 percona-55]# uname -a
Linux cent65 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@cent65 ~]# cd /home/mysql/percona-55/
[root@cent65 percona-55]# ls


Percona-Server-55-debuginfo-5.5.46-rel37.5.el6.x86_64.rpm


Percona-Server-client-55-5.5.46-rel37.5.el6.x86_64.rpm


Percona-Server-devel-55-5.5.46-rel37.5.el6.x86_64.rpm


Percona-Server-server-55-5.5.46-rel37.5.el6.x86_64.rpm


Percona-Server-shared-55-5.5.46-rel37.5.el6.x86_64.rpm


Percona-Server-test-55-5.5.46-rel37.5.el6.x86_64.rpm


安装percona server与系统自带的mysql冲突,首先卸载系统自带mysql:


[root@cent65 percona-55]# rpm -ivh *
warning: Percona-Server-55-debuginfo-5.5.46-rel37.5.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
? ? ? ? MySQL conflicts with mysql-5.1.71-1.el6.x86_64
? ? ? ? MySQL-server conflicts with mysql-server-5.1.71-1.el6.x86_64


卸载mysql:
[root@cent65 percona-55]# rpm -e mysql-server --nodeps
[root@cent65 percona-55]# rpm -e mysql --nodeps
[root@cent65 percona-55]# rpm -e mysql-devel --nodeps


安装percona server:


[root@cent65 percona-55]# rpm -ivh *


warning: Percona-Server-55-debuginfo-5.5.46-rel37.5.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID cd2efd2a: NOKEY


Preparing...? ? ? ? ? ? ? ? ########################################### [100%]


? 1:Percona-Server-shared-5########################################### [ 17%]


? 2:Percona-Server-client-5########################################### [ 33%]


? 3:Percona-Server-server-5########################################### [ 50%]


151203 10:57:15 [Note] /usr/sbin/mysqld (mysqld 5.5.46-37.5) starting as process 2537 ...


151203 10:57:27 [Note] /usr/sbin/mysqld (mysqld 5.5.46-37.5) starting as process 2546 ...


PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !


To do so, start the server, then issue the following commands:


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


/usr/bin/mysqladmin -u root -h cent65 password 'new-password'


Alternatively you can run:


/usr/bin/mysql_secure_installation


which will also give you the option of removing the test


databases and anonymous user created by default.? This is


strongly recommended for production servers.


See the manual for more instructions.


Please report any problems at


? https://bugs.launchpad.net/percona-server/+filebug


Percona recommends that all production deployments be protected with a support


contract (http://www.percona.com/mysql-suppport/) to ensure the highest uptime,


be eligible for hot fixes, and boost your team's productivity.


Percona Server is distributed with several useful UDF (User Defined Function) from Percona Toolkit.


Run the following commands to create these functions:


mysql -e "CREATE FUNCTION fnv1a_64 RETURNS INTEGER SONAME 'libfnv1a_udf.so'"


mysql -e "CREATE FUNCTION fnv_64 RETURNS INTEGER SONAME 'libfnv_udf.so'"


mysql -e "CREATE FUNCTION m

首页 上一页 1 2 3 4 5 6 7 下一页 尾页 1/7/7
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇让MySQL 5.6支持Emoji表情 下一篇MySQL 增量备份的脚本 (innoback..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: