source: server/databases/mysql.xml@ 68196987

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 68196987 was 68196987, checked in by Randy McMurchy <randy@…>, 18 years ago

Added a note to the cURL instructions about TCP Wrapper and cURL's test suite

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

  • Property mode set to 100644
File size: 13.2 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 "c3165204c42e1db6fc3a95a4fd2cd22f">
10 <!ENTITY mysql-size "18.6 MB">
11 <!ENTITY mysql-buildsize "244 MB (additional 194 MB to run the test suite)">
12 <!ENTITY mysql-time "4.5 SBU (Test suite is an additional 48 minutes, only partially CPU dependent)">
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"/> and
66 <xref linkend="tcpwrappers"/>.
67
68 <!-- Removing libedit because it causes more problems than it solves.
69
70 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
71 (as an alternative to readline)-->
72
73 </para>
74
75 <!-- These appear to be obsolete now that the docs have been pulled
76 out of the main tarball. Configure still checks for them, but
77 best I can tell, they are not used, nor can be used even if found
78
79 <xref linkend="doxygen"/> and
80 <xref linkend="tetex"/></para>
81 -->
82
83 <para condition="html" role="usernotes">User Notes:
84 <ulink url="&blfs-wiki;/mysql"/></para>
85
86 </sect2>
87
88 <sect2 role="installation">
89 <title>Installation of MySQL</title>
90
91 <para>For security reasons, running the server as an unprivileged user
92 and group is strongly encouraged:</para>
93
94<screen role="root"><userinput>groupadd -g 40 mysql &amp;&amp;
95useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false \
96 -u 40 mysql</userinput></screen>
97
98 <para>Build and install <application>MySQL</application> by
99 running the following commands:</para>
100
101 <!-- Removing the CPPFLAGS="-D_GNU_SOURCE" and
102 -with-named-thread-libs=-lpthread as they don't appear to be
103 required any longer
104 -->
105
106<screen><userinput>C_EXTRA_FLAGS=-fno-strict-aliasing \
107./configure --prefix=/usr \
108 --sysconfdir=/etc \
109 --libexecdir=/usr/sbin \
110 --localstatedir=/srv/mysql \
111 --enable-thread-safe-client \
112 --enable-assembler \
113 --enable-local-infile \
114 --with-unix-socket-path=/var/run/mysql/mysql.sock \
115 --without-debug \
116 --without-bench \
117 --without-readline \
118 --with-berkeley-db \
119 --with-extra-charsets=all &amp;&amp;
120make testdir=/tmp/mysql</userinput></screen>
121
122<!--
123 <para>Some of the tests in the test suite are known to fail and this will
124 cause the test suite to abort at that point. Issue the following command
125 to disable the tests known to fail:</para>
126
127<screen><userinput>for TESTFILE in information_schema innodb join mysql_client_test \
128 ps_2myisam ps_3innodb ps_4heap ps_5merge \
129 sp-error strict type_float type_ranges
130do
131 mv mysql-test/t/$TESTFILE.test mysql-test/t/$TESTFILE.test.disabled
132done
133unset TESTFILE</userinput></screen>
134-->
135
136 <para>To test the results, issue: <command>make test</command>. Note that
137 if you have a restrictive <filename>/etc/hosts.deny</filename> file, you
138 will need to add an appropriate entry to the
139 <filename>/etc/hosts.allow</filename> file for the
140 <command>mysqld</command> daemon, else many of the tests will fail.</para>
141
142 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
143
144<screen role="root"><userinput>make testdir=/tmp/mysql install &amp;&amp;
145rm -rf /tmp/mysql &amp;&amp;
146cd /usr/lib &amp;&amp;
147ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
148
149<!-- Insert this back into the 'root' installation section if
150 there are ever docs to install again
151
152install -v -d -m755 /usr/share/mysql/Docs/Images &amp;&amp;
153install -v -m644 Docs/manual{,_toc}.html \
154 Docs/manual.txt /usr/share/mysql/Docs &amp;&amp;
155install -v -m644 Docs/Images/*.{jpg,gif} /usr/share/mysql/Docs/Images &amp;&amp;
156
157-->
158
159 </sect2>
160
161 <sect2 role="commands">
162 <title>Command Explanations</title>
163
164 <para><parameter>C_EXTRA_FLAGS=-fno-strict-aliasing</parameter>: This
165 environment variable adjusts the compiler optimization to avoid failures in
166 the testsuite and other operations.</para>
167
168 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
169 the <command>mysqld</command> daemon and the
170 <command>mysqlmanager</command> program in an appropriate location.</para>
171
172 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch
173 forces <application>MySQL</application> to use
174 <filename class='directory'>/srv/mysql</filename> for database files and
175 other variable data.</para>
176
177 <para><parameter>--enable-thread-safe-client</parameter>: This
178 switch compiles a thread-safe <application>MySQL</application> client
179 library.</para>
180
181 <para><parameter>--enable-assembler</parameter>: This switch allows using
182 assembler versions of some string functions.</para>
183
184 <para><parameter>--enable-local-infile</parameter>: This switch enables
185 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
186
187 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
188 This switch puts the unix-domain socket into the
189 <filename class="directory">/var/run/mysql</filename> directory instead of
190 the default <filename class="directory">/tmp</filename>.</para>
191
192 <para><parameter>--without-bench</parameter>: This switch skips building
193 the benchmark suite.</para>
194
195 <para><parameter>--without-readline</parameter>: This switch forces the
196 build to use the system copy of <application>readline</application> instead
197 of the bundled copy.</para>
198
199 <para><parameter>--with-berkeley-db</parameter>: This switch enables
200 using <application>Berkeley DB</application> tables as a back end.</para>
201
202 <para><parameter>--with-extra-charsets=all</parameter>: This switch enables
203 international character sets within the suite.</para>
204
205 <para><command>make testdir=...</command>: This installs the test suite in
206 <filename class='directory'>/tmp/mysql</filename>. The test suite is not
207 required, nor does it function properly on an installed version of
208 <application>MySQL</application>, so it is removed in the next step.</para>
209
210 <para><command>ln -v -sf mysql/libmysqlclient{,_r}.so* .</command>: This
211 command makes the <application>MySQL</application> shared libraries
212 available to other packages at run-time.</para>
213
214 <para><option>--with-openssl</option>: This switch adds OpenSSL support
215 to <application>MySQL</application>.</para>
216
217 <para><option>--with-libwrap</option>: This switch adds tcpwrappers
218 support to <application>MySQL</application>.</para>
219
220 </sect2>
221
222 <sect2 role="configuration">
223 <title>Configuring MySQL</title>
224
225 <sect3 id="mysql-config">
226 <title>Config Files</title>
227
228 <para><filename>/etc/my.cnf</filename> and
229 <filename>~/.my.cnf</filename></para>
230
231 <indexterm zone="mysql mysql-config">
232 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
233 </indexterm>
234
235 <indexterm zone="mysql mysql-config">
236 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
237 </indexterm>
238
239 </sect3>
240
241 <sect3>
242 <title>Configuration Information</title>
243
244 <para>There are several default configuration files available in
245 <filename class="directory">/usr/share/mysql</filename> which you can
246 use. Create <filename>/etc/my.cnf</filename> using the following command
247 as the <systemitem class="username">root</systemitem> user:</para>
248
249<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
250
251 <para>You can now install a database and change the ownership to the
252 unprivileged user and group (perform as the <systemitem
253 class="username">root</systemitem> user):</para>
254
255<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
256chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
257
258 <para>Further configuration requires that the
259 <application>MySQL</application> server is running. Start
260 the server using the following commands as the <systemitem
261 class="username">root</systemitem> user:</para>
262
263<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
264mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
265
266 <para>A default installation does not set up a password for the
267 administrator, so use the following command as the <systemitem
268 class="username">root</systemitem> user to set one. Replace
269 <replaceable>&lt;new-password&gt;</replaceable> with your own.</para>
270
271<screen role="root"><userinput>mysqladmin -u root password <replaceable>&lt;new-password&gt;</replaceable></userinput></screen>
272
273 <para>Configuration of the server is now finished. Shut the server
274 down using the following command as the <systemitem
275 class="username">root</systemitem> user:</para>
276
277<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
278
279 </sect3>
280
281 <sect3 id="mysql-init">
282 <title>Boot Script</title>
283
284 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
285 included in the <xref linkend="bootscripts"/> package as
286 the <systemitem class="username">root</systemitem> user to start the
287 <application>MySQL</application> server during system boot-up.</para>
288
289 <indexterm zone="mysql mysql-init">
290 <primary sortas="f-mysql">mysql</primary>
291 </indexterm>
292
293<screen role="root"><userinput>make install-mysql</userinput></screen>
294
295 </sect3>
296
297 </sect2>
298
299 <sect2 role="content">
300 <title>Contents</title>
301
302 <segmentedlist>
303 <segtitle>Installed Programs</segtitle>
304 <segtitle>Installed Libraries</segtitle>
305 <segtitle>Installed Directories</segtitle>
306
307 <seglistitem>
308 <seg>comp_err, innochecksum, msql2mysql, my_print_defaults,
309 myisam_ftdump, myisamchk, myisamlog, myisampack, mysql,
310 mysql_client_test, mysql_config, mysql_convert_table_format,
311 mysql_create_system_tables, mysql_explain_log, mysql_find_rows,
312 mysql_fix_extensions, mysql_fix_privilege_tables, mysql_install_db,
313 mysql_secure_installation, mysql_setpermission, mysql_tableinfo,
314 mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess, mysqladmin,
315 mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi, mysqld_safe,
316 mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport, mysqlmanager,
317 mysqlshow, mysqltest, mysqltestmanager, mysqltestmanager-pwgen,
318 mysqltestmanagerc, perror, replace, resolve_stack_dump, and
319 resolveip</seg>
320 <seg>libdbug.a, libheap.a, libmyisam.a, libmyisammrg.a,
321 libmysqlclient.{so,a}, libmysqlclient_r.{so,a}, libmystrings.a,
322 libmysys.a, and libvio.a</seg>
323 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql, and
324 /var/run/mysql</seg>
325 </seglistitem>
326 </segmentedlist>
327
328 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
329
330 <para>Descriptions of all the programs and libraries would be several
331 pages long. Instead, consult the <filename>mysql.info</filename>
332 documentation or the on-line reference manual at <ulink
333 url="http://dev.mysql.com/doc/refman/5.0/en/index.html"/>.</para>
334
335 <para>The <application>Perl</application> DBI modules must be installed
336 for some of the <application>MySQL</application> support programs to
337 function properly.</para>
338
339 </sect2>
340
341</sect1>
Note: See TracBrowser for help on using the repository browser.