source: server/databases/mysql.xml@ 87448d4

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

Removed 'keywordset' blocks and extra spaces from the XML files (note this was by accident as I meant to do just in the gnome directory but I was in the root of BOOK when I ran the script, but this was going to happen anyway so I don't think it is a big deal)

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

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