1 |
rane 05/09/11 20:41:05 |
2 |
|
3 |
Modified: xml/htdocs/doc/en metadoc.xml |
4 |
Added: xml/htdocs/doc/en mysql-upgrading.xml |
5 |
Log: |
6 |
adding new guide from #105626 |
7 |
|
8 |
Revision Changes Path |
9 |
1.106 +7 -2 xml/htdocs/doc/en/metadoc.xml |
10 |
|
11 |
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 |
12 |
plain: http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/metadoc.xml?rev=1.106&content-type=text/plain&cvsroot=gentoo |
13 |
diff : http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/doc/en/metadoc.xml.diff?r1=1.105&r2=1.106&cvsroot=gentoo |
14 |
|
15 |
Index: metadoc.xml |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/metadoc.xml,v |
18 |
retrieving revision 1.105 |
19 |
retrieving revision 1.106 |
20 |
diff -u -r1.105 -r1.106 |
21 |
--- metadoc.xml 6 Sep 2005 17:59:53 -0000 1.105 |
22 |
+++ metadoc.xml 11 Sep 2005 20:41:05 -0000 1.106 |
23 |
@@ -1,9 +1,9 @@ |
24 |
<?xml version='1.0' encoding="UTF-8"?> |
25 |
-<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/metadoc.xml,v 1.105 2005/09/06 17:59:53 swift Exp $ --> |
26 |
+<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/metadoc.xml,v 1.106 2005/09/11 20:41:05 rane Exp $ --> |
27 |
<!DOCTYPE metadoc SYSTEM "/dtd/metadoc.dtd"> |
28 |
|
29 |
<metadoc lang="en"> |
30 |
-<version>1.35</version> |
31 |
+<version>1.36</version> |
32 |
<members> |
33 |
<lead>swift</lead> |
34 |
<lead>neysx</lead> |
35 |
@@ -424,6 +424,7 @@ |
36 |
<file id="sudo-guide">/doc/en/sudo-guide.xml</file> |
37 |
<file id="freebsd-guide">/doc/en/gentoo-freebsd.xml</file> |
38 |
<file id="mips-faq">/doc/en/gentoo-mips-faq.xml</file> |
39 |
+ <file id="mysql-upgrading">/doc/en/mysql-upgrading.xml</file> |
40 |
</files> |
41 |
<docs> |
42 |
<doc id="name-logo"> |
43 |
@@ -1121,5 +1122,9 @@ |
44 |
<memberof>faq</memberof> |
45 |
<fileid>mips-faq</fileid> |
46 |
</doc> |
47 |
+ <doc id="mysql-upgrading"> |
48 |
+ <memberof>sysadmin_specific</memberof> |
49 |
+ <fileid>mysql-upgrading</fileid> |
50 |
+ </doc> |
51 |
</docs> |
52 |
</metadoc> |
53 |
|
54 |
|
55 |
|
56 |
1.1 xml/htdocs/doc/en/mysql-upgrading.xml |
57 |
|
58 |
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 |
59 |
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 |
60 |
|
61 |
Index: mysql-upgrading.xml |
62 |
=================================================================== |
63 |
<?xml version='1.0' encoding="UTF-8"?> |
64 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
65 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/mysql-upgrading.xml,v 1.1 2005/09/11 20:41:05 rane Exp $ --> |
66 |
|
67 |
<guide link="/doc/en/mysql-upgrading.xml"> |
68 |
<title>Upgrade guide to MySQL 4.1.x</title> |
69 |
|
70 |
<author title="Author"> |
71 |
<mail link="citizen428@g.o">Michael Kohl</mail> |
72 |
</author> |
73 |
<author title="Author"> |
74 |
<mail link="vivo@g.o">Francesco Riosa</mail> |
75 |
</author> |
76 |
|
77 |
<abstract> |
78 |
The MySQL herd is proud to announce that MySQL 4.1 can now be found in Gentoo's |
79 |
unstable tree (~arch). As the team hopes that it soon will be able to stabilize |
80 |
this ebuild, here's an upgrade path for all willing testers. |
81 |
</abstract> |
82 |
|
83 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
84 |
<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> |
85 |
<license/> |
86 |
|
87 |
<version>1.0</version> |
88 |
<date>2005-09-11</date> |
89 |
|
90 |
<chapter> |
91 |
<title>Upgrading from old versions of MySQL</title> |
92 |
<section> |
93 |
<body> |
94 |
|
95 |
<p> |
96 |
Users upgrading from an old version (<4.0.24) of MySQL will first have to |
97 |
install MySQL 4.0.25. If you are already running a current version, you can skip |
98 |
this section and continue with the next one. |
99 |
</p> |
100 |
|
101 |
<pre caption="Simple upgrade"> |
102 |
# <i>emerge -av --buildpkg "<mysql-4.1"</i> |
103 |
</pre> |
104 |
|
105 |
</body> |
106 |
</section> |
107 |
</chapter> |
108 |
|
109 |
<chapter> |
110 |
<title>Creating a backup of your current data</title> |
111 |
<section> |
112 |
<body> |
113 |
|
114 |
<p> |
115 |
One of the fundamental works of every database administrator is ... to make |
116 |
backup of the data. So proceed with one. |
117 |
</p> |
118 |
|
119 |
<pre caption="Dump of all databases"> |
120 |
# <i>mysqldump \</i> |
121 |
<i>-uroot \</i> |
122 |
<i>-p$PASSWORD \</i> |
123 |
<i>-hlocalhost \</i> |
124 |
<i>--all-databases \</i> |
125 |
<i>--all \</i> |
126 |
<i>--opt \</i> |
127 |
<i>--allow-keywords \</i> |
128 |
<i>--flush-logs \</i> |
129 |
<i>--hex-blob \</i> |
130 |
<i>--master-data \</i> |
131 |
<i>--max_allowed_packet=16M \</i> |
132 |
<i>--result-file=BACKUP_MYSQL_4.0.SQL</i> |
133 |
</pre> |
134 |
|
135 |
<p> |
136 |
Now a file named <path>BACKUP_MYSQL_4.0.SQL</path> should exist, this one can be |
137 |
used to recreate your data, the data is described in the MySQL dialect of SQL, |
138 |
the Structured Query Language. |
139 |
</p> |
140 |
|
141 |
<p> |
142 |
This would be a good time to see if the backup you have created is working. |
143 |
</p> |
144 |
|
145 |
</body> |
146 |
</section> |
147 |
</chapter> |
148 |
|
149 |
<chapter> |
150 |
<title>Upgrading from recent versions of MySQL</title> |
151 |
<section> |
152 |
<body> |
153 |
|
154 |
<p> |
155 |
If you have skipped step #1, you now have to create a backup package (the |
156 |
database server, not the data) of the currently installed version: |
157 |
</p> |
158 |
|
159 |
<pre caption="Binary package backup"> |
160 |
# <i>quickpkg dev-db/mysql</i> |
161 |
</pre> |
162 |
|
163 |
<p> |
164 |
Now it's time to clean out the current version and all it's data: |
165 |
</p> |
166 |
|
167 |
<pre caption="Uninstall MySQL"> |
168 |
# <i>/etc/init.d/mysql stop</i> |
169 |
# <i>emerge -C mysql</i> |
170 |
# <i>tar -cjpvf ~/mysql.$(date +%F_%H-%M).tar.bz2 /etc/mysql/my.cnf /var/lib/mysql/</i> |
171 |
# <i>ls -l ~/mysql.*</i> |
172 |
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i> |
173 |
</pre> |
174 |
|
175 |
<note> |
176 |
At this time two backup should exist, one portable between various MySQL |
177 |
versions, the SQL one. <br /> |
178 |
The other instead permit to restore quickly the system at this point. Later on |
179 |
this doc will be explain how to recover from this last one. |
180 |
</note> |
181 |
|
182 |
<p> |
183 |
After you got rid of your old MySQL installation, you can now install the new |
184 |
version. Note that <c>revdep-rebuild</c> is necessary for rebuilding packages |
185 |
linking against MySQL. |
186 |
</p> |
187 |
|
188 |
<pre caption="Upgrading the binaries"> |
189 |
# <i>emerge -av ">mysql-4.1"</i> |
190 |
# <i>dispatch-conf</i> |
191 |
# <i>revdep-rebuild</i> |
192 |
</pre> |
193 |
|
194 |
<p> |
195 |
Now configure the newly installed version of MySQL and restart the daemon: |
196 |
</p> |
197 |
|
198 |
<pre caption="Configure MySQL 4.1 base setup"> |
199 |
# <i>ebuild /var/db/pkg/dev-db/mysql-4.1.<micro_version>/mysql-4.1.<micro_version>.ebuild config</i> |
200 |
# <i>/etc/init.d/mysql start</i> |
201 |
</pre> |
202 |
|
203 |
<p> |
204 |
Finally you can import the backup you have created during step #2: |
205 |
</p> |
206 |
|
207 |
<pre caption="Importing the SQL backup"> |
208 |
# <i>cat BACKUP_MYSQL_4.0.SQL \</i> |
209 |
<i>| mysql \</i> |
210 |
<i>-uroot \</i> |
211 |
<i>-p$PASSWORD \</i> |
212 |
<i>-hlocalhost \</i> |
213 |
<i>--max_allowed_packet=16M</i> |
214 |
|
215 |
# <i>mysql_fix_privilege_tables \</i> |
216 |
<i>--defaults-file=/etc/mysql/my.cnf \</i> |
217 |
<i>--user=root \</i> |
218 |
<i>--password=$PASSWORD</i> |
219 |
</pre> |
220 |
|
221 |
<p> |
222 |
If you now restart your MySQL daemon and everything went as expected, you will |
223 |
have a fully working version of 4.1.x! :-) |
224 |
</p> |
225 |
|
226 |
<pre caption="Restart the MySQL instance"> |
227 |
# <i>/etc/init.d/mysql restart</i> |
228 |
</pre> |
229 |
|
230 |
<p> |
231 |
If you encountered any problems during the upgrade process, please report them |
232 |
at our <uri link="https://bugs.gentoo.org">Bugzilla</uri>. |
233 |
</p> |
234 |
|
235 |
</body> |
236 |
</section> |
237 |
</chapter> |
238 |
|
239 |
<chapter> |
240 |
<title>Recover the old installation of MySQL 4.0</title> |
241 |
<section> |
242 |
<body> |
243 |
|
244 |
<p> |
245 |
If the result is not fully satisfactory, it's possible to reinstall the old |
246 |
MySQL 4.0 version. |
247 |
</p> |
248 |
|
249 |
<pre caption="Back to the past"> |
250 |
# <i>/etc/init.d/mysql stop</i> |
251 |
# <i>emerge -C mysql</i> |
252 |
# <i>rm -rf /var/lib/mysql/ /var/log/mysql</i> |
253 |
# <i>emerge --usepkgonly "<mysql-4.1"</i> |
254 |
# <i>tar -xjpvf mysql.[tag] -C/tmp</i> |
255 |
# <i>/etc/init.d/mysql start</i> |
256 |
</pre> |
257 |
|
258 |
</body> |
259 |
</section> |
260 |
</chapter> |
261 |
|
262 |
|
263 |
|
264 |
|
265 |
-- |
266 |
gentoo-doc-cvs@g.o mailing list |