source: server/databases/mysql.xml@ ba539b8

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 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 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 ba539b8 was ba539b8, checked in by David Jensen <djensen@…>, 19 years ago

Updated to MySQL-4.1.12

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

  • Property mode set to 100644
File size: 11.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6
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">
9 <!ENTITY mysql-md5sum "56a6f5cacd97ae290e07bbe19f279af1">
10 <!ENTITY mysql-size "17 MB">
11 <!ENTITY mysql-buildsize "177 MB (additional 110 MB to run the testsuite)">
12 <!ENTITY mysql-time "3.6 SBU (additional 12 SBU to run the testsuite)">
13]>
14
15<sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
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
58 <bridgehead renderas="sect3">MySQL Dependencies</bridgehead>
59
60 <bridgehead renderas="sect4">Optional</bridgehead>
61 <para><xref linkend="openssl"/>,
62 <xref linkend="tcpwrappers"/>,
63 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink>
64 (as an alternative to readline),
65 <xref linkend="ORBit"/> (detected only if <xref linkend="which"/> is
66 installed),
67 <xref linkend="doxygen"/> and
68 <xref linkend="tex"/></para>
69
70 </sect2>
71
72 <sect2 role="installation">
73 <title>Installation of MySQL</title>
74
75 <para>For security reasons, running the server as an unprivileged user
76 and group is strongly encouraged:</para>
77
78<screen role="root"><userinput>groupadd -g 40 mysql &amp;&amp;
79useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false \
80 -u 40 mysql</userinput></screen>
81
82 <para>Build and install <application>MySQL</application> by
83 running the following commands:</para>
84
85<screen><userinput>CPPFLAGS="-D_GNU_SOURCE" ./configure --prefix=/usr --sysconfdir=/etc \
86 --libexecdir=/usr/sbin --localstatedir=/srv/mysql \
87 --enable-thread-safe-client --enable-assembler \
88 --enable-local-infile --with-named-thread-libs=-lpthread \
89 --with-unix-socket-path=/var/run/mysql/mysql.sock \
90 --without-debug --without-bench --without-readline &amp;&amp;
91make testdir=/usr/lib/mysql/mysql-test</userinput></screen>
92
93 <para>To test the results, issue: <command>make test</command>.</para>
94
95 <para>Now, as the <systemitem class="username">root</systemitem> user:</para>
96
97<screen role="root"><userinput>make testdir=/usr/lib/mysql/mysql-test install &amp;&amp;
98install -v -d -m755 /usr/share/mysql/Docs/Images &amp;&amp;
99install -v -m644 Docs/manual{,_toc}.html \
100 Docs/manual.txt /usr/share/mysql/Docs &amp;&amp;
101install -v -m644 Docs/Images/*.{jpg,gif} /usr/share/mysql/Docs/Images &amp;&amp;
102cd /usr/lib &amp;&amp;
103ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
104
105 </sect2>
106
107 <sect2 role="commands">
108 <title>Command Explanations</title>
109
110 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
111 the <command>mysqld</command> daemon in an appropriate location.</para>
112
113 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch
114 forces <application>MySQL</application> to use
115 <filename class='directory'>/srv/mysql</filename> for database files and
116 other variable data.</para>
117
118 <para><parameter>--enable-thread-safe-client</parameter>: This
119 switch compiles a thread-safe <application>MySQL</application> client
120 library.</para>
121
122 <para><parameter>--enable-assembler</parameter>: This switch allows using
123 assembler versions of some string functions.</para>
124
125 <para><parameter>--enable-local-infile</parameter>: This switch enables
126 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
127
128 <para><parameter>CPPFLAGS="-D_GNU_SOURCE"
129 --with-named-thread-libs=-lpthread</parameter>: This environment variable
130 and configure switch enable building on NPTL systems.</para>
131
132 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
133 This switch puts the unix-domain socket into <filename
134 class="directory">/var/run/mysql</filename> directory instead of default
135 <filename class="directory">/tmp</filename>.</para>
136
137 <para><parameter>--without-bench</parameter>: This switch skips building
138 the benchmark suite.</para>
139
140 <para><parameter>--without-readline</parameter>: This switch forces the
141 build to use the system copy of <application>readline</application> instead
142 of the bundled copy.</para>
143
144 <para><command>make testdir=...</command>: This installs the test suite in
145 <filename class='directory'>/usr/lib/mysql/mysql-test</filename>.
146 BLFS is currently seeking a method to omit the installation
147 of the test suite altogether.</para>
148
149 <para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This
150 command makes the <application>MySQL</application> shared libraries
151 available to other packages at run-time.</para>
152
153 <para><option>--with-libwrap</option>: This switch adds tcpwrappers
154 support to <application>MySQL</application>.</para>
155
156 <para><option>--with-openssl</option>: This switch adds OpenSSL support
157 to <application>MySQL</application>.</para>
158
159 </sect2>
160
161 <sect2 role="configuration">
162 <title>Configuring MySQL</title>
163
164 <sect3 id="mysql-config">
165 <title>Config Files</title>
166
167 <para><filename>/etc/my.cnf</filename> and
168 <filename>~/.my.cnf</filename></para>
169
170 <indexterm zone="mysql mysql-config">
171 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
172 </indexterm>
173
174 <indexterm zone="mysql mysql-config">
175 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
176 </indexterm>
177
178 </sect3>
179
180 <sect3>
181 <title>Configuration Information</title>
182
183 <para>There are several default configuration files available in
184 <filename class="directory">/usr/share/mysql</filename> which you can
185 use. Create <filename>/etc/my.cnf</filename> using the following command
186 as the <systemitem class="username">root</systemitem> user:</para>
187
188<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
189
190 <para>You can now install a database and change the ownership to the
191 unprivileged user and group (perform as the <systemitem
192 class="username">root</systemitem> user):</para>
193
194<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
195chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
196
197 <para>Further configuration requires that the
198 <application>MySQL</application> server be running. Start
199 the server using the following commands as the <systemitem
200 class="username">root</systemitem> user:</para>
201
202<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
203mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
204
205 <para>A default installation does not setup a password for the
206 administrator, so use the following command as the <systemitem
207 class="username">root</systemitem> user to set one. Replace
208 <replaceable>[new-password]</replaceable> with your own.</para>
209
210<screen role="root"><userinput>mysqladmin -u root password <replaceable>[new-password]</replaceable></userinput></screen>
211
212 <para>Configuration of the server is now finished. Shut the server
213 down using the following command as the <systemitem
214 class="username">root</systemitem> user:</para>
215
216<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
217
218 </sect3>
219
220 <sect3 id="mysql-init">
221 <title>Boot Script</title>
222
223 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
224 included in the <xref linkend="intro-important-bootscripts"/> package as
225 the <systemitem class="username">root</systemitem> user to start the
226 <application>MySQL</application> server during system boot-up.</para>
227
228 <indexterm zone="mysql mysql-init">
229 <primary sortas="f-mysql">mysql</primary>
230 </indexterm>
231
232<screen role="root"><userinput>make install-mysql</userinput></screen>
233
234 </sect3>
235
236 </sect2>
237
238 <sect2 role="content">
239 <title>Contents</title>
240
241 <segmentedlist>
242 <segtitle>Installed Programs</segtitle>
243 <segtitle>Installed Libraries</segtitle>
244 <segtitle>Installed Directories</segtitle>
245
246 <seglistitem>
247 <seg>comp_err, isamchk, isamlog, make_win_binary_distribution,
248 make_win_src_distribution, msql2mysql, my_print_defaults, myisam_ftdump,
249 myisamchk, myisamlog, myisampack, mysql, mysql_client_test, mysql_config,
250 mysql_convert_table_format, mysql_create_system_tables, mysql_explain_log,
251 mysql_find_rows, mysql_fix_extensions, mysql_fix_privilege_tables,
252 mysql_install_db, mysql_secure_installation, mysql_setpermission,
253 mysql_tableinfo, mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess,
254 mysqladmin, mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi,
255 mysqld_safe, mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport,
256 mysqlmanager, mysqlmanager-pwgen, mysqlmanagerc, mysqlshow, mysqltest,
257 pack_isam, perror, replace, resolve_stack_dump, and resolveip</seg>
258 <seg>libdbug.a, libheap.a, libmerge.a, libmyisam.a, libmyisammrg.a,
259 libmysqlclient.[so,a], libmysqlclient_r.[so,a], libmystrings.a, libmysys.a,
260 libnisam.a, and libvio.a</seg>
261 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql, and
262 /var/run/mysql</seg>
263 </seglistitem>
264 </segmentedlist>
265
266 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
267
268 <para>Descriptions of all the programs and libraries would be several
269 pages long. Instead, consult the <application>MySQL</application>
270 documentation for full details.</para>
271
272 <para>Certain <application>MySQL</application> support programs may
273 require the <application>Perl</application> DBI modules to be
274 installed to function properly.</para>
275
276 </sect2>
277
278</sect1>
Note: See TracBrowser for help on using the repository browser.