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/for-12.3 xry111/intltool xry111/llvm18 xry111/soup3 xry111/spidermonkey128 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
RevLine 
[08254fc]1<?xml version="1.0" encoding="ISO-8859-1"?>
[6732c094]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
[08254fc]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
[68196987]6
[d0151ee]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">
[7de560e]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)">
[08254fc]15]>
16
[c30b739]17<sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
[22c7fe6]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
[d0151ee]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
[22c7fe6]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
[1e11f8e]66 <bridgehead renderas="sect3">MySQL Dependencies</bridgehead>
[22c7fe6]67
68 <bridgehead renderas="sect4">Optional</bridgehead>
[9b603d4]69 <para role="optional"><xref linkend="openssl"/> and
[039736d2]70 <xref linkend="tcpwrappers"/>
[9f12e36]71
[9b603d4]72 <!-- Removing libedit because it causes more problems than it solves.
[9f12e36]73
[22c7fe6]74 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
[9b603d4]75 (as an alternative to readline)-->
[9f12e36]76
[9b603d4]77 </para>
[9dfd852b]78
[3cb0c57]79 <para condition="html" role="usernotes">User Notes:
80 <ulink url="&blfs-wiki;/mysql"/></para>
81
[22c7fe6]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
[b785ab29]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>
[22c7fe6]93
94 <para>Build and install <application>MySQL</application> by
95 running the following commands:</para>
96
[db70961a]97<screen><userinput>C_EXTRA_FLAGS=-fno-strict-aliasing \
[9b603d4]98./configure --prefix=/usr \
[9dfd852b]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 \
[9b603d4]108 --without-readline \
109 --with-berkeley-db \
110 --with-extra-charsets=all &amp;&amp;
[9dfd852b]111make testdir=/tmp/mysql</userinput></screen>
112
[9b603d4]113<!--
[9dfd852b]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>
[9b603d4]125-->
[68196987]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>
[9e69cae]132
[22c7fe6]133 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[20f5e71a]134
[9dfd852b]135<screen role="root"><userinput>make testdir=/tmp/mysql install &amp;&amp;
136rm -rf /tmp/mysql &amp;&amp;
[4b93ac2]137cd /usr/lib &amp;&amp;
[22c7fe6]138ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
[4b93ac2]139
[039736d2]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>
[36769b3]147
[22c7fe6]148 </sect2>
[4b93ac2]149
[22c7fe6]150 <sect2 role="commands">
151 <title>Command Explanations</title>
[08254fc]152
[db70961a]153 <para><parameter>C_EXTRA_FLAGS=-fno-strict-aliasing</parameter>: This
[aa13abce]154 environment variable adjusts the compiler optimization to avoid failures in
155 the testsuite and other operations.</para>
[9b603d4]156
[22c7fe6]157 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
[9dfd852b]158 the <command>mysqld</command> daemon and the
159 <command>mysqlmanager</command> program in an appropriate location.</para>
[08254fc]160
[22c7fe6]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>
[4b93ac2]165
[22c7fe6]166 <para><parameter>--enable-thread-safe-client</parameter>: This
167 switch compiles a thread-safe <application>MySQL</application> client
168 library.</para>
[4b93ac2]169
[22c7fe6]170 <para><parameter>--enable-assembler</parameter>: This switch allows using
171 assembler versions of some string functions.</para>
[4b93ac2]172
[22c7fe6]173 <para><parameter>--enable-local-infile</parameter>: This switch enables
174 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
[4b93ac2]175
[22c7fe6]176 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
[db9754e]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>
[867e611]180
[22c7fe6]181 <para><parameter>--without-bench</parameter>: This switch skips building
182 the benchmark suite.</para>
[867e611]183
[22c7fe6]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>
[867e611]187
[9f12e36]188 <para><parameter>--with-berkeley-db</parameter>: This switch enables
[9b603d4]189 using <application>Berkeley DB</application> tables as a back end.</para>
190
[9f12e36]191 <para><parameter>--with-extra-charsets=all</parameter>: This switch enables
[9b603d4]192 international character sets within the suite.</para>
193
[22c7fe6]194 <para><command>make testdir=...</command>: This installs the test suite in
[9dfd852b]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>
[4b93ac2]198
[9dfd852b]199 <para><command>ln -v -sf mysql/libmysqlclient{,_r}.so* .</command>: This
[22c7fe6]200 command makes the <application>MySQL</application> shared libraries
201 available to other packages at run-time.</para>
[08254fc]202
[22c7fe6]203 <para><option>--with-openssl</option>: This switch adds OpenSSL support
204 to <application>MySQL</application>.</para>
[867e611]205
[9dfd852b]206 <para><option>--with-libwrap</option>: This switch adds tcpwrappers
[9b603d4]207 support to <application>MySQL</application>.</para>
[9dfd852b]208
[22c7fe6]209 </sect2>
[08254fc]210
[22c7fe6]211 <sect2 role="configuration">
212 <title>Configuring MySQL</title>
[08254fc]213
[22c7fe6]214 <sect3 id="mysql-config">
215 <title>Config Files</title>
[08254fc]216
[22c7fe6]217 <para><filename>/etc/my.cnf</filename> and
218 <filename>~/.my.cnf</filename></para>
[08254fc]219
[22c7fe6]220 <indexterm zone="mysql mysql-config">
221 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
222 </indexterm>
[08254fc]223
[22c7fe6]224 <indexterm zone="mysql mysql-config">
225 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
226 </indexterm>
[08254fc]227
[22c7fe6]228 </sect3>
[08254fc]229
[22c7fe6]230 <sect3>
231 <title>Configuration Information</title>
[08254fc]232
[22c7fe6]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>
[08254fc]237
[22c7fe6]238<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
[08254fc]239
[22c7fe6]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>
[08254fc]243
[22c7fe6]244<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
245chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
[08254fc]246
[22c7fe6]247 <para>Further configuration requires that the
[9dfd852b]248 <application>MySQL</application> server is running. Start
[22c7fe6]249 the server using the following commands as the <systemitem
250 class="username">root</systemitem> user:</para>
[08254fc]251
[515209b3]252<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
[22c7fe6]253mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
[08254fc]254
[9dfd852b]255 <para>A default installation does not set up a password for the
[22c7fe6]256 administrator, so use the following command as the <systemitem
257 class="username">root</systemitem> user to set one. Replace
[3cb0c57]258 <replaceable>&lt;new-password&gt;</replaceable> with your own.</para>
[08254fc]259
[3cb0c57]260<screen role="root"><userinput>mysqladmin -u root password <replaceable>&lt;new-password&gt;</replaceable></userinput></screen>
[08254fc]261
[22c7fe6]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>
[4b93ac2]265
[22c7fe6]266<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
[08254fc]267
[22c7fe6]268 </sect3>
[08254fc]269
[22c7fe6]270 <sect3 id="mysql-init">
271 <title>Boot Script</title>
[08254fc]272
[22c7fe6]273 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
[5254d12]274 included in the <xref linkend="bootscripts"/> package as
[22c7fe6]275 the <systemitem class="username">root</systemitem> user to start the
276 <application>MySQL</application> server during system boot-up.</para>
[08254fc]277
[22c7fe6]278 <indexterm zone="mysql mysql-init">
279 <primary sortas="f-mysql">mysql</primary>
280 </indexterm>
[20f5e71a]281
[22c7fe6]282<screen role="root"><userinput>make install-mysql</userinput></screen>
[20f5e71a]283
[22c7fe6]284 </sect3>
[08254fc]285
[22c7fe6]286 </sect2>
[08254fc]287
[22c7fe6]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>
[9dfd852b]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,
[3cb0c57]310 libmysqlclient.{so,a}, libmysqlclient_r.{so,a}, libmystrings.a,
[9dfd852b]311 libmysys.a, and libvio.a</seg>
[22c7fe6]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
[9dfd852b]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>
[22c7fe6]323
[9dfd852b]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>
[22c7fe6]327
328 </sect2>
[f45b1953]329
330</sect1>
Note: See TracBrowser for help on using the repository browser.