Chinaunix首页 | 论坛 | 博客
  • 博客访问: 36334
  • 博文数量: 12
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 123
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-27 11:20
个人简介

Passion for technology and design!

文章分类
文章存档

2015年(8)

2014年(4)

我的朋友

分类: Mysql/postgreSQL

2014-10-09 21:33:18

As a general rule, to upgrade from one release series to another, go to the next series rather than skipping a series. To upgrade from a release series previous to MySQL 5.1, upgrade to each successive release series in turn until you have reached MySQL 5.1, and then proceed with the upgrade to MySQL 5.5. For example, if you currently are running MySQL 5.0 and wish to upgrade to a newer series, upgrade to MySQL 5.1 first before upgrading to 5.5, and so forth. For information on upgrading to MySQL 5.1, see the MySQL 5.1 Reference Manual.
作为通用规则,要从一个系列升级到另一个系列,要逐步升级而不是跳过某个系列。如果从MySQL 5.1之前的版本升级,需要依次升级每一个系列,直到到达5.1版本,然后执行5.1到5.5的升级。例如,如果你正在运行MySQL 5.0版并想升级至新版,需要在升级到5.5之前先升级到5.1版。有关升级至5.1的信息,请看MySQL 5.1的参考手册。

There is a special case for upgrading to MySQL 5.5, which is that there was a short-lived MySQL 5.4 development series. This series is no longer being worked on, but to accommodate users of both series, this section includes one subsection for users upgrading from MySQL 5.1 to 5.5 and another for users upgrading from MySQL 5.4 to 5.5.
还有一种升级至5.5版的特殊情况,就是有一个短期的MySQL 5.4开发系列。这个系列已不再继续工作,但为了适应两个系列的用户,本章节包括一个MySQL 5.1升级至5.5的分段,和一个5.4升级至5.5的分段。

To upgrade to MySQL 5.5, use the items in the following checklist as a guide:
要升级至MySQL 5.5版,请使用下列清单中的条目作为指南:

Before any upgrade, back up your databases, including the mysql database that contains the grant tables. See Section 7.2, “Database Backup Methods”.
在任何升级之前,备份你的数据库,包括含有授权表的mysql数据库。参见7.2节“数据库备份方法”。

Read all the notes in Section 2.11.1.1, “Upgrading from MySQL 5.1 to 5.5”, or Section 2.11.1.2, “Upgrading from MySQL 5.4 to 5.5”, depending on whether you currently use MySQL 5.1 or 5.4. These notes enable you to identify upgrade issues that apply to your current MySQL installation. Some incompatibilities discussed in that section require your attention before upgrading. Others should be dealt with after upgrading.
阅读第2.11.1.1节“从MySQL 5.1版升级至5.5版”中的所有说明,或者是第2.11.1.1节“从MySQL 5.4版升级至5.5版”,取决于您目前使用MySQL 5.1还是5.4。这些说明让你能够确定升级时需要注意的问题,以适用于当前的MySQL安装版本。在这些章节中提到的不兼容问题,有些问题需要你在升级之前就注意到,有些则是在升级之后再处理。

Read the Release Notes as well, which provide information about features that are new in MySQL 5.5 or differ from those found in earlier MySQL releases.
还要读一下发行说明,它提供了MySQL 5.5不同于较早版本MySQL的一些特性的相关信息。

After upgrading to a new version of MySQL, run mysql_upgrade (see Section 4.4.7, “mysql_upgrade — Check and Upgrade MySQL Tables”). This program checks your tables, and attempts to repair them if necessary. It also updates your grant tables to make sure that they have the current structure so that you can take advantage of any new capabilities. (Some releases of MySQL introduce changes to the structure of the grant tables to add new privileges or features.)
在升级至新版本MySQL之后,运行mysql_upgrade(参见4.4.7节“mysql_upgrade —— 检查和升级MySQL表”)。这个程序检查你的表,如果需要的话会试图修复它们。它也会更新你的授权表,以确保它们有当前版本的表结构,以便你能够使用任何新的功能。(一些MySQL版本会导致授权表的结构发生变化,以增加新的权限和功能。)

mysql_upgrade does not upgrade the contents of the help tables. For upgrade instructions, see Section 5.1.10, “Server-Side Help”.
mysql_upgrade不升级帮助表的内容。有关升级说明,参见5.1.10节,“服务器端的帮助信息”。

If you run MySQL Server on Windows, see Section 2.3.9, “Upgrading MySQL on Windows”.
如果你在Windows上运行MySQL,参见2.3.9节,“在Windows上升级MySQL”。

If you use replication, see Section 17.4.3, “Upgrading a Replication Setup”, for information on upgrading your replication setup.
如果你使用了复制,参见17.4.3节,“升级一个复制的数据库”,有关于复制的数据库的升级信息。

If you use InnoDB, consider setting innodb_fast_shutdown to 0 before shutting down and upgrading your server. When you set innodb_fast_shutdown to 0, InnoDB does a slow shutdown, a full purge and an insert buffer merge before shutting down, which ensures that all data files are fully prepared in case the upgrade process modifies the file format.
如果你用InnoDB,要考虑到在升级服务器之前把innodb_fast_shutdown设置为0。当你把innodb_fast_shutdown设为0时,InnoDB会在关闭之前,采用慢速关闭,执行完整的清除内存数据和插入缓冲合并,以确保所有数据文件已充分的准备好,以防升级过程修改文件格式。

If you upgrade an installation originally produced by installing multiple RPM packages, it is best to upgrade all the packages, not just some. For example, if you previously installed the server and client RPMs, do not upgrade just the server RPM.
如果你升级一个最初由多个rpm包安装而成的MySQL数据库,最好是升级所有的安装包,而不只是一个。举个例子,如果你之前安装了服务器端和客户端的RPM,不要只升级服务器端的RPM。

If you have created a user-defined function (UDF) with a given name and upgrade MySQL to a version that implements a new built-in function with the same name, the UDF becomes inaccessible. To correct this, use DROP FUNCTION to drop the UDF, and then use CREATE FUNCTION to re-create the UDF with a different nonconflicting name. The same is true if the new version of MySQL implements a built-in function with the same name as an existing stored function. See Section 9.2.4, “Function Name Parsing and Resolution”, for the rules describing how the server interprets references to different kinds of functions.
如果你创建了一个用户自定义函数(UDF),然后升级新版的MySQL实现了一个具有相同名称的新的内置函数,那么原来的自定义函数会不可用。要修正这个问题,使用DROP FUNCTION删除这个自定义函数,然后使用CREATE FUNCTION以无冲突的函数名再次创建这个函数。如果新版本的MySQL实现了一个内置函数,跟一个现有的存储函数名称相同,也会如此。参见9.2.4节“函数名称解析和调用判定”,有关服务器解析不同函数的引用的规则。

For upgrades between versions of a MySQL release series that has reached General Availability status, you can move the MySQL format files and data files between different versions on systems with the same architecture. For upgrades to a version of a MySQL release series that is in development status, that is not necessarily true. Use of development releases is at your own risk.
对于已达到“通用可用性”状态的MySQL版本之间的升级,你可以将MySQL格式文件和数据文件,移动到相同体系架构的不同版本的MySQL上。而升级到处于开发状态的MySQL发行版本,则不能这么做。使用开发版本,请自行承担风险。

If you are cautious about using new versions, you can always rename your old mysqld before installing a newer one. For example, if you are using a version of MySQL 5.1 and want to upgrade to 5.5, rename your current server from mysqld to mysqld-5.1. If your new mysqld then does something unexpected, you can simply shut it down and restart with your old mysqld.
如果你要谨慎地使用新版本,你可以在安装新版之前重命名你的旧版mysqld。例如,如果你在使用MySQL 5.1并想要升级至5.5,就重命名你当前的mysqld文件改为mysqld-5.1。如果你的新的mysqld出现意想不到的情况,你可以关闭它并用旧的mysqld重新启动。

If problems occur, such as that the new mysqld server does not start or that you cannot connect without a password, verify that you do not have an old my.cnf file from your previous installation. You can check this with the --print-defaults option (for example, mysqld --print-defaults). If this command displays anything other than the program name, you have an active my.cnf file that affects server or client operation.
如果出现问题,比如新mysqld服务器无法启动,或者你没有密码就不能连接,确认你没有用以前安装的旧版my.cnf文件。你可以用--print-defaults选项检查一下(例如,mysqld --print-defaults)。如果这个命令除了显示程序名称外还显示了一些东西,则表示你有一个正在生效的my.cnf文件,影响服务器或客户端的操作。

If, after an upgrade, you experience problems with compiled client programs, such as Commands out of sync or unexpected core dumps, you probably have used old header or library files when compiling your programs. In this case, you should check the date for your mysql.h file and libmysqlclient.a library to verify that they are from the new MySQL distribution. If not, recompile your programs with the new headers and libraries. Recompilation might also be necessary for programs compiled against the shared client library if the library major version number has changed (for example from libmysqlclient.so.15 to libmysqlclient.so.16.
如果在升级后,你的编译出来的客户端程序有问题,比如命令不同步或者不正常的核心转储,那么有可能是你在编译时使用了旧的头文件或者库文件。在这种情况下,你应该检查mysql.h文件和libmysqlclient.a库的日期,以确保它们来自新的MySQL发布版。如果不是新的,要用新的头文件和库文件重新编译。如果共享的客户端库文件的主版本号发生了变化(比如从libmysqlclient.so.15到libmysqlclient.so.16),那么可能也必须要重新编译。

If your MySQL installation contains a large amount of data that might take a long time to convert after an in-place upgrade, you might find it useful to create a “dummy” database instance for assessing what conversions might be needed and the work involved to perform them. Make a copy of your MySQL instance that contains a full copy of the mysql database, plus all other databases without data. Run your upgrade procedure on this dummy instance to see what actions might be needed so that you can better evaluate the work involved when performing actual data conversion on your original database instance.
如果您的MySQL包含大量数据,可能在就地升级之后需要很长时间转换,你可能会需要创建一个“虚拟”的数据库实例,用来评估可能需要的转换和相关的工作。复制您的MySQL实例,包含一个完整的MySQL数据库的副本,以及所有无数据的其他数据库。在这个虚拟实例上运行升级程序来观察需要执行哪些动作,这样就可以更好地评估,在原始数据库实例上执行数据转换会涉及到哪些工作。

It is a good idea to rebuild and reinstall the Perl DBD::mysql module whenever you install a new release of MySQL. The same applies to other MySQL interfaces as well, such as PHP mysql extensions and the Python MySQLdb module.
每当安装新版MySQL时,重新构建和重新安装Perl的DBD::mysql模块是一个好主意。这同样适用于其他MySQL接口,如PHP mysql扩展和Python MySQLdb模块。
阅读(346) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:Stopping and Restarting Apache HTTP Server

给主人留下些什么吧!~~