source: server/databases/mysql.xml@ 3cb0c57

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 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 3cb0c57 was 3cb0c57, checked in by Randy McMurchy <randy@…>, 18 years ago

Added the 'User Notes' wiki link to each package page; changed all instances of .[so,a] to .{so,a} (brackets changed to braces); changed all replaceable tags to use angle brackets instead of square brackets to encapsulate the text - commit #9

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

  • Property mode set to 100644
File size: 12.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!ENTITY mysql-download-http "http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz/from/http://mysql.mirrors.hoobly.com/">
8 <!ENTITY mysql-download-ftp "ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz">
9 <!ENTITY mysql-md5sum "ecf2ae1d782a8d129af940c15a44f477">
10 <!ENTITY mysql-size "19.0 MB">
11 <!ENTITY mysql-buildsize "195 MB (additional 180 MB to run the test suite)">
12 <!ENTITY mysql-time "3.8 SBU (additional 14.1 SBU to run the test suite)">
13]>
14
15<sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
16 <?dbhtml filename="mysql.html"?>
17
18 <sect1info>
19 <othername>$LastChangedBy$</othername>
20 <date>$Date$</date>
21 <keywordset>
22 <keyword role="package">mysql-&mysql-version;.tar</keyword>
23 <keyword role="ftpdir">mysql</keyword>
24 </keywordset>
25 </sect1info>
26
27 <title>MySQL-&mysql-version;</title>
28
29 <indexterm zone="mysql">
30 <primary sortas="a-MySQL">MySQL</primary>
31 </indexterm>
32
33 <sect2 role="package">
34 <title>Introduction to MySQL</title>
35
36 <para><application>MySQL</application> is a widely used and fast SQL
37 database server. It is a client/server implementation that consists of a
38 server daemon and many different client programs and libraries.</para>
39
40 <bridgehead renderas="sect3">Package Information</bridgehead>
41 <itemizedlist spacing="compact">
42 <listitem>
43 <para>Download (HTTP): <ulink url="&mysql-download-http;"/></para>
44 </listitem>
45 <listitem>
46 <para>Download (FTP): <ulink url="&mysql-download-ftp;"/></para>
47 </listitem>
48 <listitem>
49 <para>Download MD5 sum: &mysql-md5sum;</para>
50 </listitem>
51 <listitem>
52 <para>Download size: &mysql-size;</para>
53 </listitem>
54 <listitem>
55 <para>Estimated disk space required: &mysql-buildsize;</para>
56 </listitem>
57 <listitem>
58 <para>Estimated build time: &mysql-time;</para>
59 </listitem>
60 </itemizedlist>
61
62 <bridgehead renderas="sect3">MySQL Dependencies</bridgehead>
63
64 <bridgehead renderas="sect4">Optional</bridgehead>
65 <para role="optional"><xref linkend="openssl"/>,
66 <xref linkend="tcpwrappers"/> and
67 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
68 (as an alternative to readline)</para>
69
70 <!-- These appear to be obsolete now that the docs have been pulled
71 out of the main tarball. Configure still checks for them, but
72 best I can tell, they are not used, nor can be used even if found
73
74 <xref linkend="doxygen"/> and
75 <xref linkend="tex"/></para>
76 -->
77
78 <para condition="html" role="usernotes">User Notes:
79 <ulink url="&blfs-wiki;/mysql"/></para>
80
81 </sect2>
82
83 <sect2 role="installation">
84 <title>Installation of MySQL</title>
85
86 <para>For security reasons, running the server as an unprivileged user
87 and group is strongly encouraged:</para>
88
89<screen role="root"><userinput>groupadd -g 40 mysql &amp;&amp;
90useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false \
91 -u 40 mysql</userinput></screen>
92
93 <para>Build and install <application>MySQL</application> by
94 running the following commands:</para>
95
96 <!-- Removing the CPPFLAGS="-D_GNU_SOURCE" and
97 -with-named-thread-libs=-lpthread as they don't appear to be
98 required any longer
99 -->
100
101<screen><userinput>./configure --prefix=/usr \
102 --sysconfdir=/etc \
103 --libexecdir=/usr/sbin \
104 --localstatedir=/srv/mysql \
105 --enable-thread-safe-client \
106 --enable-assembler \
107 --enable-local-infile \
108 --with-unix-socket-path=/var/run/mysql/mysql.sock \
109 --without-debug \
110 --without-bench \
111 --without-readline &amp;&amp;
112make testdir=/tmp/mysql</userinput></screen>
113
114 <para>Some of the tests in the test suite are known to fail and this will
115 cause the test suite to abort at that point. Issue the following command
116 to disable the tests known to fail:</para>
117
118<screen><userinput>for TESTFILE in information_schema innodb join mysql_client_test \
119 ps_2myisam ps_3innodb ps_4heap ps_5merge \
120 sp-error strict type_float type_ranges
121do
122 mv mysql-test/t/$TESTFILE.test mysql-test/t/$TESTFILE.test.disabled
123done
124unset TESTFILE</userinput></screen>
125
126 <para>To test the results, issue: <command>make test</command>.</para>
127
128 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
129
130<screen role="root"><userinput>make testdir=/tmp/mysql install &amp;&amp;
131rm -rf /tmp/mysql &amp;&amp;
132cd /usr/lib &amp;&amp;
133ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
134
135<!-- Insert this back into the 'root' installation section if
136 there are ever docs to install again
137
138install -v -d -m755 /usr/share/mysql/Docs/Images &amp;&amp;
139install -v -m644 Docs/manual{,_toc}.html \
140 Docs/manual.txt /usr/share/mysql/Docs &amp;&amp;
141install -v -m644 Docs/Images/*.{jpg,gif} /usr/share/mysql/Docs/Images &amp;&amp;
142
143-->
144
145 </sect2>
146
147 <sect2 role="commands">
148 <title>Command Explanations</title>
149
150 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
151 the <command>mysqld</command> daemon and the
152 <command>mysqlmanager</command> program in an appropriate location.</para>
153
154 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch
155 forces <application>MySQL</application> to use
156 <filename class='directory'>/srv/mysql</filename> for database files and
157 other variable data.</para>
158
159 <para><parameter>--enable-thread-safe-client</parameter>: This
160 switch compiles a thread-safe <application>MySQL</application> client
161 library.</para>
162
163 <para><parameter>--enable-assembler</parameter>: This switch allows using
164 assembler versions of some string functions.</para>
165
166 <para><parameter>--enable-local-infile</parameter>: This switch enables
167 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
168
169 <!-- Removing for now. See explanation above
170 <para><parameter>CPPFLAGS="-D_GNU_SOURCE"</parameter> and
171 <parameter>-with-named-thread-libs=-lpthread</parameter>: This environment
172 variable and <command>configure</command> switch enables building the
173 package on NPTL systems.</para>
174 -->
175
176 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
177 This switch puts the unix-domain socket into the
178 <filename class="directory">/var/run/mysql</filename> directory instead of
179 the default <filename class="directory">/tmp</filename>.</para>
180
181 <para><parameter>--without-bench</parameter>: This switch skips building
182 the benchmark suite.</para>
183
184 <para><parameter>--without-readline</parameter>: This switch forces the
185 build to use the system copy of <application>readline</application> instead
186 of the bundled copy.</para>
187
188 <para><command>make testdir=...</command>: This installs the test suite in
189 <filename class='directory'>/tmp/mysql</filename>. The test suite is not
190 required, nor does it function properly on an installed version of
191 <application>MySQL</application>, so it is removed in the next step.</para>
192
193 <para><command>ln -v -sf mysql/libmysqlclient{,_r}.so* .</command>: This
194 command makes the <application>MySQL</application> shared libraries
195 available to other packages at run-time.</para>
196
197 <para><option>--with-openssl</option>: This switch adds OpenSSL support
198 to <application>MySQL</application>.</para>
199
200 <para><option>--with-libwrap</option>: This switch adds tcpwrappers
201 support to <application>MySQL</application>. As of MySQL-&mysql-version;,
202 this option is known to break the build.</para>
203
204 </sect2>
205
206 <sect2 role="configuration">
207 <title>Configuring MySQL</title>
208
209 <sect3 id="mysql-config">
210 <title>Config Files</title>
211
212 <para><filename>/etc/my.cnf</filename> and
213 <filename>~/.my.cnf</filename></para>
214
215 <indexterm zone="mysql mysql-config">
216 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
217 </indexterm>
218
219 <indexterm zone="mysql mysql-config">
220 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
221 </indexterm>
222
223 </sect3>
224
225 <sect3>
226 <title>Configuration Information</title>
227
228 <para>There are several default configuration files available in
229 <filename class="directory">/usr/share/mysql</filename> which you can
230 use. Create <filename>/etc/my.cnf</filename> using the following command
231 as the <systemitem class="username">root</systemitem> user:</para>
232
233<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
234
235 <para>You can now install a database and change the ownership to the
236 unprivileged user and group (perform as the <systemitem
237 class="username">root</systemitem> user):</para>
238
239<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
240chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
241
242 <para>Further configuration requires that the
243 <application>MySQL</application> server is running. Start
244 the server using the following commands as the <systemitem
245 class="username">root</systemitem> user:</para>
246
247<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
248mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
249
250 <para>A default installation does not set up a password for the
251 administrator, so use the following command as the <systemitem
252 class="username">root</systemitem> user to set one. Replace
253 <replaceable>&lt;new-password&gt;</replaceable> with your own.</para>
254
255<screen role="root"><userinput>mysqladmin -u root password <replaceable>&lt;new-password&gt;</replaceable></userinput></screen>
256
257 <para>Configuration of the server is now finished. Shut the server
258 down using the following command as the <systemitem
259 class="username">root</systemitem> user:</para>
260
261<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
262
263 </sect3>
264
265 <sect3 id="mysql-init">
266 <title>Boot Script</title>
267
268 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
269 included in the <xref linkend="bootscripts"/> package as
270 the <systemitem class="username">root</systemitem> user to start the
271 <application>MySQL</application> server during system boot-up.</para>
272
273 <indexterm zone="mysql mysql-init">
274 <primary sortas="f-mysql">mysql</primary>
275 </indexterm>
276
277<screen role="root"><userinput>make install-mysql</userinput></screen>
278
279 </sect3>
280
281 </sect2>
282
283 <sect2 role="content">
284 <title>Contents</title>
285
286 <segmentedlist>
287 <segtitle>Installed Programs</segtitle>
288 <segtitle>Installed Libraries</segtitle>
289 <segtitle>Installed Directories</segtitle>
290
291 <seglistitem>
292 <seg>comp_err, innochecksum, msql2mysql, my_print_defaults,
293 myisam_ftdump, myisamchk, myisamlog, myisampack, mysql,
294 mysql_client_test, mysql_config, mysql_convert_table_format,
295 mysql_create_system_tables, mysql_explain_log, mysql_find_rows,
296 mysql_fix_extensions, mysql_fix_privilege_tables, mysql_install_db,
297 mysql_secure_installation, mysql_setpermission, mysql_tableinfo,
298 mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess, mysqladmin,
299 mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi, mysqld_safe,
300 mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport, mysqlmanager,
301 mysqlshow, mysqltest, mysqltestmanager, mysqltestmanager-pwgen,
302 mysqltestmanagerc, perror, replace, resolve_stack_dump, and
303 resolveip</seg>
304 <seg>libdbug.a, libheap.a, libmyisam.a, libmyisammrg.a,
305 libmysqlclient.{so,a}, libmysqlclient_r.{so,a}, libmystrings.a,
306 libmysys.a, and libvio.a</seg>
307 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql, and
308 /var/run/mysql</seg>
309 </seglistitem>
310 </segmentedlist>
311
312 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
313
314 <para>Descriptions of all the programs and libraries would be several
315 pages long. Instead, consult the <filename>mysql.info</filename>
316 documentation or the on-line reference manual at <ulink
317 url="http://dev.mysql.com/doc/refman/5.0/en/index.html"/>.</para>
318
319 <para>The <application>Perl</application> DBI modules must be installed
320 for some of the <application>MySQL</application> support programs to
321 function properly.</para>
322
323 </sect2>
324
325</sect1>
Note: See TracBrowser for help on using the repository browser.