source: server/databases/mysql.xml@ 520f6b4f

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

Renamed the TeX package to its proper name - teTeX

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