source: server/databases/mysql.xml@ edeebe2

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 edeebe2 was edeebe2, checked in by Andrew Benton <andy@…>, 18 years ago

Dead links :o(

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

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