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="[EMAIL PROTECTED]">Michael Kohl</mail>
</author>
<author title="Author">
  <mail link="[EMAIL PROTECTED]">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 (&lt;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 "&lt;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 "&gt;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.&lt;micro_version&gt;/mysql-4.1.&lt;micro_version&gt;.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 "&lt;mysql-4.1"</i>
# <i>tar -xjpvf mysql.[tag] -C/tmp</i>
# <i>/etc/init.d/mysql start</i>
</pre>

</body>
</section>
</chapter>




-- 
[email protected] mailing list

Reply via email to