source: server/databases/mysql.xml@ ffc584a3

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since ffc584a3 was d939eba, checked in by Bruce Dubbs <bdubbs@…>, 14 years ago

Updated to mysql-5.1.42

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@8230 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 13.4 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!-- <!ENTITY mysql-download-http "http://mysql.mirrors.hoobly.com/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz">
8 <!ENTITY mysql-download-ftp "ftp://ftp.fu-berlin.de/unix/databases/mysql/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz"> -->
9 <!ENTITY mysql-download-http "&sources-anduin-http;/m/mysql-&mysql-version;.tar.gz">
10 <!ENTITY mysql-download-ftp "&sources-anduin-ftp;/m/mysql-&mysql-version;.tar.gz">
11 <!ENTITY mysql-md5sum "b644b219e130b7c6bca81948f75d72d7">
12 <!ENTITY mysql-size "21 MB">
13 <!ENTITY mysql-buildsize "419 MB (additional 250 MB to run the test suite)">
14 <!ENTITY mysql-time "4.7 SBU (Test suite is an additional 61 minutes, only partially CPU dependent)">
15]>
16
17<sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
18 <?dbhtml filename="mysql.html"?>
19
20 <sect1info>
21 <othername>$LastChangedBy$</othername>
22 <date>$Date$</date>
23 </sect1info>
24
25 <title>MySQL-&mysql-version;</title>
26
27 <indexterm zone="mysql">
28 <primary sortas="a-MySQL">MySQL</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to MySQL</title>
33
34 <para><application>MySQL</application> is a widely used and fast SQL
35 database server. It is a client/server implementation that consists of a
36 server daemon and many different client programs and libraries.</para>
37
38 <para>There may be a more recent release available from the
39 <application>MySQL</application> home page. You can check
40 <ulink url="http://dev.mysql.com/"/> and probably use the
41 existing BLFS instructions. Note that versions other than the one shown
42 in the download URLs have not been tested in a BLFS environment.</para>
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>Download (HTTP): <ulink url="&mysql-download-http;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download (FTP): <ulink url="&mysql-download-ftp;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download MD5 sum: &mysql-md5sum;</para>
54 </listitem>
55 <listitem>
56 <para>Download size: &mysql-size;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated disk space required: &mysql-buildsize;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated build time: &mysql-time;</para>
63 </listitem>
64 </itemizedlist>
65
66 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
67 <itemizedlist spacing="compact">
68 <listitem>
69 <para>Required Patches:
70 <ulink url="&patch-root;/mysql-&mysql-version;-logevent-1.patch"/>
71 <ulink url="&patch-root;/mysql-&mysql-version;-client-1.patch"/>
72 </para>
73 </listitem>
74 </itemizedlist>
75
76
77 <bridgehead renderas="sect3">MySQL Dependencies</bridgehead>
78
79 <bridgehead renderas="sect4">Optional</bridgehead>
80 <para role="optional"><xref linkend="openssl"/> and
81 <xref linkend="tcpwrappers"/>
82
83 <!-- Removing libedit because it causes more problems than it solves.
84
85 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
86 (as an alternative to readline)-->
87
88 </para>
89
90 <para condition="html" role="usernotes">User Notes:
91 <ulink url="&blfs-wiki;/mysql"/></para>
92
93 </sect2>
94
95 <sect2 role="installation">
96 <title>Installation of MySQL</title>
97
98 <para>For security reasons, running the server as an unprivileged user
99 and group is strongly encouraged:</para>
100
101<screen role="root"><userinput>groupadd -g 40 mysql &amp;&amp;
102useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false \
103 -u 40 mysql</userinput></screen>
104
105 <note><para>There are a great many options available to
106 <userinput>./configure</userinput>. Check the output of the
107 <option>--help</option> option for additional customization
108 options.</para></note>
109
110 <para>Build and install <application>MySQL</application> by
111 running the following commands:</para>
112
113<screen><userinput>patch -Np1 -i ../mysql-&mysql-version;-logevent-1.patch &amp;&amp;
114patch -Np1 -i ../mysql-&mysql-version;-client-1.patch &amp;&amp;
115./configure --prefix=/usr \
116 --sysconfdir=/etc \
117 --libexecdir=/usr/sbin \
118 --localstatedir=/srv/mysql \
119 --enable-thread-safe-client \
120 --enable-assembler \
121 --enable-local-infile \
122 --with-unix-socket-path=/var/run/mysql/mysql.sock \
123 --without-debug \
124 --without-readline \
125 --with-plugins=innobase,myisam \
126 --with-extra-charsets=all \
127 --with-ssl &amp;&amp;
128make</userinput></screen>
129
130 <para>To test the results, issue: <command>make test-force 2>&amp;1 | tee
131 test.log</command>. This forces the test to run to completion and logs all
132 the test output. There will be many tests that are not run due to
133 configuration options and developer considerations. Note that if you have
134 a restrictive <filename>/etc/hosts.deny</filename> file, you will need to
135 add an appropriate entry to the <filename>/etc/hosts.allow</filename> file
136 for the <command>mysqld</command> daemon. Otherwise many of the tests will
137 fail.</para>
138
139 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
140
141<screen role="root"><userinput>make benchdir_root=/tmp/mysql-bench install &amp;&amp;
142rm -rf /tmp/mysql &amp;&amp;
143cd /usr/lib &amp;&amp;
144ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
145
146 <tip>
147 <para>The only documentation shipped in the source tarball are
148 <filename>mysql.info</filename>, <filename>manual.chm</filename>
149 (Microsoft Help format) files, and man pages. You can download various
150 formats of the <application>MySQL</application> Reference Manual
151 from <ulink url="http://dev.mysql.com/doc/"/>.</para>
152 </tip>
153
154 </sect2>
155
156 <sect2 role="commands">
157 <title>Command Explanations</title>
158
159 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
160 the <command>mysqld</command> daemon and the
161 <command>mysqlmanager</command> program in an appropriate location.</para>
162
163 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch
164 forces <application>MySQL</application> to use
165 <filename class='directory'>/srv/mysql</filename> for database files and
166 other variable data.</para>
167
168 <para><parameter>--enable-thread-safe-client</parameter>: This
169 switch compiles a thread-safe <application>MySQL</application> client
170 library.</para>
171
172 <para><parameter>--enable-assembler</parameter>: This switch allows using
173 assembler versions of some string functions.</para>
174
175 <para><parameter>--enable-local-infile</parameter>: This switch enables
176 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
177
178 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
179 This switch puts the unix-domain socket into the
180 <filename class="directory">/var/run/mysql</filename> directory instead of
181 the default <filename class="directory">/tmp</filename>.</para>
182
183 <para><parameter>--without-readline</parameter>: This switch forces the
184 build to use the system copy of <application>readline</application> instead
185 of the bundled copy.</para>
186
187 <para><parameter>--with-extra-charsets=all</parameter>: This switch enables
188 international character sets within the suite.</para>
189
190 <para><parameter>--with-plugins=innobase,myisam</parameter>: This switch enables
191 two useful table types. Check <command>./configure --help</command> for
192 other table types.</para>
193
194 <para><parameter>--with-ssl</parameter>: This switch enables encrypted
195 communication between client and server.</para>
196
197 <para><command>make benchdir_root=...</command>: This installs the benchmark
198 and test suites in a non-system location.</para>
199
200 <para><command>ln -v -sf mysql/libmysqlclient{,_r}.so* .</command>: This
201 command makes the <application>MySQL</application> shared libraries
202 available to other packages at run-time.</para>
203
204 <para><option>--with-openssl</option>: This switch adds OpenSSL support
205 to <application>MySQL</application>.</para>
206
207 <para><option>--with-libwrap</option>: This switch adds tcpwrappers
208 support to <application>MySQL</application>.</para>
209
210 </sect2>
211
212 <sect2 role="configuration">
213 <title>Configuring MySQL</title>
214
215 <sect3 id="mysql-config">
216 <title>Config Files</title>
217
218 <para><filename>/etc/my.cnf</filename> and
219 <filename>~/.my.cnf</filename></para>
220
221 <indexterm zone="mysql mysql-config">
222 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
223 </indexterm>
224
225 <indexterm zone="mysql mysql-config">
226 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
227 </indexterm>
228
229 </sect3>
230
231 <sect3>
232 <title>Configuration Information</title>
233
234 <para>There are several default configuration files available in
235 <filename class="directory">/usr/share/mysql</filename> which you can
236 use. Create <filename>/etc/my.cnf</filename> using the following command
237 as the <systemitem class="username">root</systemitem> user:</para>
238
239<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf
240sed -i -e s/^skip-federated/#skip-federated/ /etc/my.cnf</userinput></screen>
241
242 <para>The change to <filename>/etc/my.cnf</filename> can be omitted if the
243 option <option>--with-plugins=federated</option> is used.</para>
244
245 <para>You can now install a database and change the ownership to the
246 unprivileged user and group (perform as the <systemitem
247 class="username">root</systemitem> user):</para>
248
249<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
250chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
251
252 <para>Further configuration requires that the
253 <application>MySQL</application> server is running. Start
254 the server using the following commands as the <systemitem
255 class="username">root</systemitem> user:</para>
256
257<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
258mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
259
260 <para>A default installation does not set up a password for the
261 administrator, so use the following command as the <systemitem
262 class="username">root</systemitem> user to set one. Replace
263 <replaceable>&lt;new-password&gt;</replaceable> with your own.</para>
264
265<screen role="root"><userinput>mysqladmin -u root password <replaceable>&lt;new-password&gt;</replaceable></userinput></screen>
266
267 <para>Configuration of the server is now finished. Shut the server
268 down using the following command as the <systemitem
269 class="username">root</systemitem> user:</para>
270
271<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
272
273 </sect3>
274
275 <sect3 id="mysql-init">
276 <title>Boot Script</title>
277
278 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
279 included in the <xref linkend="bootscripts"/> package as
280 the <systemitem class="username">root</systemitem> user to start the
281 <application>MySQL</application> server during system boot-up.</para>
282
283 <indexterm zone="mysql mysql-init">
284 <primary sortas="f-mysql">mysql</primary>
285 </indexterm>
286
287<screen role="root"><userinput>make install-mysql</userinput></screen>
288
289 </sect3>
290
291 </sect2>
292
293 <sect2 role="content">
294 <title>Contents</title>
295
296 <segmentedlist>
297 <segtitle>Installed Programs</segtitle>
298 <segtitle>Installed Libraries</segtitle>
299 <segtitle>Installed Directories</segtitle>
300
301 <seglistitem>
302 <seg>comp_err, innochecksum, msql2mysql, my_print_defaults,
303 myisam_ftdump, myisamchk, myisamlog, myisampack, mysql,
304 mysql_client_test, mysql_config, mysql_convert_table_format,
305 mysql_create_system_tables, mysql_explain_log, mysql_find_rows,
306 mysql_fix_extensions, mysql_fix_privilege_tables, mysql_install_db,
307 mysql_secure_installation, mysql_setpermission, mysql_tableinfo,
308 mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess, mysqladmin,
309 mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi, mysqld_safe,
310 mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport, mysqlmanager,
311 mysqlshow, mysqltest, mysqltestmanager, mysqltestmanager-pwgen,
312 mysqltestmanagerc, perror, replace, resolve_stack_dump, and
313 resolveip</seg>
314 <seg>libdbug.a, libheap.a, libmyisam.a, libmyisammrg.a,
315 libmysqlclient.{so,a}, libmysqlclient_r.{so,a}, libmystrings.a,
316 libmysys.a, and libvio.a</seg>
317 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql, and
318 /var/run/mysql</seg>
319 </seglistitem>
320 </segmentedlist>
321
322 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
323
324 <para>Descriptions of all the programs and libraries would be several
325 pages long. Instead, consult the <filename>mysql.info</filename>
326 documentation or the on-line reference manual at <ulink
327 url="http://dev.mysql.com/doc/refman/5.0/en/index.html"/>.</para>
328
329 <para>The <application>Perl</application> DBI modules must be installed
330 for some of the <application>MySQL</application> support programs to
331 function properly.</para>
332
333 </sect2>
334
335</sect1>
Note: See TracBrowser for help on using the repository browser.