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.62) (envelope-from ) id 1H3JF7-0003sI-Ew for garchives@archives.gentoo.org; Sat, 06 Jan 2007 21:38:21 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.8/8.13.8) with SMTP id l06Lc6OS030743; Sat, 6 Jan 2007 21:38:06 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.13.8/8.13.8) with ESMTP id l06Lc4Ki022163 for ; Sat, 6 Jan 2007 21:38:05 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 36DC464A4F for ; Sat, 6 Jan 2007 21:38:02 +0000 (UTC) Received: by lark (sSMTP sendmail emulation); Sat, 6 Jan 2007 21:38:01 +0000 From: "Josh Saddler" Date: Sat, 6 Jan 2007 21:38:01 +0000 To: gentoo-doc-cvs@lists.gentoo.org Subject: [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml Message-Id: <20070106213802.36DC464A4F@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: f158c027-e2f1-4e14-9767-bae8dfccd2fc X-Archives-Hash: e094c8e0f8b14f042623f50aca534ba7 nightmorph 07/01/06 21:38:01 Modified: mysql-upgrading.xml Log: updated mysql-upgrading guide for bug 111072, thanks to vivo for the patches Revision Changes Path 1.19 xml/htdocs/doc/en/mysql-upgrading.xml file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.19&view=markup plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.19&content-type=text/plain diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.18&r2=1.19 Index: mysql-upgrading.xml =================================================================== RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- mysql-upgrading.xml 29 Dec 2006 05:49:47 -0000 1.18 +++ mysql-upgrading.xml 6 Jan 2007 21:38:01 -0000 1.19 @@ -1,6 +1,6 @@ - + Upgrade guide to MySQL 4.* or 5.0.* @@ -22,8 +22,8 @@ -1.15 -2006-12-28 +1.16 +2007-01-06 Straight upgrade, suggested for 4.1 => 5.0 migration @@ -43,16 +43,31 @@ from old versions of MySQL. +

+For this step two shells are required because locks belong to the mysql +session. +

+
 # 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;"
+
+(This next step should be done in the second shell)
+# mysql --user=root --password='your_password'"
+mysql> FLUSH TABLES WITH READ LOCK;
+
+(Return to the first shell to run this command)
 # tar -cjpvf ~/mysql.$(date +%F"T"%H-%M).tar.bz2 \
      /etc/conf.d/mysql /etc/mysql/my.cnf "${DATADIR}"
-# MYSQL --execute="UNLOCK TABLES;"
+
+(The following commands should be done in the second shell)
+mysql> UNLOCK TABLES;
+mysql> quit
+
+(Return to the first shell for the rest of the upgrade)
 # tar -tjvf ~/mysql.*.tar.bz2
 # emerge -av ">dev-db/mysql-5.0"
 # dispatch-conf
@@ -215,6 +230,21 @@
 amongst other things is and must be in encoded in utf8.
 
 
+

+Older mysqldump utilities may export tables in the wrong order when foreign keys +are involved. To work around this problem, surround the SQL with the following +statements: +

+ +
+SET FOREIGN_KEY_CHECKS=0
+SET FOREIGN_KEY_CHECKS=1
+
+ +

+Next, import the backup. +

+
 # cat BACKUP_MYSQL_4.0.SQL \
      | mysql \



-- 
gentoo-doc-cvs@gentoo.org mailing list