source: server/databases/mysql.xml@ cd2ef4a6

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 cd2ef4a6 was db9754e, checked in by Randy McMurchy <randy@…>, 19 years ago

Updated to MySQL-4.1.14

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

  • Property mode set to 100644
File size: 11.2 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 "98ba9caea24b0a48ee06bb242ff2e37f">
10 <!ENTITY mysql-size "17 MB">
11 <!ENTITY mysql-buildsize "182 MB (additional 110 MB to run the test suite)">
12 <!ENTITY mysql-time "3.5 SBU (additional 12 SBU to run the test suite)">
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;
98cd /usr/lib &amp;&amp;
99ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen>
100
101<!-- Insert this back into the 'root' installation section if
102 there are ever docs to install again
103
104install -v -d -m755 /usr/share/mysql/Docs/Images &amp;&amp;
105install -v -m644 Docs/manual{,_toc}.html \
106 Docs/manual.txt /usr/share/mysql/Docs &amp;&amp;
107install -v -m644 Docs/Images/*.{jpg,gif} /usr/share/mysql/Docs/Images &amp;&amp;
108
109-->
110
111 </sect2>
112
113 <sect2 role="commands">
114 <title>Command Explanations</title>
115
116 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs
117 the <command>mysqld</command> daemon in an appropriate location.</para>
118
119 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch
120 forces <application>MySQL</application> to use
121 <filename class='directory'>/srv/mysql</filename> for database files and
122 other variable data.</para>
123
124 <para><parameter>--enable-thread-safe-client</parameter>: This
125 switch compiles a thread-safe <application>MySQL</application> client
126 library.</para>
127
128 <para><parameter>--enable-assembler</parameter>: This switch allows using
129 assembler versions of some string functions.</para>
130
131 <para><parameter>--enable-local-infile</parameter>: This switch enables
132 the <quote>LOAD DATA INFILE</quote> SQL statement.</para>
133
134 <para><parameter>CPPFLAGS="-D_GNU_SOURCE"</parameter> and
135 <parameter>--with-named-thread-libs=-lpthread</parameter>: This environment
136 variable and <command>configure</command> switch enables building the
137 package on NPTL systems.</para>
138
139 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
140 This switch puts the unix-domain socket into the
141 <filename class="directory">/var/run/mysql</filename> directory instead of
142 the default <filename class="directory">/tmp</filename>.</para>
143
144 <para><parameter>--without-bench</parameter>: This switch skips building
145 the benchmark suite.</para>
146
147 <para><parameter>--without-readline</parameter>: This switch forces the
148 build to use the system copy of <application>readline</application> instead
149 of the bundled copy.</para>
150
151 <para><command>make testdir=...</command>: This installs the test suite in
152 <filename class='directory'>/usr/lib/mysql/mysql-test</filename>.
153 BLFS is currently seeking a method to omit the installation
154 of the test suite altogether.</para>
155
156 <para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This
157 command makes the <application>MySQL</application> shared libraries
158 available to other packages at run-time.</para>
159
160 <para><option>--with-libwrap</option>: This switch adds tcpwrappers
161 support to <application>MySQL</application>.</para>
162
163 <para><option>--with-openssl</option>: This switch adds OpenSSL support
164 to <application>MySQL</application>.</para>
165
166 </sect2>
167
168 <sect2 role="configuration">
169 <title>Configuring MySQL</title>
170
171 <sect3 id="mysql-config">
172 <title>Config Files</title>
173
174 <para><filename>/etc/my.cnf</filename> and
175 <filename>~/.my.cnf</filename></para>
176
177 <indexterm zone="mysql mysql-config">
178 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary>
179 </indexterm>
180
181 <indexterm zone="mysql mysql-config">
182 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary>
183 </indexterm>
184
185 </sect3>
186
187 <sect3>
188 <title>Configuration Information</title>
189
190 <para>There are several default configuration files available in
191 <filename class="directory">/usr/share/mysql</filename> which you can
192 use. Create <filename>/etc/my.cnf</filename> using the following command
193 as the <systemitem class="username">root</systemitem> user:</para>
194
195<screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen>
196
197 <para>You can now install a database and change the ownership to the
198 unprivileged user and group (perform as the <systemitem
199 class="username">root</systemitem> user):</para>
200
201<screen role="root"><userinput>mysql_install_db --user=mysql &amp;&amp;
202chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen>
203
204 <para>Further configuration requires that the
205 <application>MySQL</application> server be running. Start
206 the server using the following commands as the <systemitem
207 class="username">root</systemitem> user:</para>
208
209<screen role="root"><userinput>install -v -m755 -o mysql -g mysql -d /var/run/mysql &amp;&amp;
210mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</userinput></screen>
211
212 <para>A default installation does not setup a password for the
213 administrator, so use the following command as the <systemitem
214 class="username">root</systemitem> user to set one. Replace
215 <replaceable>[new-password]</replaceable> with your own.</para>
216
217<screen role="root"><userinput>mysqladmin -u root password <replaceable>[new-password]</replaceable></userinput></screen>
218
219 <para>Configuration of the server is now finished. Shut the server
220 down using the following command as the <systemitem
221 class="username">root</systemitem> user:</para>
222
223<screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen>
224
225 </sect3>
226
227 <sect3 id="mysql-init">
228 <title>Boot Script</title>
229
230 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script
231 included in the <xref linkend="intro-important-bootscripts"/> package as
232 the <systemitem class="username">root</systemitem> user to start the
233 <application>MySQL</application> server during system boot-up.</para>
234
235 <indexterm zone="mysql mysql-init">
236 <primary sortas="f-mysql">mysql</primary>
237 </indexterm>
238
239<screen role="root"><userinput>make install-mysql</userinput></screen>
240
241 </sect3>
242
243 </sect2>
244
245 <sect2 role="content">
246 <title>Contents</title>
247
248 <segmentedlist>
249 <segtitle>Installed Programs</segtitle>
250 <segtitle>Installed Libraries</segtitle>
251 <segtitle>Installed Directories</segtitle>
252
253 <seglistitem>
254 <seg>comp_err, isamchk, isamlog, make_win_binary_distribution,
255 make_win_src_distribution, msql2mysql, my_print_defaults, myisam_ftdump,
256 myisamchk, myisamlog, myisampack, mysql, mysql_client_test, mysql_config,
257 mysql_convert_table_format, mysql_create_system_tables, mysql_explain_log,
258 mysql_find_rows, mysql_fix_extensions, mysql_fix_privilege_tables,
259 mysql_install_db, mysql_secure_installation, mysql_setpermission,
260 mysql_tableinfo, mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess,
261 mysqladmin, mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi,
262 mysqld_safe, mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport,
263 mysqlmanager, mysqlmanager-pwgen, mysqlmanagerc, mysqlshow, mysqltest,
264 pack_isam, perror, replace, resolve_stack_dump, and resolveip</seg>
265 <seg>libdbug.a, libheap.a, libmerge.a, libmyisam.a, libmyisammrg.a,
266 libmysqlclient.[so,a], libmysqlclient_r.[so,a], libmystrings.a, libmysys.a,
267 libnisam.a, and libvio.a</seg>
268 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql, and
269 /var/run/mysql</seg>
270 </seglistitem>
271 </segmentedlist>
272
273 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
274
275 <para>Descriptions of all the programs and libraries would be several
276 pages long. Instead, consult the <application>MySQL</application>
277 documentation for full details.</para>
278
279 <para>Certain <application>MySQL</application> support programs may
280 require the <application>Perl</application> DBI modules to be
281 installed to function properly.</para>
282
283 </sect2>
284
285</sect1>
Note: See TracBrowser for help on using the repository browser.