source: content/databases/mysql.xml@ a0f03b0

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.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 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 a0f03b0 was a0f03b0, checked in by Archaic <archaic@…>, 20 years ago

Inserting sect1info

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

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