source: server/databases/mysql.xml@ 69a63ff

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 12.2 6.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 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 69a63ff was 9e69cae, checked in by Igor Živković <igor@…>, 19 years ago

Updated to MySQL-4.1.11.

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

  • Property mode set to 100644
File size: 10.2 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;
6
[867e611]7 <!ENTITY mysql-download-http "http://mysql.he.net/Downloads/MySQL-4.1/mysql-&mysql-version;.tar.gz">
8 <!ENTITY mysql-download-ftp "ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-4.1/mysql-&mysql-version;.tar.gz">
[9e69cae]9 <!ENTITY mysql-md5 "0b99001b07cad53f161ec629a6bb24ea">
10 <!ENTITY mysql-size "22 MB">
[20f5e71a]11 <!ENTITY mysql-buildsize "207 MB">
12 <!ENTITY mysql-time "3.83 SBU">
[08254fc]13]>
14
[c30b739]15<sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
[a0f03b0]16<sect1info>
[5cd0959d]17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
[a0f03b0]19</sect1info>
[00bb024c]20<?dbhtml filename="mysql.html"?>
[c30b739]21<title>MySQL-&mysql-version;</title>
[20f5e71a]22<indexterm zone="mysql">
23<primary sortas="a-MySQL">MySQL</primary></indexterm>
[f45b1953]24
[08254fc]25<sect2>
[4b93ac2]26<title>Introduction to <application>My<acronym>SQL</acronym></application>
27</title>
[08254fc]28
[4b93ac2]29<para><application>My<acronym>SQL</acronym></application> is a widely used and
30fast <acronym>SQL</acronym> database server. It is a client/server
[08254fc]31implementation that consists of a server daemon and many different
32client programs and libraries.</para>
33
34<sect3><title>Package information</title>
35<itemizedlist spacing='compact'>
[03d51788]36<listitem><para>Download (HTTP):
37<ulink url="&mysql-download-http;"/></para></listitem>
38<listitem><para>Download (FTP):
39<ulink url="&mysql-download-ftp;"/></para></listitem>
40<listitem><para>Download MD5 sum: &mysql-md5;</para></listitem>
[08254fc]41<listitem><para>Download size: &mysql-size;</para></listitem>
[03d51788]42<listitem><para>Estimated disk space required:
43&mysql-buildsize;</para></listitem>
44<listitem><para>Estimated build time:
45&mysql-time;</para></listitem></itemizedlist>
[08254fc]46</sect3>
47
[4b93ac2]48<sect3><title><application>My<acronym>SQL</acronym></application> dependencies
49</title>
[08254fc]50<sect4><title>Optional</title>
[20f5e71a]51<para><xref linkend="openssl"/>,
[867e611]52<xref linkend="tcpwrappers"/>,
[03d51788]53<ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
54(as an alternative to readline),
55<xref linkend="ORBit"/> (detected only if <xref linkend="which"/> is
56installed),
[cef3a2f]57<xref linkend="doxygen"/> and
[20f5e71a]58<xref linkend="tex"/></para>
59</sect4>
[08254fc]60</sect3>
61
62</sect2>
63
64<sect2>
[4b93ac2]65<title>Installation of <application>My<acronym>SQL</acronym></application>
66</title>
[08254fc]67
68<para>For security reasons, running the server as an unprivileged user
69and group is strongly encouraged:</para>
70
71<screen><userinput><command>groupadd mysql &amp;&amp;
[20f5e71a]72useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false mysql</command></userinput></screen>
[08254fc]73
[4b93ac2]74<para>Build and install <application>My<acronym>SQL</acronym></application> by
75running the following commands:</para>
[08254fc]76
[c2c2d76]77<screen><userinput><command>CPPFLAGS="-D_GNU_SOURCE" ./configure --prefix=/usr --sysconfdir=/etc \
[4b93ac2]78 --libexecdir=/usr/sbin --localstatedir=/srv/mysql \
79 --enable-thread-safe-client --enable-assembler \
[867e611]80 --enable-local-infile --with-named-thread-libs=-lpthread \
[d0abeb0]81 --with-unix-socket-path=/var/run/mysql/mysql.sock \
[ac109439]82 --without-debug --without-bench --without-readline &amp;&amp;
[20f5e71a]83make testdir=/usr/lib/mysql/mysql-test</command></userinput></screen>
84
[9e69cae]85<para>To test the results, issue: <command>make test</command>.</para>
86
[20f5e71a]87<para>Now, as the root user:</para>
88
89<screen><userinput role='root'><command>make testdir=/usr/lib/mysql/mysql-test install &amp;&amp;
90install -v -d -m755 /usr/share/mysql/Docs/Images &amp;&amp;
91install -v -m644 Docs/manual{,_toc}.html \
92 Docs/manual.txt /usr/share/mysql/Docs &amp;&amp;
93install -v -m644 Docs/Images/*.{jpg,gif} /usr/share/mysql/Docs/Images &amp;&amp;
[4b93ac2]94cd /usr/lib &amp;&amp;
[20f5e71a]95ln -v -sf mysql/libmysqlclient{,_r}.so* .</command></userinput></screen>
[4b93ac2]96
97</sect2>
98
99<sect2>
100<title>Command explanations</title>
[08254fc]101
[4b93ac2]102<para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs the
103<command>mysqld</command> daemon in an appropriate location.</para>
[08254fc]104
[4b93ac2]105<para><parameter>--localstatedir=/srv/mysql</parameter>: This switch forces
106<application>My<acronym>SQL</acronym></application> to use
107<filename class='directory'>/srv/mysql</filename> for database files and other
108variable data.</para>
109
110<para><parameter>--enable-thread-safe-client</parameter>: This switch compiles a
111thread-safe <application>My<acronym>SQL</acronym></application> client library.
112</para>
113
114<para><parameter>--enable-assembler</parameter>: This switch allows using
115assembler versions of some string functions.</para>
116
[867e611]117<para><parameter>--enable-local-infile</parameter>: This switch enables the
[4b93ac2]118LOAD DATA INFILE <acronym>SQL</acronym> statement.</para>
119
[20f5e71a]120<para><parameter>CPPFLAGS="-D_GNU_SOURCE"
121--with-named-thread-libs=-lpthread</parameter>: This environment variable and
122configure switch enable building on <acronym>NPTL</acronym> systems.</para>
[c2c2d76]123
[867e611]124<para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
125This switch puts the unix-domain socket into <filename
126class="directory">/var/run/mysql</filename> directory instead of default
127<filename class="directory">/tmp</filename>.</para>
128
129<para><parameter>--without-bench</parameter>: This switch skips building the
130benchmark suite.</para>
131
132<para><parameter>--without-readline</parameter>: This switch forces the build
133to use the system copy of <application>readline</application> instead of the
134bundled copy.</para>
135
[4b93ac2]136<para><command>make testdir=...</command>: This installs the test suite in
137<filename class='directory'>/usr/lib/mysql/mysql-test</filename>.
138<acronym>BLFS</acronym> is currently seeking a method to omit the installation
139of the test suite altogether.</para>
140
[2fa0880]141<para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This command
[4b93ac2]142makes the <application>My<acronym>SQL</acronym></application> shared libraries
143available to other packages at run-time.</para>
[08254fc]144
[867e611]145<para><option>--with-libwrap</option>: This switch adds tcpwrappers
146support to <application>My<acronym>SQL</acronym></application>.</para>
147
148<para><option>--with-openssl</option>: This switch adds OpenSSL support
149to <application>My<acronym>SQL</acronym></application>.</para>
150
[08254fc]151</sect2>
152
153<sect2>
154<title>Configuring <application>My<acronym>SQL</acronym></application></title>
155
[20f5e71a]156<sect3 id="mysql-config">
[08254fc]157<title>Config files</title>
158
159<para><filename>/etc/my.cnf</filename>, <filename>~/.my.cnf</filename></para>
[20f5e71a]160<indexterm zone="mysql mysql-config">
161<primary sortas="e-AA.my.cnf">~/.my.cnf</primary></indexterm>
162<indexterm zone="mysql mysql-config">
163<primary sortas="e-etc-my.cnf">/etc/my.cnf</primary></indexterm>
[08254fc]164
165</sect3>
166
167<sect3>
168<title>Configuration Information</title>
169
170<para>There are several default configuration files available in
171<filename class="directory">/usr/share/mysql</filename> which you can
[20f5e71a]172use. Create <filename>/etc/my.cnf</filename> using the following
173command as the root user:</para>
[08254fc]174
[20f5e71a]175<screen><userinput role='root'><command>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</command></userinput></screen>
[08254fc]176
177<para>You can now install a database and change the ownership to the
[20f5e71a]178unprivileged user and group (perform as the root user):</para>
[08254fc]179
[20f5e71a]180<screen><userinput role='root'><command>mysql_install_db --user=mysql &amp;&amp;
181chgrp -v mysql /srv/mysql{,/test,/mysql}</command></userinput></screen>
[08254fc]182
[4b93ac2]183<para>Further configuration requires that the
[20f5e71a]184<application>My<acronym>SQL</acronym></application> server be running. Start
185the server using the following commands as the root user:</para>
[08254fc]186
[20f5e71a]187<screen><userinput role='root'><command>install -v -m750 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
[ac109439]188mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</command></userinput></screen>
[08254fc]189
[4b93ac2]190<para>A default installation does not setup a password for the administrator,
[20f5e71a]191so use the following command as the root user to set one. Replace
[4b93ac2]192<replaceable>[new-password]</replaceable> with your own.</para>
[08254fc]193
[20f5e71a]194<screen><userinput role='root'><command>mysqladmin -u root password <replaceable>[new-password]</replaceable></command></userinput></screen>
[08254fc]195
196<para>Configuration of the server is now finished. Shut the server down
[20f5e71a]197using the following command as the root user:</para>
[08254fc]198
[20f5e71a]199<screen><userinput role='root'><command>mysqladmin -p shutdown</command></userinput></screen>
[08254fc]200
[20f5e71a]201<para id="mysql-init">Install the <filename>/etc/rc.d/init.d/mysql</filename>
[4b93ac2]202init script included in the <xref linkend="intro-important-bootscripts"/>
[20f5e71a]203package as the root user to start the <application>MySQL</application> server
204during system boot-up.</para>
205<indexterm zone="mysql mysql-init">
206<primary sortas="f-mysql">mysql</primary></indexterm>
[4b93ac2]207
[20f5e71a]208<screen><userinput role='root'><command>make install-mysql</command></userinput></screen>
[08254fc]209
210</sect3>
211
212</sect2>
213
214<sect2>
215<title>Contents</title>
216
[20f5e71a]217<segmentedlist>
218<segtitle>Installed Programs</segtitle>
219<segtitle>Installed Libraries</segtitle>
220<segtitle>Installed Directories</segtitle>
221
222<seglistitem>
223<seg>comp_err, isamchk, isamlog, make_win_binary_distribution,
224make_win_src_distribution, msql2mysql, my_print_defaults, myisam_ftdump,
225myisamchk, myisamlog, myisampack, mysql, mysql_client_test, mysql_config,
226mysql_convert_table_format, mysql_create_system_tables, mysql_explain_log,
227mysql_find_rows, mysql_fix_extensions, mysql_fix_privilege_tables,
228mysql_install_db, mysql_secure_installation, mysql_setpermission,
229mysql_tableinfo, mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess,
230mysqladmin, mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi,
231mysqld_safe, mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport,
232mysqlmanager, mysqlmanager-pwgen, mysqlmanagerc, mysqlshow, mysqltest,
233pack_isam, perror, replace, resolve_stack_dump and resolveip</seg>
234<seg>libdbug.a, libheap.a, libmerge.a, libmyisam.a, libmyisammrg.a,
235libmysqlclient.[so,a], libmysqlclient_r.[so,a], libmystrings.a, libmysys.a,
236libnisam.a and libvio.a</seg>
237<seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql and
238/var/run/mysql</seg>
239</seglistitem>
240</segmentedlist>
241
242<sect3><title>Short description</title>
243<para>Descriptions of all the programs and libraries would be several pages
244long. Instead, consult the <application>My<acronym>SQL</acronym></application>
245documentation for full details.</para>
[08254fc]246
[4b93ac2]247<para>Certain <application>My<acronym>SQL</acronym></application> support
248programs may require the <application>Perl</application> DBI modules to be
249installed to function properly.</para>
[20f5e71a]250</sect3>
[08254fc]251
252</sect2>
[f45b1953]253
254</sect1>
Note: See TracBrowser for help on using the repository browser.