source: server/databases/mysql.xml@ 3b560a0

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 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 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 3b560a0 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
RevLine 
[08254fc]1<?xml version="1.0" encoding="ISO-8859-1"?>
[ff769b8c]2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
[08254fc]4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
[edeebe2]6<!-- Dead link
[9dfd852b]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/">
[edeebe2]8-->
9 <!ENTITY mysql-download-http " ">
[9dfd852b]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)">
[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>
[a6ac43b]23 <keywordset>
24 <keyword role="package">mysql-&mysql-version;.tar</keyword>
[2a5310e8]25 <keyword role="ftpdir">mysql</keyword>
[a6ac43b]26 </keywordset>
[22c7fe6]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
[1e11f8e]64 <bridgehead renderas="sect3">MySQL Dependencies</bridgehead>
[22c7fe6]65
66 <bridgehead renderas="sect4">Optional</bridgehead>
[a6ac43b]67 <para role="optional"><xref linkend="openssl"/>,
[9dfd852b]68 <xref linkend="tcpwrappers"/> and
[22c7fe6]69 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
[9dfd852b]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
[22c7fe6]76 <xref linkend="doxygen"/> and
77 <xref linkend="tex"/></para>
[9dfd852b]78 -->
[22c7fe6]79
[3cb0c57]80 <para condition="html" role="usernotes">User Notes:
81 <ulink url="&blfs-wiki;/mysql"/></para>
82
[22c7fe6]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
[b785ab29]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>
[22c7fe6]94
95 <para>Build and install <application>MySQL</application> by
96 running the following commands:</para>
97
[6473e74]98 <!-- Removing the CPPFLAGS="-D_GNU_SOURCE" and
[9dfd852b]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>
[20f5e71a]127
[22c7fe6]128 <para>To test the results, issue: <command>make test</command>.</para>
[9e69cae]129
[22c7fe6]130 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
[20f5e71a]131
[9dfd852b]132<screen role="root"><userinput>make testdir=/tmp/mysql install &amp;&amp;
133rm -rf /tmp/mysql &amp;&amp;
[4b93ac2]134cd /usr/lib &amp;&amp;
[22c7fe6]135ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
[4b93ac2]136
[bccbdaea]137<!-- Insert this back into the 'root' installation section if
[36769b3]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
[22c7fe6]147 </sect2>
[4b93ac2]148
[22c7fe6]149 <sect2 role="commands">
150 <title>Command Explanations</title>
[08254fc]151
[22c7fe6]152 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
[9dfd852b]153 the <command>mysqld</command> daemon and the
154 <command>mysqlmanager</command> program in an appropriate location.</para>
[08254fc]155
[22c7fe6]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>
[4b93ac2]160
[22c7fe6]161 <para><parameter>--enable-thread-safe-client</parameter>: This
162 switch compiles a thread-safe <application>MySQL</application> client
163 library.</para>
[4b93ac2]164
[22c7fe6]165 <para><parameter>--enable-assembler</parameter>: This switch allows using
166 assembler versions of some string functions.</para>
[4b93ac2]167
[22c7fe6]168 <para><parameter>--enable-local-infile</parameter>: This switch enables
169 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
[4b93ac2]170
[9dfd852b]171 <!-- Removing for now. See explanation above
[db9754e]172 <para><parameter>CPPFLAGS="-D_GNU_SOURCE"</parameter> and
[9dfd852b]173 <parameter>-with-named-thread-libs=-lpthread</parameter>: This environment
[db9754e]174 variable and <command>configure</command> switch enables building the
175 package on NPTL systems.</para>
[9dfd852b]176 -->
[c2c2d76]177
[22c7fe6]178 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
[db9754e]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>
[867e611]182
[22c7fe6]183 <para><parameter>--without-bench</parameter>: This switch skips building
184 the benchmark suite.</para>
[867e611]185
[22c7fe6]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>
[867e611]189
[22c7fe6]190 <para><command>make testdir=...</command>: This installs the test suite in
[9dfd852b]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>
[4b93ac2]194
[9dfd852b]195 <para><command>ln -v -sf mysql/libmysqlclient{,_r}.so* .</command>: This
[22c7fe6]196 command makes the <application>MySQL</application> shared libraries
197 available to other packages at run-time.</para>
[08254fc]198
[22c7fe6]199 <para><option>--with-openssl</option>: This switch adds OpenSSL support
200 to <application>MySQL</application>.</para>
[867e611]201
[9dfd852b]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
[22c7fe6]206 </sect2>
[08254fc]207
[22c7fe6]208 <sect2 role="configuration">
209 <title>Configuring MySQL</title>
[08254fc]210
[22c7fe6]211 <sect3 id="mysql-config">
212 <title>Config Files</title>
[08254fc]213
[22c7fe6]214 <para><filename>/etc/my.cnf</filename> and
215 <filename>~/.my.cnf</filename></para>
[08254fc]216
[22c7fe6]217 <indexterm zone="mysql mysql-config">
218 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
219 </indexterm>
[08254fc]220
[22c7fe6]221 <indexterm zone="mysql mysql-config">
222 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
223 </indexterm>
[08254fc]224
[22c7fe6]225 </sect3>
[08254fc]226
[22c7fe6]227 <sect3>
228 <title>Configuration Information</title>
[08254fc]229
[22c7fe6]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>
[08254fc]234
[22c7fe6]235<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
[08254fc]236
[22c7fe6]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>
[08254fc]240
[22c7fe6]241<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
242chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
[08254fc]243
[22c7fe6]244 <para>Further configuration requires that the
[9dfd852b]245 <application>MySQL</application> server is running. Start
[22c7fe6]246 the server using the following commands as the <systemitem
247 class="username">root</systemitem> user:</para>
[08254fc]248
[515209b3]249<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
[22c7fe6]250mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
[08254fc]251
[9dfd852b]252 <para>A default installation does not set up a password for the
[22c7fe6]253 administrator, so use the following command as the <systemitem
254 class="username">root</systemitem> user to set one. Replace
[3cb0c57]255 <replaceable>&lt;new-password&gt;</replaceable> with your own.</para>
[08254fc]256
[3cb0c57]257<screen role="root"><userinput>mysqladmin -u root password <replaceable>&lt;new-password&gt;</replaceable></userinput></screen>
[08254fc]258
[22c7fe6]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>
[4b93ac2]262
[22c7fe6]263<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
[08254fc]264
[22c7fe6]265 </sect3>
[08254fc]266
[22c7fe6]267 <sect3 id="mysql-init">
268 <title>Boot Script</title>
[08254fc]269
[22c7fe6]270 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
[5254d12]271 included in the <xref linkend="bootscripts"/> package as
[22c7fe6]272 the <systemitem class="username">root</systemitem> user to start the
273 <application>MySQL</application> server during system boot-up.</para>
[08254fc]274
[22c7fe6]275 <indexterm zone="mysql mysql-init">
276 <primary sortas="f-mysql">mysql</primary>
277 </indexterm>
[20f5e71a]278
[22c7fe6]279<screen role="root"><userinput>make install-mysql</userinput></screen>
[20f5e71a]280
[22c7fe6]281 </sect3>
[08254fc]282
[22c7fe6]283 </sect2>
[08254fc]284
[22c7fe6]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>
[9dfd852b]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,
[3cb0c57]307 libmysqlclient.{so,a}, libmysqlclient_r.{so,a}, libmystrings.a,
[9dfd852b]308 libmysys.a, and libvio.a</seg>
[22c7fe6]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
[9dfd852b]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>
[22c7fe6]320
[9dfd852b]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>
[22c7fe6]324
325 </sect2>
[f45b1953]326
327</sect1>
Note: See TracBrowser for help on using the repository browser.