source: server/databases/mysql.xml@ 56afacb4

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 gimp3 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 56afacb4 was d0151ee, checked in by Randy McMurchy <randy@…>, 16 years ago

Fixed broken download URLs in various package instructions

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

  • Property mode set to 100644
File size: 13.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
7 <!-- <!ENTITY mysql-download-http "http://mysql.mirrors.hoobly.com/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz">
8 <!ENTITY mysql-download-ftp "ftp://ftp.fu-berlin.de/unix/databases/mysql/Downloads/MySQL-5.0/mysql-&mysql-version;.tar.gz"> -->
9 <!ENTITY mysql-download-http "&sources-anduin-http;/m/mysql-&mysql-version;.tar.gz">
10 <!ENTITY mysql-download-ftp "&sources-anduin-ftp;/m/mysql-&mysql-version;.tar.gz">
11 <!ENTITY mysql-md5sum "b45cd6c89e35dfc1cdbe1a1f782aefbf">
12 <!ENTITY mysql-size "24 MB">
13 <!ENTITY mysql-buildsize "405 MB (additional 65 MB to run the test suite)">
14 <!ENTITY mysql-time "6.0 SBU (Test suite is an additional 52 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 </sect1info>
24
25 <title>MySQL-&mysql-version;</title>
26
27 <indexterm zone="mysql">
28 <primary sortas="a-MySQL">MySQL</primary>
29 </indexterm>
30
31 <sect2 role="package">
32 <title>Introduction to MySQL</title>
33
34 <para><application>MySQL</application> is a widely used and fast SQL
35 database server. It is a client/server implementation that consists of a
36 server daemon and many different client programs and libraries.</para>
37
38 <para>There may be a more recent release available from the
39 <application>MySQL</application> home page. You can check
40 <ulink url="http://dev.mysql.com/"/> and probably use the
41 existing BLFS instructions. Note that versions other than the one shown
42 in the download URLs have not been tested in a BLFS environment.</para>
43
44 <bridgehead renderas="sect3">Package Information</bridgehead>
45 <itemizedlist spacing="compact">
46 <listitem>
47 <para>Download (HTTP): <ulink url="&mysql-download-http;"/></para>
48 </listitem>
49 <listitem>
50 <para>Download (FTP): <ulink url="&mysql-download-ftp;"/></para>
51 </listitem>
52 <listitem>
53 <para>Download MD5 sum: &mysql-md5sum;</para>
54 </listitem>
55 <listitem>
56 <para>Download size: &mysql-size;</para>
57 </listitem>
58 <listitem>
59 <para>Estimated disk space required: &mysql-buildsize;</para>
60 </listitem>
61 <listitem>
62 <para>Estimated build time: &mysql-time;</para>
63 </listitem>
64 </itemizedlist>
65
66 <bridgehead renderas="sect3">MySQL Dependencies</bridgehead>
67
68 <bridgehead renderas="sect4">Optional</bridgehead>
69 <para role="optional"><xref linkend="openssl"/> and
70 <xref linkend="tcpwrappers"/>
71
72 <!-- Removing libedit because it causes more problems than it solves.
73
74 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
75 (as an alternative to readline)-->
76
77 </para>
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<screen><userinput>C_EXTRA_FLAGS=-fno-strict-aliasing \
98./configure --prefix=/usr \
99 --sysconfdir=/etc \
100 --libexecdir=/usr/sbin \
101 --localstatedir=/srv/mysql \
102 --enable-thread-safe-client \
103 --enable-assembler \
104 --enable-local-infile \
105 --with-unix-socket-path=/var/run/mysql/mysql.sock \
106 --without-debug \
107 --without-bench \
108 --without-readline \
109 --with-berkeley-db \
110 --with-extra-charsets=all &amp;&amp;
111make testdir=/tmp/mysql</userinput></screen>
112
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
127 <para>To test the results, issue: <command>make test</command>. Note that
128 if you have a restrictive <filename>/etc/hosts.deny</filename> file, you
129 will need to add an appropriate entry to the
130 <filename>/etc/hosts.allow</filename> file for the
131 <command>mysqld</command> daemon, else many of the tests will fail.</para>
132
133 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
134
135<screen role="root"><userinput>make testdir=/tmp/mysql install &amp;&amp;
136rm -rf /tmp/mysql &amp;&amp;
137cd /usr/lib &amp;&amp;
138ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
139
140 <tip>
141 <para>The only documentation shipped in the source tarball are
142 <filename>mysql.info</filename> and <filename>manual.chm</filename>
143 (Microsoft Help format) files. You can download various formats of the
144 <application>MySQL</application> Reference Manual from <ulink
145 url="http://dev.mysql.com/doc/"/>.</para>
146 </tip>
147
148 </sect2>
149
150 <sect2 role="commands">
151 <title>Command Explanations</title>
152
153 <para><parameter>C_EXTRA_FLAGS=-fno-strict-aliasing</parameter>: This
154 environment variable adjusts the compiler optimization to avoid failures in
155 the testsuite and other operations.</para>
156
157 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
158 the <command>mysqld</command> daemon and the
159 <command>mysqlmanager</command> program in an appropriate location.</para>
160
161 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch
162 forces <application>MySQL</application> to use
163 <filename class='directory'>/srv/mysql</filename> for database files and
164 other variable data.</para>
165
166 <para><parameter>--enable-thread-safe-client</parameter>: This
167 switch compiles a thread-safe <application>MySQL</application> client
168 library.</para>
169
170 <para><parameter>--enable-assembler</parameter>: This switch allows using
171 assembler versions of some string functions.</para>
172
173 <para><parameter>--enable-local-infile</parameter>: This switch enables
174 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
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><parameter>--with-berkeley-db</parameter>: This switch enables
189 using <application>Berkeley DB</application> tables as a back end.</para>
190
191 <para><parameter>--with-extra-charsets=all</parameter>: This switch enables
192 international character sets within the suite.</para>
193
194 <para><command>make testdir=...</command>: This installs the test suite in
195 <filename class='directory'>/tmp/mysql</filename>. The test suite is not
196 required, nor does it function properly on an installed version of
197 <application>MySQL</application>, so it is removed in the next step.</para>
198
199 <para><command>ln -v -sf mysql/libmysqlclient{,_r}.so* .</command>: This
200 command makes the <application>MySQL</application> shared libraries
201 available to other packages at run-time.</para>
202
203 <para><option>--with-openssl</option>: This switch adds OpenSSL support
204 to <application>MySQL</application>.</para>
205
206 <para><option>--with-libwrap</option>: This switch adds tcpwrappers
207 support to <application>MySQL</application>.</para>
208
209 </sect2>
210
211 <sect2 role="configuration">
212 <title>Configuring MySQL</title>
213
214 <sect3 id="mysql-config">
215 <title>Config Files</title>
216
217 <para><filename>/etc/my.cnf</filename> and
218 <filename>~/.my.cnf</filename></para>
219
220 <indexterm zone="mysql mysql-config">
221 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
222 </indexterm>
223
224 <indexterm zone="mysql mysql-config">
225 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
226 </indexterm>
227
228 </sect3>
229
230 <sect3>
231 <title>Configuration Information</title>
232
233 <para>There are several default configuration files available in
234 <filename class="directory">/usr/share/mysql</filename> which you can
235 use. Create <filename>/etc/my.cnf</filename> using the following command
236 as the <systemitem class="username">root</systemitem> user:</para>
237
238<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
239
240 <para>You can now install a database and change the ownership to the
241 unprivileged user and group (perform as the <systemitem
242 class="username">root</systemitem> user):</para>
243
244<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
245chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
246
247 <para>Further configuration requires that the
248 <application>MySQL</application> server is running. Start
249 the server using the following commands as the <systemitem
250 class="username">root</systemitem> user:</para>
251
252<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
253mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
254
255 <para>A default installation does not set up a password for the
256 administrator, so use the following command as the <systemitem
257 class="username">root</systemitem> user to set one. Replace
258 <replaceable>&lt;new-password&gt;</replaceable> with your own.</para>
259
260<screen role="root"><userinput>mysqladmin -u root password <replaceable>&lt;new-password&gt;</replaceable></userinput></screen>
261
262 <para>Configuration of the server is now finished. Shut the server
263 down using the following command as the <systemitem
264 class="username">root</systemitem> user:</para>
265
266<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
267
268 </sect3>
269
270 <sect3 id="mysql-init">
271 <title>Boot Script</title>
272
273 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
274 included in the <xref linkend="bootscripts"/> package as
275 the <systemitem class="username">root</systemitem> user to start the
276 <application>MySQL</application> server during system boot-up.</para>
277
278 <indexterm zone="mysql mysql-init">
279 <primary sortas="f-mysql">mysql</primary>
280 </indexterm>
281
282<screen role="root"><userinput>make install-mysql</userinput></screen>
283
284 </sect3>
285
286 </sect2>
287
288 <sect2 role="content">
289 <title>Contents</title>
290
291 <segmentedlist>
292 <segtitle>Installed Programs</segtitle>
293 <segtitle>Installed Libraries</segtitle>
294 <segtitle>Installed Directories</segtitle>
295
296 <seglistitem>
297 <seg>comp_err, innochecksum, msql2mysql, my_print_defaults,
298 myisam_ftdump, myisamchk, myisamlog, myisampack, mysql,
299 mysql_client_test, mysql_config, mysql_convert_table_format,
300 mysql_create_system_tables, mysql_explain_log, mysql_find_rows,
301 mysql_fix_extensions, mysql_fix_privilege_tables, mysql_install_db,
302 mysql_secure_installation, mysql_setpermission, mysql_tableinfo,
303 mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess, mysqladmin,
304 mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi, mysqld_safe,
305 mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport, mysqlmanager,
306 mysqlshow, mysqltest, mysqltestmanager, mysqltestmanager-pwgen,
307 mysqltestmanagerc, perror, replace, resolve_stack_dump, and
308 resolveip</seg>
309 <seg>libdbug.a, libheap.a, libmyisam.a, libmyisammrg.a,
310 libmysqlclient.{so,a}, libmysqlclient_r.{so,a}, libmystrings.a,
311 libmysys.a, and libvio.a</seg>
312 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql, and
313 /var/run/mysql</seg>
314 </seglistitem>
315 </segmentedlist>
316
317 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
318
319 <para>Descriptions of all the programs and libraries would be several
320 pages long. Instead, consult the <filename>mysql.info</filename>
321 documentation or the on-line reference manual at <ulink
322 url="http://dev.mysql.com/doc/refman/5.0/en/index.html"/>.</para>
323
324 <para>The <application>Perl</application> DBI modules must be installed
325 for some of the <application>MySQL</application> support programs to
326 function properly.</para>
327
328 </sect2>
329
330</sect1>
Note: See TracBrowser for help on using the repository browser.