* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2005-09-11 20:41 Lukasz Damentko
0 siblings, 0 replies; 20+ messages in thread
From: Lukasz Damentko @ 2005-09-11 20:41 UTC (permalink / raw
To: gentoo-doc-cvs
rane 05/09/11 20:41:05
Modified: xml/htdocs/doc/en metadoc.xml
Added: xml/htdocs/doc/en mysql-upgrading.xml
Log:
adding new guide from #105626
Revision Changes Path
1.106 +7 -2 xml/htdocs/doc/en/metadoc.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/metadoc.xml?rev=1.106&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/metadoc.xml?rev=1.106&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/metadoc.xml.diff?r1=1.105&r2=1.106&cvsroot=gentoo
Index: metadoc.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/metadoc.xml,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- metadoc.xml 6 Sep 2005 17:59:53 -0000 1.105
+++ metadoc.xml 11 Sep 2005 20:41:05 -0000 1.106
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding="UTF-8"?>
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/metadoc.xml,v 1.105 2005/09/06 17:59:53 swift Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/metadoc.xml,v 1.106 2005/09/11 20:41:05 rane Exp $ -->
<!DOCTYPE metadoc SYSTEM "/dtd/metadoc.dtd">
<metadoc lang="en">
-<version>1.35</version>
+<version>1.36</version>
<members>
<lead>swift</lead>
<lead>neysx</lead>
@@ -424,6 +424,7 @@
<file id="sudo-guide">/doc/en/sudo-guide.xml</file>
<file id="freebsd-guide">/doc/en/gentoo-freebsd.xml</file>
<file id="mips-faq">/doc/en/gentoo-mips-faq.xml</file>
+ <file id="mysql-upgrading">/doc/en/mysql-upgrading.xml</file>
</files>
<docs>
<doc id="name-logo">
@@ -1121,5 +1122,9 @@
<memberof>faq</memberof>
<fileid>mips-faq</fileid>
</doc>
+ <doc id="mysql-upgrading">
+ <memberof>sysadmin_specific</memberof>
+ <fileid>mysql-upgrading</fileid>
+ </doc>
</docs>
</metadoc>
1.1 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.1&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.1&content-type=text/plain&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.1 2005/09/11 20:41:05 rane Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
<author title="Author">
<mail link="citizen428@gentoo.org">Michael Kohl</mail>
</author>
<author title="Author">
<mail link="vivo@gentoo.org">Francesco Riosa</mail>
</author>
<abstract>
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.
</abstract>
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
<version>1.0</version>
<date>2005-09-11</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
<section>
<body>
<p>
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.
</p>
<pre caption="Simple upgrade">
# <i>emerge -av --buildpkg "<mysql-4.1"</i>
</pre>
</body>
</section>
</chapter>
<chapter>
<title>Creating a backup of your current data</title>
<section>
<body>
<p>
One of the fundamental works of every database administrator is ... to make
backup of the data. So proceed with one.
</p>
<pre caption="Dump of all databases">
# <i>mysqldump \</i>
<i>-uroot \</i>
<i>-p$PASSWORD \</i>
<i>-hlocalhost \</i>
<i>--all-databases \</i>
<i>--all \</i>
<i>--opt \</i>
<i>--allow-keywords \</i>
<i>--flush-logs \</i>
<i>--hex-blob \</i>
<i>--master-data \</i>
<i>--max_allowed_packet=16M \</i>
<i>--result-file=BACKUP_MYSQL_4.0.SQL</i>
</pre>
<p>
Now a file named <path>BACKUP_MYSQL_4.0.SQL</path> should exist, this one can be
used to recreate your data, the data is described in the MySQL dialect of SQL,
the Structured Query Language.
</p>
<p>
This would be a good time to see if the backup you have created is working.
</p>
</body>
</section>
</chapter>
<chapter>
<title>Upgrading from recent versions of MySQL</title>
<section>
<body>
<p>
If you have skipped step #1, you now have to create a backup package (the
database server, not the data) of the currently installed version:
</p>
<pre caption="Binary package backup">
# <i>quickpkg dev-db/mysql</i>
</pre>
<p>
Now it's time to clean out the current version and all it's data:
</p>
<pre caption="Uninstall MySQL">
# <i>/etc/init.d/mysql stop</i>
# <i>emerge -C mysql</i>
# <i>tar -cjpvf ~/mysql.$(date +%F_%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/</i>
# <i>ls -l ~/mysql.*</i>
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i>
</pre>
<note>
At this time two backup should exist, one portable between various MySQL
versions, the SQL one. <br />
The other instead permit to restore quickly the system at this point. Later on
this doc will be explain how to recover from this last one.
</note>
<p>
After you got rid of your old MySQL installation, you can now install the new
version. Note that <c>revdep-rebuild</c> is necessary for rebuilding packages
linking against MySQL.
</p>
<pre caption="Upgrading the binaries">
# <i>emerge -av ">mysql-4.1"</i>
# <i>dispatch-conf</i>
# <i>revdep-rebuild</i>
</pre>
<p>
Now configure the newly installed version of MySQL and restart the daemon:
</p>
<pre caption="Configure MySQL 4.1 base setup">
# <i>ebuild /var/db/pkg/dev-db/mysql-4.1.<micro_version>/mysql-4.1.<micro_version>.ebuild config</i>
# <i>/etc/init.d/mysql start</i>
</pre>
<p>
Finally you can import the backup you have created during step #2:
</p>
<pre caption="Importing the SQL backup">
# <i>cat BACKUP_MYSQL_4.0.SQL \</i>
<i>| mysql \</i>
<i>-uroot \</i>
<i>-p$PASSWORD \</i>
<i>-hlocalhost \</i>
<i>--max_allowed_packet=16M</i>
# <i>mysql_fix_privilege_tables \</i>
<i>--defaults-file=/etc/mysql/my.cnf \</i>
<i>--user=root \</i>
<i>--password=$PASSWORD</i>
</pre>
<p>
If you now restart your MySQL daemon and everything went as expected, you will
have a fully working version of 4.1.x! :-)
</p>
<pre caption="Restart the MySQL instance">
# <i>/etc/init.d/mysql restart</i>
</pre>
<p>
If you encountered any problems during the upgrade process, please report them
at our <uri link="https://bugs.gentoo.org">Bugzilla</uri>.
</p>
</body>
</section>
</chapter>
<chapter>
<title>Recover the old installation of MySQL 4.0</title>
<section>
<body>
<p>
If the result is not fully satisfactory, it's possible to reinstall the old
MySQL 4.0 version.
</p>
<pre caption="Back to the past">
# <i>/etc/init.d/mysql stop</i>
# <i>emerge -C mysql</i>
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i>
# <i>emerge --usepkgonly "<mysql-4.1"</i>
# <i>tar -xjpvf mysql.[tag] -C/tmp</i>
# <i>/etc/init.d/mysql start</i>
</pre>
</body>
</section>
</chapter>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2005-09-21 19:15 Lukasz Damentko
0 siblings, 0 replies; 20+ messages in thread
From: Lukasz Damentko @ 2005-09-21 19:15 UTC (permalink / raw
To: gentoo-doc-cvs
rane 05/09/21 19:15:49
Modified: xml/htdocs/doc/en mysql-upgrading.xml
Log:
update from #106814
Revision Changes Path
1.2 +21 -22 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.2&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.2&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml.diff?r1=1.1&r2=1.2&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mysql-upgrading.xml 11 Sep 2005 20:41:05 -0000 1.1
+++ mysql-upgrading.xml 21 Sep 2005 19:15:49 -0000 1.2
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.1 2005/09/11 20:41:05 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.2 2005/09/21 19:15:49 rane Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.0</version>
-<date>2005-09-11</date>
+<version>1.1</version>
+<date>2005-09-21</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -50,8 +50,8 @@
<body>
<p>
-One of the fundamental works of every database administrator is ... to make
-backup of the data. So proceed with one.
+One of the most important tasks that every database administrator has to perfom
+is backing up data. Here we go:
</p>
<pre caption="Dump of all databases">
@@ -67,17 +67,18 @@
<i>--hex-blob \</i>
<i>--master-data \</i>
<i>--max_allowed_packet=16M \</i>
+ <i>--quote-names</i>
<i>--result-file=BACKUP_MYSQL_4.0.SQL</i>
</pre>
<p>
-Now a file named <path>BACKUP_MYSQL_4.0.SQL</path> should exist, this one can be
-used to recreate your data, the data is described in the MySQL dialect of SQL,
+Now a file named <path>BACKUP_MYSQL_4.0.SQL</path> 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.
</p>
<p>
-This would be a good time to see if the backup you have created is working.
+Now would also be a good time to see if the backup you have created is working.
</p>
</body>
@@ -90,7 +91,7 @@
<body>
<p>
-If you have skipped step #1, you now have to create a backup package (the
+If you have skipped step #1, you now have to create a backup package (of the
database server, not the data) of the currently installed version:
</p>
@@ -99,7 +100,7 @@
</pre>
<p>
-Now it's time to clean out the current version and all it's data:
+Now it's time to clean out the current version and all of its data:
</p>
<pre caption="Uninstall MySQL">
@@ -111,10 +112,9 @@
</pre>
<note>
-At this time two backup should exist, one portable between various MySQL
-versions, the SQL one. <br />
-The other instead permit to restore quickly the system at this point. Later on
-this doc will be explain how to recover from this last one.
+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.
</note>
<p>
@@ -180,8 +180,7 @@
<body>
<p>
-If the result is not fully satisfactory, it's possible to reinstall the old
-MySQL 4.0 version.
+If you are not happy with MySQL 4.1, it's possible to go back to MySQL 4.0.
</p>
<pre caption="Back to the past">
@@ -189,7 +188,7 @@
# <i>emerge -C mysql</i>
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i>
# <i>emerge --usepkgonly "<mysql-4.1"</i>
-# <i>tar -xjpvf mysql.[tag] -C/tmp</i>
+# <i>tar -xjpvf mysql.[tag] -C /</i>
# <i>/etc/init.d/mysql start</i>
</pre>
@@ -203,10 +202,10 @@
<body>
<p>
-Under particular conditions it's possible to upgrade directly to the next major
-version of MySQL.<br />
-If you know that this is your case, with a little trick it's possible to upgrade
-straight to MySQL 4.1.
+Under certain conditions it's possible to directly upgrade to the next major
+version of MySQL. If you know what you're doing and think that applies to your
+case, here's a little trick that makes it possible to directly upgrade to
+MySQl 4.1.
</p>
<pre caption="Straight upgrade">
@@ -227,7 +226,7 @@
</pre>
<p>
-Good luck and don't ask.
+Good luck and if something fails, don't say we didn't warn you! ;-)
</p>
</body>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2005-10-17 19:30 Lukasz Damentko
0 siblings, 0 replies; 20+ messages in thread
From: Lukasz Damentko @ 2005-10-17 19:30 UTC (permalink / raw
To: gentoo-doc-cvs
rane 05/10/17 19:30:16
Modified: xml/htdocs/doc/en mysql-upgrading.xml
Log:
#109606 adding one missing backslash
Revision Changes Path
1.3 +4 -4 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.3&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.3&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml.diff?r1=1.2&r2=1.3&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mysql-upgrading.xml 21 Sep 2005 19:15:49 -0000 1.2
+++ mysql-upgrading.xml 17 Oct 2005 19:30:16 -0000 1.3
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.2 2005/09/21 19:15:49 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.3 2005/10/17 19:30:16 rane Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.1</version>
-<date>2005-09-21</date>
+<version>1.2</version>
+<date>2005-10-17</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -67,7 +67,7 @@
<i>--hex-blob \</i>
<i>--master-data \</i>
<i>--max_allowed_packet=16M \</i>
- <i>--quote-names</i>
+ <i>--quote-names \</i>
<i>--result-file=BACKUP_MYSQL_4.0.SQL</i>
</pre>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2005-10-17 23:13 Lukasz Damentko
0 siblings, 0 replies; 20+ messages in thread
From: Lukasz Damentko @ 2005-10-17 23:13 UTC (permalink / raw
To: gentoo-doc-cvs
rane 05/10/17 23:13:08
Modified: xml/htdocs/doc/en mysql-upgrading.xml
Log:
#109643, removing dash from tar command parameters
Revision Changes Path
1.4 +4 -4 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.4&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml.diff?r1=1.3&r2=1.4&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mysql-upgrading.xml 17 Oct 2005 19:30:16 -0000 1.3
+++ mysql-upgrading.xml 17 Oct 2005 23:13:08 -0000 1.4
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.3 2005/10/17 19:30:16 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.4 2005/10/17 23:13:08 rane Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.2</version>
-<date>2005-10-17</date>
+<version>1.3</version>
+<date>2005-11-18</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -106,7 +106,7 @@
<pre caption="Uninstall MySQL">
# <i>/etc/init.d/mysql stop</i>
# <i>emerge -C mysql</i>
-# <i>tar -cjpvf ~/mysql.$(date +%F_%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/</i>
+# <i>tar cjpvf ~/mysql.$(date +%F_%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/</i>
# <i>ls -l ~/mysql.*</i>
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i>
</pre>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2005-10-21 10:11 Xavier Neys
0 siblings, 0 replies; 20+ messages in thread
From: Xavier Neys @ 2005-10-21 10:11 UTC (permalink / raw
To: gentoo-doc-cvs
neysx 05/10/21 10:11:41
Modified: xml/htdocs/doc/en mysql-upgrading.xml
Log:
#109857 use emerge --config instead of ebuild ... config
Revision Changes Path
1.5 +4 -4 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.5&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.5&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml.diff?r1=1.4&r2=1.5&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mysql-upgrading.xml 17 Oct 2005 23:13:08 -0000 1.4
+++ mysql-upgrading.xml 21 Oct 2005 10:11:41 -0000 1.5
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.4 2005/10/17 23:13:08 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.5 2005/10/21 10:11:41 neysx Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.3</version>
-<date>2005-11-18</date>
+<version>1.4</version>
+<date>2005-10-21</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -134,7 +134,7 @@
</p>
<pre caption="Configure MySQL 4.1 base setup">
-# <i>ebuild /var/db/pkg/dev-db/mysql-4.1.<micro_version>/mysql-4.1.<micro_version>.ebuild config</i>
+# <i>emerge --config =mysql-4.1.<micro_version></i>
# <i>/etc/init.d/mysql start</i>
</pre>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2005-12-21 11:03 Xavier Neys
0 siblings, 0 replies; 20+ messages in thread
From: Xavier Neys @ 2005-12-21 11:03 UTC (permalink / raw
To: gentoo-doc-cvs
neysx 05/12/21 11:03:31
Modified: xml/htdocs/doc/en mysql-upgrading.xml
Log:
#116252 --all not required
s:-p$PASSWORD:--password=your_password:
Revision Changes Path
1.6 +8 -9 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.6&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.6&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml.diff?r1=1.5&r2=1.6&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mysql-upgrading.xml 21 Oct 2005 10:11:41 -0000 1.5
+++ mysql-upgrading.xml 21 Dec 2005 11:03:31 -0000 1.6
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.5 2005/10/21 10:11:41 neysx Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.6 2005/12/21 11:03:31 neysx Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.4</version>
-<date>2005-10-21</date>
+<version>1.5</version>
+<date>2005-12-21</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -57,10 +57,9 @@
<pre caption="Dump of all databases">
# <i>mysqldump \</i>
<i>-uroot \</i>
- <i>-p$PASSWORD \</i>
+ <i>--password=</i><comment>your_password</comment><i> \</i>
<i>-hlocalhost \</i>
<i>--all-databases \</i>
- <i>--all \</i>
<i>--opt \</i>
<i>--allow-keywords \</i>
<i>--flush-logs \</i>
@@ -146,14 +145,14 @@
# <i>cat BACKUP_MYSQL_4.0.SQL \</i>
<i>| mysql \</i>
<i>-uroot \</i>
- <i>-p$PASSWORD \</i>
+ <i>--password=</i><comment>your_password</comment><i> \</i>
<i>-hlocalhost \</i>
<i>--max_allowed_packet=16M</i>
# <i>mysql_fix_privilege_tables \</i>
<i>--defaults-file=/etc/mysql/my.cnf \</i>
<i>--user=root \</i>
- <i>--password=$PASSWORD</i>
+ <i>--password=</i><comment>your_password</comment><i></i>
</pre>
<p>
@@ -220,8 +219,8 @@
# <i>revdep-rebuild</i>
# <i>/etc/init.d/mysql start</i>
# <i>mysql_fix_privilege_tables --defaults-file=/etc/mysql/my.cnf \</i>
- <i>-uroot --password=$PASSWORD</i>
-# <i>mysql --database=mysql -uroot -p$PASSWORD < /tmp/new_pieces.sql</i>
+ <i>-uroot --password=</i><comment>your_password</comment><i></i>
+# <i>mysql --database=mysql -uroot --password=</i><comment>your_password</comment><i> < /tmp/new_pieces.sql</i>
# <i>/etc/init.d/mysql restart</i> # just to be sure
</pre>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-01-04 11:26 Xavier Neys
0 siblings, 0 replies; 20+ messages in thread
From: Xavier Neys @ 2006-01-04 11:26 UTC (permalink / raw
To: gentoo-doc-cvs
neysx 06/01/04 11:26:16
Modified: xml/htdocs/doc/en mysql-upgrading.xml
Log:
#117610 Quote password
Revision Changes Path
1.7 +8 -8 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.7&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.7&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml.diff?r1=1.6&r2=1.7&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mysql-upgrading.xml 21 Dec 2005 11:03:31 -0000 1.6
+++ mysql-upgrading.xml 4 Jan 2006 11:26:16 -0000 1.7
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.6 2005/12/21 11:03:31 neysx Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.7 2006/01/04 11:26:16 neysx Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.5</version>
-<date>2005-12-21</date>
+<version>1.6</version>
+<date>2006-01-04</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -57,7 +57,7 @@
<pre caption="Dump of all databases">
# <i>mysqldump \</i>
<i>-uroot \</i>
- <i>--password=</i><comment>your_password</comment><i> \</i>
+ <i>--password=</i><comment>'your_password'</comment><i> \</i>
<i>-hlocalhost \</i>
<i>--all-databases \</i>
<i>--opt \</i>
@@ -145,14 +145,14 @@
# <i>cat BACKUP_MYSQL_4.0.SQL \</i>
<i>| mysql \</i>
<i>-uroot \</i>
- <i>--password=</i><comment>your_password</comment><i> \</i>
+ <i>--password=</i><comment>'your_password'</comment><i> \</i>
<i>-hlocalhost \</i>
<i>--max_allowed_packet=16M</i>
# <i>mysql_fix_privilege_tables \</i>
<i>--defaults-file=/etc/mysql/my.cnf \</i>
<i>--user=root \</i>
- <i>--password=</i><comment>your_password</comment><i></i>
+ <i>--password=</i><comment>'your_password'</comment><i></i>
</pre>
<p>
@@ -219,8 +219,8 @@
# <i>revdep-rebuild</i>
# <i>/etc/init.d/mysql start</i>
# <i>mysql_fix_privilege_tables --defaults-file=/etc/mysql/my.cnf \</i>
- <i>-uroot --password=</i><comment>your_password</comment><i></i>
-# <i>mysql --database=mysql -uroot --password=</i><comment>your_password</comment><i> < /tmp/new_pieces.sql</i>
+ <i>-uroot --password=</i><comment>'your_password'</comment><i></i>
+# <i>mysql --database=mysql -uroot --password=</i><comment>'your_password'</comment><i> < /tmp/new_pieces.sql</i>
# <i>/etc/init.d/mysql restart</i> # just to be sure
</pre>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-03-11 18:26 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2006-03-11 18:26 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/03/11 18:26:30
Modified: mysql-upgrading.xml
Log:
Added <impo> about binary logfile size in mysql-upgrading, see bug 123861
Revision Changes Path
1.8 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.8&content-type=text/x-cvsweb-markup&cvsroot=gentoo
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.8&content-type=text/plain&cvsroot=gentoo
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/mysql-upgrading.xml.diff?r1=1.7&r2=1.8&cvsroot=gentoo
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- mysql-upgrading.xml 4 Jan 2006 11:26:16 -0000 1.7
+++ mysql-upgrading.xml 11 Mar 2006 18:26:30 -0000 1.8
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.7 2006/01/04 11:26:16 neysx Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.8 2006/03/11 18:26:30 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.6</version>
-<date>2006-01-04</date>
+<version>1.7</version>
+<date>2006-03-11</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -138,9 +138,17 @@
</pre>
<p>
-Finally you can import the backup you have created during step #2:
+Finally you can import the backup you have created during step #2.
</p>
+<impo>
+The default <path>/etc/mysql/my.cnf</path> file sets binary logging
+(<c>log-bin</c>) 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.
+</impo>
+
<pre caption="Importing the SQL backup">
# <i>cat BACKUP_MYSQL_4.0.SQL \</i>
<i>| mysql \</i>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-09-04 9:38 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2006-09-04 9:38 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/09/04 09:38:53
Modified: mysql-upgrading.xml
Log:
Added revdep-rebuild note to downgrade section, bug 136933
Revision Changes Path
1.9 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.8&r2=1.9
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- mysql-upgrading.xml 11 Mar 2006 18:26:30 -0000 1.8
+++ mysql-upgrading.xml 4 Sep 2006 09:38:53 -0000 1.9
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.8 2006/03/11 18:26:30 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.9 2006/09/04 09:38:53 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.7</version>
-<date>2006-03-11</date>
+<version>1.8</version>
+<date>2006-09-04</date>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -199,6 +199,10 @@
# <i>/etc/init.d/mysql start</i>
</pre>
+<note>
+After downgrading, you <e>may</e> need to run <c>revdep-rebuild</c>.
+</note>
+
</body>
</section>
</chapter>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-09-08 10:39 Xavier Neys
0 siblings, 0 replies; 20+ messages in thread
From: Xavier Neys @ 2006-09-08 10:39 UTC (permalink / raw
To: gentoo-doc-cvs
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 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.9 2006/09/04 09:38:53 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.10 2006/09/08 10:39:04 neysx Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -13,9 +13,9 @@
</author>
<abstract>
-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.*
</abstract>
<!-- The content of this document is licensed under the CC-BY-SA license -->
@@ -23,7 +23,43 @@
<license/>
<version>1.8</version>
-<date>2006-09-04</date>
+<date>2006-09-08</date>
+
+<chapter>
+<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
+<section>
+<body>
+
+<p>
+The myisam storage engine in 4.1 version was already mature enough to allow a
+direct upgrade to the next major version of MySQL.
+</p>
+
+<pre caption="Straight upgrade">
+# <i>quickpkg dev-db/mysql</i>
+# <i>alias MYSQL="mysql --user=root --password=</i><comment>'your_password'</comment><i>"</i>
+# <i>DATADIR=$(MYSQL --batch --raw --silent --skip-column-names \</i>
+ <i>--execute='SHOW variables LIKE "datadir";' \</i>
+ <i>| sed -e 's|datadir[ \t]||')</i>
+# <i>MYSQL --execute="FLUSH TABLES WITH READ LOCK;"</i>
+# <i>tar -cjpvf ~/mysql.$(date +%F"T"%H-%M).tar.bz2 \</i>
+ <i>/etc/mysql/conf.d/mysql /etc/mysql/my.cnf "${DATADIR}"</i>
+# <i>MYSQL --execute="UNLOCK TABLES;"</i>
+# <i>tar -tjvf ~/mysql.*.tar.bz2</i>
+# <i>emerge -av ">mysql-5.0"</i>
+# <i>dispatch-conf</i>
+# <i>revdep-rebuild</i>
+# <i>/etc/init.d/mysql restart</i>
+# <i>mysql_upgrade_shell --user=root --password=</i><comment>'your_password'</comment><i> \</i>
+ <i>--protocol=tcp --datadir="${DATADIR}"</i>
+# <i>/etc/init.d/mysql restart</i>
+# <i>unset DATADIR</i>
+# <i>unalias MYSQL</i>
+</pre>
+
+</body>
+</section>
+</chapter>
<chapter>
<title>Upgrading from old versions of MySQL</title>
@@ -32,8 +68,8 @@
<p>
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 <uri link="#backup">next one</uri>.
</p>
<pre caption="Simple upgrade">
@@ -44,14 +80,14 @@
</section>
</chapter>
-<chapter>
+<chapter id="backup">
<title>Creating a backup of your current data</title>
<section>
<body>
<p>
-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:
</p>
<pre caption="Dump of all databases">
@@ -71,9 +107,9 @@
</pre>
<p>
-Now a file named <path>BACKUP_MYSQL_4.0.SQL</path> 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 <path>BACKUP_MYSQL_4.0.SQL</path> 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.
</p>
<p>
@@ -105,15 +141,15 @@
<pre caption="Uninstall MySQL">
# <i>/etc/init.d/mysql stop</i>
# <i>emerge -C mysql</i>
-# <i>tar cjpvf ~/mysql.$(date +%F_%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/</i>
+# <i>tar cjpvf ~/mysql.$(date +%F"T"%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/</i>
# <i>ls -l ~/mysql.*</i>
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i>
</pre>
<note>
-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.
</note>
<p>
@@ -124,7 +160,8 @@
<pre caption="Upgrading the binaries">
# <i>emerge -av ">mysql-4.1"</i>
-# <i>dispatch-conf</i>
+<comment>(Update your config files, you may also use dispatch-conf)</comment>
+# <i>etc-update</i>
# <i>revdep-rebuild</i>
</pre>
@@ -133,7 +170,7 @@
</p>
<pre caption="Configure MySQL 4.1 base setup">
-# <i>emerge --config =mysql-4.1.<micro_version></i>
+# <i>emerge --config =mysql-4.1.<comment><micro_version></comment></i>
# <i>/etc/init.d/mysql start</i>
</pre>
@@ -142,11 +179,25 @@
</p>
<impo>
-The default <path>/etc/mysql/my.cnf</path> file sets binary logging
+The default <path>/etc/mysql/my.cnf</path> file sets binary logging on
(<c>log-bin</c>) 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.
+</impo>
+
+<impo>
+The default character set in gentoo mysql 4.1 and above is <c>utf8</c>. If the
+data contain <e>non</e>-ASCII characters, you may want to preserve the default
+character set of the database replacing all occurrences of <c>utf8</c> with
+<c>latin1</c> into the <path>/etc/mysql/my.cnf</path> config file. More
+information can be found <uri link="#On_charset_conversion">Charset
+conversion</uri> charapter.
+</impo>
+
+<impo>
+The administrative <c>mysql</c> database that containins user names, passwords
+amongst other things is and <b>must</b> be in encoded in utf8.
</impo>
<pre caption="Importing the SQL backup">
@@ -164,8 +215,8 @@
</pre>
<p>
-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.
</p>
<pre caption="Restart the MySQL instance">
@@ -174,7 +225,7 @@
<p>
If you encountered any problems during the upgrade process, please report them
-at our <uri link="https://bugs.gentoo.org">Bugzilla</uri>.
+on <uri link="http://bugs.gentoo.org">Bugzilla</uri>.
</p>
</body>
@@ -190,54 +241,178 @@
If you are not happy with MySQL 4.1, it's possible to go back to MySQL 4.0.
</p>
-<pre caption="Back to the past">
+<pre caption="Reverting to the previous version">
# <i>/etc/init.d/mysql stop</i>
# <i>emerge -C mysql</i>
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i>
# <i>emerge --usepkgonly "<mysql-4.1"</i>
-# <i>tar -xjpvf mysql.[tag] -C /</i>
+<comment>(Replace <timestamp> with the one used when creating the backup.)</comment>
+# <i>tar -xjpvf mysql.<timestamp>.tar.bz2 -C /</i>
# <i>/etc/init.d/mysql start</i>
</pre>
-<note>
-After downgrading, you <e>may</e> need to run <c>revdep-rebuild</c>.
-</note>
+<impo>
+If packages other than <c>dev-db/mysql</c> have been emerged following this
+guide, you need to run <c>revdep-rebuild</c> to ensure that every client is
+using the correct mysqlclient shared object.
+</impo>
</body>
</section>
</chapter>
-<chapter>
-<title>Straight upgrade, not supported, dangerous</title>
+<chapter id="On_charset_conversion">
+<title>On charset conversion:</title>
<section>
+<title>Introduction</title>
<body>
<p>
-Under certain conditions it's possible to directly upgrade to the next major
-version of MySQL. If you know what you're doing and think that applies to your
-case, here's a little trick that makes it possible to directly upgrade to
-MySQl 4.1.
+This charapter is not intended to be an exhaustive guide on how to do such
+conversions, rather a short list of hints on which the reader can elaborate.
</p>
-<pre caption="Straight upgrade">
-# <i>quickpkg dev-db/mysql</i>
-# <i>/etc/init.d/mysql stop</i>
-# <i>tar -cjpvf ~/mysql.$(date +%F_%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/</i>
-# <i>ls -l ~/mysql.*</i>
-# <i>export MYSQL_STRAIGHT_UPGRADE=1</i>
-# <i>emerge -av ">mysql-4.1"</i>
-# <i>unset MYSQL_STRAIGHT_UPGRADE</i>
-# <i>dispatch-conf</i>
-# <i>revdep-rebuild</i>
-# <i>/etc/init.d/mysql start</i>
-# <i>mysql_fix_privilege_tables --defaults-file=/etc/mysql/my.cnf \</i>
- <i>-uroot --password=</i><comment>'your_password'</comment><i></i>
-# <i>mysql --database=mysql -uroot --password=</i><comment>'your_password'</comment><i> < /tmp/new_pieces.sql</i>
-# <i>/etc/init.d/mysql restart</i> # just to be sure
+<p>
+Converting a database may be a complex task and difficulty increases with data
+variancy. Things like serialized object and blobs are one example where it's
+difficult to keeps pieces together.
+</p>
+
+</body>
+</section>
+<section>
+<title>Indexes</title>
+<body>
+
+<p>
+Every utf-8 char is considered 3 bytes long within an index. Indexes in MySQL
+can be up to 1000 bytes long (767 bytes for InnoDB tables). Note that the
+limits are measured in bytes, whereas the length of a column is interpreted as
+number of characters.
+</p>
+
+<p>
+MySQL can also create indexes on parts of a column, this can be of some help.
+Below are some examples:
+</p>
+
+<pre caption="Indexing using prefixes">
+$ <i>mysql -uroot -p'<comment>your_password</comment>' test</i>
+
+mysql> <i>SHOW variables LIKE "version" \G</i>
+*************************** 1. row ***************************
+Variable_name: version
+ Value: <comment>5.0.24-log</comment>
+1 row in set (0.00 sec)
+
+mysql> <i>CREATE TABLE t1 (</i>
+ -> <i>c1 varchar(255) NOT NULL default '',</i>
+ -> <i>c2 varchar(255) NOT NULL default ''</i>
+ -> <i>) ENGINE=MyISAM DEFAULT CHARSET=utf8;</i>
+Query OK, 0 rows affected (0.01 sec)
+
+mysql> <i>ALTER TABLE t1</i>
+ -> <i>ADD INDEX idx1 ( c1 , c2 );</i>
+<comment>ERROR 1071 (42000): Specified key was too long; max key length is 1000 bytes</comment>
+
+mysql> <i>ALTER TABLE t1</i>
+ -> <i>ADD INDEX idx1 ( c1(165) , c2(165) );</i>
+Query OK, 0 rows affected (0.01 sec)
+Records: 0 Duplicates: 0 Warnings: 0
+
+mysql> <i>CREATE TABLE t2 (</i>
+ -> <i>c1 varchar(255) NOT NULL default '',</i>
+ -> <i>c2 varchar(255) NOT NULL default ''</i>
+ -> <i>) ENGINE=MyISAM DEFAULT CHARSET=sjis;</i>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql> <i>ALTER TABLE t2</i>
+ -> <i>ADD INDEX idx1 ( c1(250) , c2(250) );</i>
+Query OK, 0 rows affected (0.03 sec)
+Records: 0 Duplicates: 0 Warnings: 0
+
+mysql> <i>CREATE TABLE t3 (</i>
+ -> <i>c1 varchar(255) NOT NULL default '',</i>
+ -> <i>c2 varchar(255) NOT NULL default ''</i>
+ -> <i>) ENGINE=MyISAM DEFAULT CHARSET=latin1;</i>
+Query OK, 0 rows affected (0.00 sec)
+
+mysql> <i>ALTER TABLE t3</i>
+ -> <i>ADD INDEX idx1 ( c1 , c2 );</i>
+Query OK, 0 rows affected (0.03 sec)
+Records: 0 Duplicates: 0 Warnings: 0
+</pre>
+
+</body>
+</section>
+<section>
+<title>Environment</title>
+<body>
+
+<p>
+Working in a utf-8 environment, with utf-8 editors and tools help too:
+</p>
+
+<pre caption="Shell evironment variables">
+LC_ALL=en_US.UTF-8
+LANG=en_US.UTF-8
+export LC_ALL LANG
+</pre>
+
+<p>
+The system must be configured to support the chosen UTF-8 locale. You will find
+more information in our <uri link="/doc/en/utf-8.xml">Using UTF-8 with
+Gentoo</uri> and <uri link="/doc/en/guide-localization.xml">Localization
+Guide</uri> documents.
+</p>
+
+</body>
+</section>
+<section>
+<title>iconv</title>
+<body>
+
+<p>
+<c>iconv</c>, provided by <c>sys-libs/glibc</c>, is used to convert text files
+from one charset to another. The <c>app-text/recode</c> package can be used as
+well.
+</p>
+
+<pre caption="Using iconv">
+<comment>(From latin1 to utf8)</comment>
+$ <i>iconv -f ISO-8859-15 -t UTF-8 file1.sql > file2.sql</i>
+
+<comment>(From Japanese to utf8)</comment>
+$ <i>iconv -f ISO2022JP -t UTF-8 file1.sql > file2.sql</i>
</pre>
<p>
-Good luck and if something fails, don't say we didn't warn you! ;-)
+<c>iconv</c> can be used to recode a sql dump even if the environment is not
+set to utf8.
+</p>
+
+</body>
+</section>
+<section>
+<title>SQL Mangling</title>
+<body>
+
+<p>
+It's possible to use the <c>CONVERT()</c> and <c>CAST()</c> MySQL functions to
+convert data in your SQL scripts.
+</p>
+
+</body>
+</section>
+<section>
+<title>Apache (webserver)</title>
+<body>
+
+<p>
+To use utf-8 with apache, you need to adjust the folowing variables in
+<path>httpd.conf</path>: AddDefaultCharset, CharsetDefault, CharsetSourceEnc.
+If your source html files aren't encoded in utf-8, they <b>must</b> be
+converted with <c>iconv</c> or <c>recode</c>.
</p>
</body>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-09-08 10:39 Xavier Neys
0 siblings, 0 replies; 20+ messages in thread
From: Xavier Neys @ 2006-09-08 10:39 UTC (permalink / raw
To: gentoo-doc-cvs
neysx 06/09/08 10:39:40
Modified: mysql-upgrading.xml
Log:
#143834 Update from Francesco, take 2, bump version
Revision Changes Path
1.11 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.10&r2=1.11
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- mysql-upgrading.xml 8 Sep 2006 10:39:04 -0000 1.10
+++ mysql-upgrading.xml 8 Sep 2006 10:39:40 -0000 1.11
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.10 2006/09/08 10:39:04 neysx Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.11 2006/09/08 10:39:40 neysx Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -22,7 +22,7 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.8</version>
+<version>1.9</version>
<date>2006-09-08</date>
<chapter>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-09-08 11:50 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2006-09-08 11:50 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/09/08 11:50:52
Modified: mysql-upgrading.xml
Log:
Typo fixes
Revision Changes Path
1.12 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.11&r2=1.12
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- mysql-upgrading.xml 8 Sep 2006 10:39:40 -0000 1.11
+++ mysql-upgrading.xml 8 Sep 2006 11:50:52 -0000 1.12
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.11 2006/09/08 10:39:40 neysx Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.12 2006/09/08 11:50:52 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.1.x</title>
@@ -15,7 +15,7 @@
<abstract>
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.*
+5.0.*
</abstract>
<!-- The content of this document is licensed under the CC-BY-SA license -->
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-09-10 1:57 Lukasz Damentko
0 siblings, 0 replies; 20+ messages in thread
From: Lukasz Damentko @ 2006-09-10 1:57 UTC (permalink / raw
To: gentoo-doc-cvs
rane 06/09/10 01:57:16
Modified: mysql-upgrading.xml
Log:
the title should mention 5.* and 4.*, not just 4.* to reflect the content
Revision Changes Path
1.13 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.12&r2=1.13
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- mysql-upgrading.xml 8 Sep 2006 11:50:52 -0000 1.12
+++ mysql-upgrading.xml 10 Sep 2006 01:57:15 -0000 1.13
@@ -1,9 +1,9 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.12 2006/09/08 11:50:52 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.13 2006/09/10 01:57:15 rane Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
-<title>Upgrade guide to MySQL 4.1.x</title>
+<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
<author title="Author">
<mail link="citizen428@gentoo.org">Michael Kohl</mail>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.9</version>
-<date>2006-09-08</date>
+<version>1.10</version>
+<date>2006-09-09</date>
<chapter>
<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-09-10 21:11 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2006-09-10 21:11 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/09/10 21:11:22
Modified: mysql-upgrading.xml
Log:
numerous fixes for bug 147078
Revision Changes Path
1.14 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.13&r2=1.14
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- mysql-upgrading.xml 10 Sep 2006 01:57:15 -0000 1.13
+++ mysql-upgrading.xml 10 Sep 2006 21:11:22 -0000 1.14
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.13 2006/09/10 01:57:15 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.14 2006/09/10 21:11:22 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
@@ -14,16 +14,16 @@
<abstract>
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
-5.0.*
+Gentoo's stable tree. This document describes how to upgrade to MySQL 4.* and
+to 5.0.*.
</abstract>
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.10</version>
-<date>2006-09-09</date>
+<version>1.11</version>
+<date>2006-09-10</date>
<chapter>
<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
@@ -31,11 +31,11 @@
<body>
<p>
-The myisam storage engine in 4.1 version was already mature enough to allow a
+The myisam storage engine in version 4.1 was already mature enough to allow a
direct upgrade to the next major version of MySQL.
</p>
-<pre caption="Straight upgrade">
+<pre caption="Straight upgrade from 4.1 to 5.0.*">
# <i>quickpkg dev-db/mysql</i>
# <i>alias MYSQL="mysql --user=root --password=</i><comment>'your_password'</comment><i>"</i>
# <i>DATADIR=$(MYSQL --batch --raw --silent --skip-column-names \</i>
@@ -149,11 +149,11 @@
<note>
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.
+restore your database. This is covered later in this document in more detail.
</note>
<p>
-After you got rid of your old MySQL installation, you can now install the new
+After you get rid of your old MySQL installation, you can now install the new
version. Note that <c>revdep-rebuild</c> is necessary for rebuilding packages
linking against MySQL.
</p>
@@ -187,16 +187,16 @@
</impo>
<impo>
-The default character set in gentoo mysql 4.1 and above is <c>utf8</c>. If the
-data contain <e>non</e>-ASCII characters, you may want to preserve the default
+The default character set in MySQL 4.1 and above is <c>utf8</c>. If the data
+contain <e>non</e>-ASCII characters, you may want to preserve the default
character set of the database replacing all occurrences of <c>utf8</c> with
-<c>latin1</c> into the <path>/etc/mysql/my.cnf</path> config file. More
+<c>latin1</c> in the <path>/etc/mysql/my.cnf</path> config file. More
information can be found <uri link="#On_charset_conversion">Charset
-conversion</uri> charapter.
+conversion</uri> chapter.
</impo>
<impo>
-The administrative <c>mysql</c> database that containins user names, passwords
+The administrative <c>mysql</c> database that contains user names, passwords
amongst other things is and <b>must</b> be in encoded in utf8.
</impo>
@@ -268,7 +268,7 @@
<body>
<p>
-This charapter is not intended to be an exhaustive guide on how to do such
+This chapter is not intended to be an exhaustive guide on how to do such
conversions, rather a short list of hints on which the reader can elaborate.
</p>
@@ -285,8 +285,8 @@
<body>
<p>
-Every utf-8 char is considered 3 bytes long within an index. Indexes in MySQL
-can be up to 1000 bytes long (767 bytes for InnoDB tables). Note that the
+Every utf-8 character is considered 3 bytes long within an index. Indexes in
+MySQL can be up to 1000 bytes long (767 bytes for InnoDB tables). Note that the
limits are measured in bytes, whereas the length of a column is interpreted as
number of characters.
</p>
@@ -353,7 +353,7 @@
Working in a utf-8 environment, with utf-8 editors and tools help too:
</p>
-<pre caption="Shell evironment variables">
+<pre caption="Shell environment variables">
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
export LC_ALL LANG
@@ -409,7 +409,7 @@
<body>
<p>
-To use utf-8 with apache, you need to adjust the folowing variables in
+To use utf-8 with apache, you need to adjust the following variables in
<path>httpd.conf</path>: AddDefaultCharset, CharsetDefault, CharsetSourceEnc.
If your source html files aren't encoded in utf-8, they <b>must</b> be
converted with <c>iconv</c> or <c>recode</c>.
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-09-10 21:27 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2006-09-10 21:27 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/09/10 21:27:57
Modified: mysql-upgrading.xml
Log:
proper locale setting section for mysql-upgrading; should have been in previous commit
Revision Changes Path
1.15 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.14&r2=1.15
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- mysql-upgrading.xml 10 Sep 2006 21:11:22 -0000 1.14
+++ mysql-upgrading.xml 10 Sep 2006 21:27:57 -0000 1.15
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.14 2006/09/10 21:11:22 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.15 2006/09/10 21:27:57 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
@@ -22,7 +22,7 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.11</version>
+<version>1.12</version>
<date>2006-09-10</date>
<chapter>
@@ -350,20 +350,24 @@
<body>
<p>
-Working in a utf-8 environment, with utf-8 editors and tools help too:
+The system must be configured to support the UTF-8 locale. You will find more
+information in our <uri link="/doc/en/utf-8.xml">Using UTF-8 with Gentoo</uri>
+and <uri link="/doc/en/guide-localization.xml">Localization Guide</uri>
+documents.
</p>
-<pre caption="Shell environment variables">
+<p>
+In this example, we set some shell environment variables to make use of the
+English UTF-8 locale in <path>/etc/env.d/02locale</path>:
+</p>
+
+<pre caption="/etc/env.d/02locale">
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
-export LC_ALL LANG
</pre>
<p>
-The system must be configured to support the chosen UTF-8 locale. You will find
-more information in our <uri link="/doc/en/utf-8.xml">Using UTF-8 with
-Gentoo</uri> and <uri link="/doc/en/guide-localization.xml">Localization
-Guide</uri> documents.
+Be sure to run <c>env-update && source /etc/profile</c> afterward.
</p>
</body>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-10-28 11:43 Xavier Neys
0 siblings, 0 replies; 20+ messages in thread
From: Xavier Neys @ 2006-10-28 11:43 UTC (permalink / raw
To: gentoo-doc-cvs
neysx 06/10/28 11:43:39
Modified: mysql-upgrading.xml
Log:
#108502 Mention restore problem with PK values <= 0
Revision Changes Path
1.16 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.15&r2=1.16
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- mysql-upgrading.xml 10 Sep 2006 21:27:57 -0000 1.15
+++ mysql-upgrading.xml 28 Oct 2006 11:43:39 -0000 1.16
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.15 2006/09/10 21:27:57 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.16 2006/10/28 11:43:39 neysx Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.12</version>
-<date>2006-09-10</date>
+<version>1.13</version>
+<date>2006-10-28</date>
<chapter>
<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
@@ -43,7 +43,7 @@
<i>| sed -e 's|datadir[ \t]||')</i>
# <i>MYSQL --execute="FLUSH TABLES WITH READ LOCK;"</i>
# <i>tar -cjpvf ~/mysql.$(date +%F"T"%H-%M).tar.bz2 \</i>
- <i>/etc/mysql/conf.d/mysql /etc/mysql/my.cnf "${DATADIR}"</i>
+ <i>/etc/conf.d/mysql /etc/mysql/my.cnf "${DATADIR}"</i>
# <i>MYSQL --execute="UNLOCK TABLES;"</i>
# <i>tar -tjvf ~/mysql.*.tar.bz2</i>
# <i>emerge -av ">mysql-5.0"</i>
@@ -85,6 +85,13 @@
<section>
<body>
+<impo>
+Values inside primary keys are handled differently in various MySQL versions,
+see <uri link="http://bugs.gentoo.org/108502">bug #108502</uri> for more
+details, it is higly recommended to scan your tables for values of "0" (zero)
+or less and update them to a value greater than or equal to "1".
+</impo>
+
<p>
One of the most important tasks that every database administrator has to
perform is backing up data. Here we go:
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-12-04 16:42 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2006-12-04 16:42 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/12/04 16:42:50
Modified: mysql-upgrading.xml
Log:
specified full category/package name for mysql, bug 157089
Revision Changes Path
1.17 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.16&r2=1.17
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- mysql-upgrading.xml 28 Oct 2006 11:43:39 -0000 1.16
+++ mysql-upgrading.xml 4 Dec 2006 16:42:50 -0000 1.17
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.16 2006/10/28 11:43:39 neysx Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.17 2006/12/04 16:42:50 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.13</version>
-<date>2006-10-28</date>
+<version>1.14</version>
+<date>2006-12-04</date>
<chapter>
<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
@@ -46,7 +46,7 @@
<i>/etc/conf.d/mysql /etc/mysql/my.cnf "${DATADIR}"</i>
# <i>MYSQL --execute="UNLOCK TABLES;"</i>
# <i>tar -tjvf ~/mysql.*.tar.bz2</i>
-# <i>emerge -av ">mysql-5.0"</i>
+# <i>emerge -av ">dev-db/mysql-5.0"</i>
# <i>dispatch-conf</i>
# <i>revdep-rebuild</i>
# <i>/etc/init.d/mysql restart</i>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2006-12-29 5:49 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2006-12-29 5:49 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/12/29 05:49:47
Modified: mysql-upgrading.xml
Log:
added MERGE tables note for bug 159340
Revision Changes Path
1.18 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.17&r2=1.18
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mysql-upgrading.xml 4 Dec 2006 16:42:50 -0000 1.17
+++ mysql-upgrading.xml 29 Dec 2006 05:49:47 -0000 1.18
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.17 2006/12/04 16:42:50 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.18 2006/12/29 05:49:47 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.14</version>
-<date>2006-12-04</date>
+<version>1.15</version>
+<date>2006-12-28</date>
<chapter>
<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
@@ -35,6 +35,14 @@
direct upgrade to the next major version of MySQL.
</p>
+<note>
+This is not true for MERGE tables. You will likely run into trouble if you
+attempt a direct upgrade for this (rarely used) type of table. You should dump
+and recreate those tables and restore their contents in the process of
+upgrading. If unsure, you should begin with <uri link="#doc_chap2">Upgrading
+from old versions of MySQL</uri>.
+</note>
+
<pre caption="Straight upgrade from 4.1 to 5.0.*">
# <i>quickpkg dev-db/mysql</i>
# <i>alias MYSQL="mysql --user=root --password=</i><comment>'your_password'</comment><i>"</i>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2007-01-06 21:38 Josh Saddler
0 siblings, 0 replies; 20+ messages in thread
From: Josh Saddler @ 2007-01-06 21:38 UTC (permalink / raw
To: gentoo-doc-cvs
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 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.18 2006/12/29 05:49:47 nightmorph Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.19 2007/01/06 21:38:01 nightmorph Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.15</version>
-<date>2006-12-28</date>
+<version>1.16</version>
+<date>2007-01-06</date>
<chapter>
<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
@@ -43,16 +43,31 @@
from old versions of MySQL</uri>.
</note>
+<p>
+For this step two shells are required because locks belong to the mysql
+session.
+</p>
+
<pre caption="Straight upgrade from 4.1 to 5.0.*">
# <i>quickpkg dev-db/mysql</i>
# <i>alias MYSQL="mysql --user=root --password=</i><comment>'your_password'</comment><i>"</i>
# <i>DATADIR=$(MYSQL --batch --raw --silent --skip-column-names \</i>
<i>--execute='SHOW variables LIKE "datadir";' \</i>
<i>| sed -e 's|datadir[ \t]||')</i>
-# <i>MYSQL --execute="FLUSH TABLES WITH READ LOCK;"</i>
+
+<comment>(This next step should be done in the second shell)</comment>
+# <i>mysql --user=root --password=</i><comment>'your_password'</comment><i>"</i>
+mysql> <i>FLUSH TABLES WITH READ LOCK;</i>
+
+<comment>(Return to the first shell to run this command)</comment>
# <i>tar -cjpvf ~/mysql.$(date +%F"T"%H-%M).tar.bz2 \</i>
<i>/etc/conf.d/mysql /etc/mysql/my.cnf "${DATADIR}"</i>
-# <i>MYSQL --execute="UNLOCK TABLES;"</i>
+
+<comment>(The following commands should be done in the second shell)</comment>
+mysql> <i>UNLOCK TABLES;</i>
+mysql> <i>quit</i>
+
+<comment>(Return to the first shell for the rest of the upgrade)</comment>
# <i>tar -tjvf ~/mysql.*.tar.bz2</i>
# <i>emerge -av ">dev-db/mysql-5.0"</i>
# <i>dispatch-conf</i>
@@ -215,6 +230,21 @@
amongst other things is and <b>must</b> be in encoded in utf8.
</impo>
+<p>
+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:
+</p>
+
+<pre caption="Fixing foreign key checks">
+SET FOREIGN_KEY_CHECKS=0
+SET FOREIGN_KEY_CHECKS=1
+</pre>
+
+<p>
+Next, import the backup.
+</p>
+
<pre caption="Importing the SQL backup">
# <i>cat BACKUP_MYSQL_4.0.SQL \</i>
<i>| mysql \</i>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
* [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml
@ 2007-06-04 11:03 Lukasz Damentko
0 siblings, 0 replies; 20+ messages in thread
From: Lukasz Damentko @ 2007-06-04 11:03 UTC (permalink / raw
To: gentoo-doc-cvs
rane 07/06/04 11:03:51
Modified: mysql-upgrading.xml
Log:
removing a useless quotation mark, thanks to stawrul on irc for reporting
Revision Changes Path
1.21 xml/htdocs/doc/en/mysql-upgrading.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml?r1=1.20&r2=1.21
Index: mysql-upgrading.xml
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- mysql-upgrading.xml 17 May 2007 22:25:45 -0000 1.20
+++ mysql-upgrading.xml 4 Jun 2007 11:03:51 -0000 1.21
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.20 2007/05/17 22:25:45 rane Exp $ -->
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.21 2007/06/04 11:03:51 rane Exp $ -->
<guide link="/doc/en/mysql-upgrading.xml">
<title>Upgrade guide to MySQL 4.* or 5.0.*</title>
@@ -22,8 +22,8 @@
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<license/>
-<version>1.16</version>
-<date>2007-01-06</date>
+<version>1.17</version>
+<date>2007-06-04</date>
<chapter>
<title>Straight upgrade, suggested for 4.1 => 5.0 migration</title>
@@ -56,7 +56,7 @@
<i>| sed -e 's|datadir[ \t]||')</i>
<comment>(This next step should be done in the second shell)</comment>
-# <i>mysql --user=root --password=</i><comment>'your_password'</comment><i>"</i>
+# <i>mysql --user=root --password=</i><comment>'your_password'</comment>
mysql> <i>FLUSH TABLES WITH READ LOCK;</i>
<comment>(Return to the first shell to run this command)</comment>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2007-06-04 11:04 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-17 19:30 [gentoo-doc-cvs] cvs commit: mysql-upgrading.xml Lukasz Damentko
-- strict thread matches above, loose matches on Subject: below --
2007-06-04 11:03 Lukasz Damentko
2007-01-06 21:38 Josh Saddler
2006-12-29 5:49 Josh Saddler
2006-12-04 16:42 Josh Saddler
2006-10-28 11:43 Xavier Neys
2006-09-10 21:27 Josh Saddler
2006-09-10 21:11 Josh Saddler
2006-09-10 1:57 Lukasz Damentko
2006-09-08 11:50 Josh Saddler
2006-09-08 10:39 Xavier Neys
2006-09-08 10:39 Xavier Neys
2006-09-04 9:38 Josh Saddler
2006-03-11 18:26 Josh Saddler
2006-01-04 11:26 Xavier Neys
2005-12-21 11:03 Xavier Neys
2005-10-21 10:11 Xavier Neys
2005-10-17 23:13 Lukasz Damentko
2005-09-21 19:15 Lukasz Damentko
2005-09-11 20:41 Lukasz Damentko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox