source: server/databases/mysql.xml@ 35a18d26

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 35a18d26 was 7de560e, checked in by Randy McMurchy <randy@…>, 17 years ago

Updated to MySQL-5.0.41

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

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