source: content/databases/mysql.xml@ fd015ac

10.0 10.1 11.0 11.1 6.0 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 krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/test-20220226
Last change on this file since fd015ac was fd015ac, checked in by Igor Živković <igor@…>, 18 years ago

Updated to MySQL-4.0.21.

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

  • Property mode set to 100644
File size: 10.0 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3 "http://www.oasis-open.org/docbook/xml/4.3/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.0/mysql-&mysql-version;.tar.gz">
8 <!ENTITY mysql-download-ftp "ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-4.0/mysql-&mysql-version;.tar.gz">
9 <!ENTITY mysql-md5 "0a3dae16519afa5e59d8b9e252181243">
10 <!ENTITY mysql-size "13.5 MB">
11 <!ENTITY mysql-buildsize "98.7 MB">
12 <!ENTITY mysql-time "3.43 SBU">
13]>
14
15<sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
16<sect1info>
17<othername>$LastChangedBy$</othername>
18<date>$Date$</date>
19</sect1info>
20<?dbhtml filename="mysql.html"?>
21<title>MySQL-&mysql-version;</title>
22
23<sect2>
24<title>Introduction to <application>My<acronym>SQL</acronym></application>
25</title>
26
27<para><application>My<acronym>SQL</acronym></application> is a widely used and
28fast <acronym>SQL</acronym> database server. It is a client/server
29implementation that consists of a server daemon and many different
30client programs and libraries.</para>
31
32<sect3><title>Package information</title>
33<itemizedlist spacing='compact'>
34<listitem><para>Download (HTTP): <ulink url="&mysql-download-http;"/></para></listitem>
35<listitem><para>Download (FTP): <ulink url="&mysql-download-ftp;"/></para></listitem>
36<listitem><para>MD5 Sum: &mysql-md5;</para></listitem>
37<listitem><para>Download size: &mysql-size;</para></listitem>
38<listitem><para>Estimated Disk space required: &mysql-buildsize;</para></listitem>
39<listitem><para>Estimated build time: &mysql-time;</para></listitem></itemizedlist>
40</sect3>
41
42<sect3><title>Additional downloads</title>
43<itemizedlist spacing='compact'>
44<listitem><para>Required Patch (for building against NPTL): <ulink
45url="&patch-root;/mysql-&mysql-version;-nptl-1.patch"/></para></listitem>
46</itemizedlist></sect3>
47
48<sect3><title><application>My<acronym>SQL</acronym></application> dependencies
49</title>
50<sect4><title>Optional</title>
51<para><xref linkend="openssl"/>, <xref linkend="tcpwrappers"/>,
52<xref linkend="which"/> and <xref linkend="ORBit"/>
53</para></sect4>
54</sect3>
55
56</sect2>
57
58<sect2>
59<title>Installation of <application>My<acronym>SQL</acronym></application>
60</title>
61
62<para>For security reasons, running the server as an unprivileged user
63and group is strongly encouraged:</para>
64
65<screen><userinput><command>groupadd mysql &amp;&amp;
66useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql</command></userinput></screen>
67
68<para>Build and install <application>My<acronym>SQL</acronym></application> by
69running the following commands:</para>
70
71<screen><userinput><command>patch -Np1 -i ../mysql-&mysql-version;-nptl-1.patch &amp;&amp;
72./configure --prefix=/usr --sysconfdir=/etc \
73 --libexecdir=/usr/sbin --localstatedir=/srv/mysql \
74 --enable-thread-safe-client --enable-assembler \
75 --without-readline --without-debug \
76 --enable-local-infile --without-bench &amp;&amp;
77make testdir=/usr/lib/mysql/mysql-test &amp;&amp;
78make testdir=/usr/lib/mysql/mysql-test install &amp;&amp;
79cd /usr/lib &amp;&amp;
80ln -sf mysql/libmysqlclient{,_r}.so* .</command></userinput></screen>
81
82</sect2>
83
84<sect2>
85<title>Command explanations</title>
86
87<para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs the
88<command>mysqld</command> daemon in an appropriate location.</para>
89
90<para><parameter>--localstatedir=/srv/mysql</parameter>: This switch forces
91<application>My<acronym>SQL</acronym></application> to use
92<filename class='directory'>/srv/mysql</filename> for database files and other
93variable data.</para>
94
95<para><parameter>--enable-thread-safe-client</parameter>: This switch compiles a
96thread-safe <application>My<acronym>SQL</acronym></application> client library.
97</para>
98
99<para><parameter>--enable-assembler</parameter>: This switch allows using
100assembler versions of some string functions.</para>
101
102<para><parameter>--without-readline</parameter>: This switch forces the build
103to use the system copy of <application>readline</application> instead of the
104bundled copy.</para>
105
106<para><option>--enable-local-infile</option>: This switch enables the
107LOAD DATA INFILE <acronym>SQL</acronym> statement.</para>
108
109<para><option>--without-bench</option>: This switch skips building the
110benchmark suite.</para>
111
112<para><command>make testdir=...</command>: This installs the test suite in
113<filename class='directory'>/usr/lib/mysql/mysql-test</filename>.
114<acronym>BLFS</acronym> is currently seeking a method to omit the installation
115of the test suite altogether.</para>
116
117<para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This command
118makes the <application>My<acronym>SQL</acronym></application> shared libraries
119available to other packages at run-time.</para>
120
121</sect2>
122
123<sect2>
124<title>Configuring <application>My<acronym>SQL</acronym></application></title>
125
126<sect3>
127<title>Config files</title>
128
129<para><filename>/etc/my.cnf</filename>, <filename>~/.my.cnf</filename></para>
130
131</sect3>
132
133<sect3>
134<title>Configuration Information</title>
135
136<para>There are several default configuration files available in
137<filename class="directory">/usr/share/mysql</filename> which you can
138use. Create <filename>/etc/my.cnf</filename> using the following
139command:</para>
140
141<screen><userinput><command>cp /usr/share/mysql/my-medium.cnf /etc/my.cnf</command></userinput></screen>
142
143<para>You can now install a database and change the ownership to the
144unprivileged user and group.</para>
145
146<screen><userinput><command>mysql_install_db &amp;&amp;
147chown -R mysql:mysql /srv/mysql</command></userinput></screen>
148
149<para>Further configuration requires that the
150<application>My<acronym>SQL</acronym></application> server be running:</para>
151
152<screen><userinput><command>mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</command></userinput></screen>
153
154<para>A default installation does not setup a password for the administrator,
155so use the following command to set one. Replace
156<replaceable>[new-password]</replaceable> with your own.</para>
157
158<!--
159<screen><userinput><command>mysql -uroot mysql</command></userinput>
160Welcome to the MySQL monitor. Commands end with ; or \g.
161Your MySQL connection id is 2 to server version: 3.23.51-log
162
163Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
164
165<prompt>mysql&gt;</prompt> <userinput><command>UPDATE user SET password=password('<replaceable>new-password</replaceable>') WHERE user='root';</command></userinput>
166Query OK, 2 rows affected (0.00 sec)
167Rows matched: 2 Changed: 2 Warnings: 0
168
169<prompt>mysql&gt;</prompt> <userinput><command>FLUSH PRIVILEGES;</command></userinput>
170Query OK, 0 rows affected (0.00 sec)
171
172<prompt>mysql&gt;</prompt> <userinput><command>EXIT;</command></userinput>
173bye
174</screen>
175-->
176
177<screen><userinput><command>mysqladmin -u root password <replaceable>[new-password]</replaceable></command></userinput></screen>
178
179<para>Configuration of the server is now finished. Shut the server down
180using the following command:</para>
181
182<screen><userinput><command>mysqladmin -p shutdown</command></userinput></screen>
183
184<para>Install the <filename>/etc/rc.d/init.d/mysql</filename>
185init script included in the <xref linkend="intro-important-bootscripts"/>
186package.</para>
187
188<screen><userinput><command>make install-mysql</command></userinput></screen>
189
190</sect3>
191
192</sect2>
193
194<sect2>
195<title>Contents</title>
196
197<para>The <application>My<acronym>SQL</acronym></application> package contains <command>
198comp_err</command>, <command>
199isamchk</command>, <command>
200isamlog</command>, <command>
201make_win_binary_distribution</command>, <command>
202make_win_src_distribution</command>, <command>
203msql2mysql</command>, <command>
204my_print_defaults</command>, <command>
205myisam_ftdump</command>, <command>
206myisamchk</command>, <command>
207myisamlog</command>, <command>
208myisampack</command>, <command>
209mysql</command>, <command>
210mysql_config</command>, <command>
211mysql_convert_table_format</command>, <command>
212mysql_explain_log</command>, <command>
213mysql_find_rows</command>, <command>
214mysql_fix_extensions</command>, <command>
215mysql_fix_privilege_tables</command>, <command>
216mysql_install</command>, <command>
217mysql_install_db</command>, <command>
218mysql_secure_installation</command>, <command>
219mysql_setpermission</command>, <command>
220mysql_tableinfo</command>, <command>
221mysql_waitpid</command>, <command>
222mysql_zap</command>, <command>
223mysqlacess</command>,<command>
224mysqladmin</command>, <command>
225mysqlbinlog</command>, <command>
226mysqlbug</command>, <command>
227mysqlcheck</command>, <command>
228mysqld</command>, <command>
229mysqld_multi</command>, <command>
230mysqld_safe</command>, <command>
231mysqldump</command>, <command>
232mysqldumpslow</command>, <command>
233mysqlhotcopy</command>, <command>
234mysqlimport</command>, <command>
235mysqlmanager</command>, <command>
236mysqlmanager-pwgen</command>, <command>
237mysqlmanagerc</command>, <command>
238mysqlshow</command>, <command>
239mysqltest</command>, <command>
240pack_isam</command>, <command>
241perror</command>, <command>
242replace</command>, <command>
243resolve_stack_dump</command>, <command>
244resolveip</command>, <filename class="libraryfile">
245libdbug</filename>, <filename class="libraryfile">
246libheap</filename>, <filename class="libraryfile">
247libmerge</filename>, <filename class="libraryfile">
248libmyisam</filename>, <filename class="libraryfile">
249libmyisammrg</filename>, <filename class="libraryfile">
250libmysqlclient</filename>, <filename class="libraryfile">
251libmysqlclient_r</filename>, <filename class="libraryfile">
252libmystrings</filename>, <filename class="libraryfile">
253libmysys</filename>, <filename class="libraryfile">
254libnisam</filename> and <filename class="libraryfile">
255libvio</filename>.</para>
256
257</sect2>
258
259<sect2><title>Description</title>
260
261<para>A package listing would be several pages long. Consult the
262<application>My<acronym>SQL</acronym></application> documentation for full
263details instead.</para>
264
265<para>Certain <application>My<acronym>SQL</acronym></application> support
266programs may require the <application>Perl</application> DBI modules to be
267installed to function properly.</para>
268
269</sect2>
270
271</sect1>
Note: See TracBrowser for help on using the repository browser.