From mboxrd@z Thu Jan 1 00:00:00 1970
Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org)
by nuthatch.gentoo.org with esmtp (Exim 4.60)
(envelope-from )
id 1GLdlF-0006xt-LV
for garchives@archives.gentoo.org; Fri, 08 Sep 2006 10:39:02 +0000
Received: from robin.gentoo.org (localhost [127.0.0.1])
by robin.gentoo.org (8.13.8/8.13.6) with SMTP id k88Ad7GA031943;
Fri, 8 Sep 2006 10:39:07 GMT
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
by robin.gentoo.org (8.13.8/8.13.6) with ESMTP id k88Ad5HS015018
for ; Fri, 8 Sep 2006 10:39:06 GMT
Received: from lark (lark.gentoo.osuosl.org [140.211.166.177])
(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
(No client certificate requested)
by smtp.gentoo.org (Postfix) with SMTP id 9A36064857
for ; Fri, 8 Sep 2006 10:39:04 +0000 (UTC)
Received: by lark (sSMTP sendmail emulation); Fri, 8 Sep 2006 10:39:04 +0000
From: "Xavier Neys"
Date: Fri, 8 Sep 2006 10:39:04 +0000
To: gentoo-doc-cvs@lists.gentoo.org
Subject: [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
Message-Id: <20060908103904.9A36064857@smtp.gentoo.org>
Precedence: bulk
List-Post:
List-Help:
List-Unsubscribe:
List-Subscribe:
List-Id: Gentoo Linux mail
X-BeenThere: gentoo-doc-cvs@gentoo.org
Reply-to: docs-team@lists.gentoo.org
X-Archives-Salt: c1e9c226-5f8d-4ba4-8def-3a583d0da099
X-Archives-Hash: 161e0e0065bd6166021ffb15b3700f87
neysx 06/09/08 10:39:04
Modified: mysql-upgrading.xml
Log:
#143834 Update from Francesco
Revision Changes Path
1.10 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.9&r2=1.10
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- mysql-upgrading.xml 4 Sep 2006 09:38:53 -0000 1.9
+++ mysql-upgrading.xml 8 Sep 2006 10:39:04 -0000 1.10
@@ -1,6 +1,6 @@
-
+
Upgrade guide to MySQL 4.1.x
@@ -13,9 +13,9 @@
-The MySQL herd is proud to announce that MySQL 4.1 can now be found in Gentoo's
-unstable tree (~arch). As the team hopes that it soon will be able to stabilize
-this ebuild, here's an upgrade path for all willing testers.
+The MySQL herd is proud to announce that MySQL 5.0 will soon be found in
+Gentoo's stable tree. This document describes how to upgrade from MySQL 4.* to
+r.0.*
@@ -23,7 +23,43 @@
1.8
-2006-09-04
+2006-09-08
+
+
+Straight upgrade, suggested for 4.1 => 5.0 migration
+
+
+
+
+The myisam storage engine in 4.1 version was already mature enough to allow a
+direct upgrade to the next major version of MySQL.
+
+
+
+# quickpkg dev-db/mysql
+# alias MYSQL="mysql --user=root --password='your_password'"
+# DATADIR=$(MYSQL --batch --raw --silent --skip-column-names \
+ --execute='SHOW variables LIKE "datadir";' \
+ | sed -e 's|datadir[ \t]||')
+# MYSQL --execute="FLUSH TABLES WITH READ LOCK;"
+# tar -cjpvf ~/mysql.$(date +%F"T"%H-%M).tar.bz2 \
+ /etc/mysql/conf.d/mysql /etc/mysql/my.cnf "${DATADIR}"
+# MYSQL --execute="UNLOCK TABLES;"
+# tar -tjvf ~/mysql.*.tar.bz2
+# emerge -av ">mysql-5.0"
+# dispatch-conf
+# revdep-rebuild
+# /etc/init.d/mysql restart
+# mysql_upgrade_shell --user=root --password='your_password' \
+ --protocol=tcp --datadir="${DATADIR}"
+# /etc/init.d/mysql restart
+# unset DATADIR
+# unalias MYSQL
+
+
+
+
+
Upgrading from old versions of MySQL
@@ -32,8 +68,8 @@
Users upgrading from an old version (<4.0.24) of MySQL will first have to
-install MySQL 4.0.25. If you are already running a current version, you can skip
-this section and continue with the next one.
+install MySQL 4.0.25. If you are already running a more recent version, you can
+skip this section and continue with the next one.
@@ -44,14 +80,14 @@
-
+
Creating a backup of your current data
-One of the most important tasks that every database administrator has to perfom
-is backing up data. Here we go:
+One of the most important tasks that every database administrator has to
+perform is backing up data. Here we go:
@@ -71,9 +107,9 @@
-Now a file named BACKUP_MYSQL_4.0.SQL should exist, which later can
-be used to recreate your data. The data is described in the MySQL dialect of SQL,
-the Structured Query Language.
+Now a file named BACKUP_MYSQL_4.0.SQL should exist, which can be
+used later to recreate your data. The data is described in the MySQL dialect of
+SQL, the Structured Query Language.
@@ -105,15 +141,15 @@
# /etc/init.d/mysql stop
# emerge -C mysql
-# tar cjpvf ~/mysql.$(date +%F_%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/
+# tar cjpvf ~/mysql.$(date +%F"T"%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/
# ls -l ~/mysql.*
# rm -rf /var/lib/mysql/ /var/log/mysql
-Now two different backups should exist: The SQL one, which is portable between
-various versions of MySQL, and the other one that will allow you to quickly
-restore your database. This will be covered later in this doc in more detail.
+Now two different backups should exist: the SQL one, which is portable between
+various versions of MySQL, and the other one that will allow you to quickly
+restore your database. This is covered later in this doc in more detail.
@@ -124,7 +160,8 @@
# emerge -av ">mysql-4.1"
-# dispatch-conf
+(Update your config files, you may also use dispatch-conf)
+# etc-update
# revdep-rebuild
@@ -133,7 +170,7 @@
-# emerge --config =mysql-4.1.<micro_version>
+# emerge --config =mysql-4.1.<micro_version>
# /etc/init.d/mysql start
@@ -142,11 +179,25 @@
-The default /etc/mysql/my.cnf file sets binary logging
+The default /etc/mysql/my.cnf file sets binary logging on
(log-bin) by default. This will log every single transaction that
-modifies data. If run on a very large database (1GB for example), this could
-create extremely large files that take up disk space rather quickly. If you
-are low on space, disabling binary logging might be a good idea.
+modifies data. If run on a very large database (1GB or more), this could create
+extremely large files that take up disk space rather quickly. If you are low on
+space, disabling binary logging might be a good idea.
+
+
+
+The default character set in gentoo mysql 4.1 and above is utf8. If the
+data contain non-ASCII characters, you may want to preserve the default
+character set of the database replacing all occurrences of utf8 with
+latin1 into the /etc/mysql/my.cnf config file. More
+information can be found Charset
+conversion charapter.
+
+
+
+The administrative mysql database that containins user names, passwords
+amongst other things is and must be in encoded in utf8.
@@ -164,8 +215,8 @@
-If you now restart your MySQL daemon and everything went as expected, you will
-have a fully working version of 4.1.x! :-)
+If you restart your MySQL daemon now and everything goes as expected, you have
+a fully working version of 4.1.x.
@@ -174,7 +225,7 @@
If you encountered any problems during the upgrade process, please report them
-at our Bugzilla.
+on Bugzilla.
@@ -190,54 +241,178 @@
If you are not happy with MySQL 4.1, it's possible to go back to MySQL 4.0.
-
+
# /etc/init.d/mysql stop
# emerge -C mysql
# rm -rf /var/lib/mysql/ /var/log/mysql
# emerge --usepkgonly "<mysql-4.1"
-# tar -xjpvf mysql.[tag] -C /
+(Replace <timestamp> with the one used when creating the backup.)
+# tar -xjpvf mysql.<timestamp>.tar.bz2 -C /
# /etc/init.d/mysql start
-
-After downgrading, you may need to run revdep-rebuild.
-
+
+If packages other than dev-db/mysql have been emerged following this
+guide, you need to run revdep-rebuild to ensure that every client is
+using the correct mysqlclient shared object.
+