source: content/databases/mysql.xml@ 7f8bd51

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 7f8bd51 was d0abeb0, checked in by Igor Živković <igor@…>, 19 years ago

Typo fix.

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

  • Property mode set to 100644
File size: 10.1 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.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-md5 "04c08d2a5cc39050d9fa4727f8f197e8">
10 <!ENTITY mysql-size "19 MB">
11 <!ENTITY mysql-buildsize "117 MB">
12 <!ENTITY mysql-time "2.83 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><application>My<acronym>SQL</acronym></application> dependencies
43</title>
44<sect4><title>Optional</title>
45<para>
46<xref linkend="openssl"/>,
47<xref linkend="tcpwrappers"/>,
48<ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink> (as an alternative to readline),
49<xref linkend="ORBit"/> (detected only if <xref linkend="which"/> is installed),
50<xref linkend="doxygen"/> and
51<xref linkend="pst-typesetting-tex"/>
52</para></sect4>
53</sect3>
54
55</sect2>
56
57<sect2>
58<title>Installation of <application>My<acronym>SQL</acronym></application>
59</title>
60
61<para>For security reasons, running the server as an unprivileged user
62and group is strongly encouraged:</para>
63
64<screen><userinput><command>groupadd mysql &amp;&amp;
65useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql</command></userinput></screen>
66
67<para>Build and install <application>My<acronym>SQL</acronym></application> by
68running the following commands:</para>
69
70<screen><userinput><command>CPPFLAGS="-D_GNU_SOURCE" ./configure --prefix=/usr --sysconfdir=/etc \
71 --libexecdir=/usr/sbin --localstatedir=/srv/mysql \
72 --enable-thread-safe-client --enable-assembler \
73 --enable-local-infile --with-named-thread-libs=-lpthread \
74 --with-unix-socket-path=/var/run/mysql/mysql.sock \
75 --without-debug --without-bench --without-readline &amp;&amp;
76make testdir=/usr/lib/mysql/mysql-test &amp;&amp;
77make testdir=/usr/lib/mysql/mysql-test install &amp;&amp;
78cd /usr/lib &amp;&amp;
79ln -sf mysql/libmysqlclient{,_r}.so* .</command></userinput></screen>
80
81</sect2>
82
83<sect2>
84<title>Command explanations</title>
85
86<para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs the
87<command>mysqld</command> daemon in an appropriate location.</para>
88
89<para><parameter>--localstatedir=/srv/mysql</parameter>: This switch forces
90<application>My<acronym>SQL</acronym></application> to use
91<filename class='directory'>/srv/mysql</filename> for database files and other
92variable data.</para>
93
94<para><parameter>--enable-thread-safe-client</parameter>: This switch compiles a
95thread-safe <application>My<acronym>SQL</acronym></application> client library.
96</para>
97
98<para><parameter>--enable-assembler</parameter>: This switch allows using
99assembler versions of some string functions.</para>
100
101<para><parameter>--enable-local-infile</parameter>: This switch enables the
102LOAD DATA INFILE <acronym>SQL</acronym> statement.</para>
103
104<para><parameter>CPPFLAGS="-D_GNU_SOURCE" --with-named-thread-libs=-lpthread</parameter>:
105This environment variable and configure switch enable building on
106<acronym>NPTL</acronym> systems.</para>
107
108<para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>:
109This switch puts the unix-domain socket into <filename
110class="directory">/var/run/mysql</filename> directory instead of default
111<filename class="directory">/tmp</filename>.</para>
112
113<para><parameter>--without-bench</parameter>: This switch skips building the
114benchmark suite.</para>
115
116<para><parameter>--without-readline</parameter>: This switch forces the build
117to use the system copy of <application>readline</application> instead of the
118bundled copy.</para>
119
120<para><command>make testdir=...</command>: This installs the test suite in
121<filename class='directory'>/usr/lib/mysql/mysql-test</filename>.
122<acronym>BLFS</acronym> is currently seeking a method to omit the installation
123of the test suite altogether.</para>
124
125<para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This command
126makes the <application>My<acronym>SQL</acronym></application> shared libraries
127available to other packages at run-time.</para>
128
129<para><option>--with-libwrap</option>: This switch adds tcpwrappers
130support to <application>My<acronym>SQL</acronym></application>.</para>
131
132<para><option>--with-openssl</option>: This switch adds OpenSSL support
133to <application>My<acronym>SQL</acronym></application>.</para>
134
135</sect2>
136
137<sect2>
138<title>Configuring <application>My<acronym>SQL</acronym></application></title>
139
140<sect3>
141<title>Config files</title>
142
143<para><filename>/etc/my.cnf</filename>, <filename>~/.my.cnf</filename></para>
144
145</sect3>
146
147<sect3>
148<title>Configuration Information</title>
149
150<para>There are several default configuration files available in
151<filename class="directory">/usr/share/mysql</filename> which you can
152use. Create <filename>/etc/my.cnf</filename> using the following
153command:</para>
154
155<screen><userinput><command>cp /usr/share/mysql/my-large.cnf /etc/my.cnf</command></userinput></screen>
156
157<para>You can now install a database and change the ownership to the
158unprivileged user and group.</para>
159
160<screen><userinput><command>mysql_install_db --user=mysql</command></userinput></screen>
161
162<para>Further configuration requires that the
163<application>My<acronym>SQL</acronym></application> server be running:</para>
164
165<screen><userinput><command>install -o mysql -d /var/run/mysql &amp;&amp;
166mysqld_safe --user=mysql 2&gt;&amp;1 &gt;/dev/null &amp;</command></userinput></screen>
167
168<para>A default installation does not setup a password for the administrator,
169so use the following command to set one. Replace
170<replaceable>[new-password]</replaceable> with your own.</para>
171
172<screen><userinput><command>mysqladmin -u root password <replaceable>[new-password]</replaceable></command></userinput></screen>
173
174<para>Configuration of the server is now finished. Shut the server down
175using the following command:</para>
176
177<screen><userinput><command>mysqladmin -p shutdown</command></userinput></screen>
178
179<para>Install the <filename>/etc/rc.d/init.d/mysql</filename>
180init script included in the <xref linkend="intro-important-bootscripts"/>
181package.</para>
182
183<screen><userinput><command>make install-mysql</command></userinput></screen>
184
185</sect3>
186
187</sect2>
188
189<sect2>
190<title>Contents</title>
191
192<para>The <application>My<acronym>SQL</acronym></application> package contains
193<command>client_test</command>,
194<command>comp_err</command>, <command>
195isamchk</command>, <command>
196isamlog</command>, <command>
197make_win_binary_distribution</command>, <command>
198make_win_src_distribution</command>, <command>
199msql2mysql</command>, <command>
200my_print_defaults</command>, <command>
201myisam_ftdump</command>, <command>
202myisamchk</command>, <command>
203myisamlog</command>, <command>
204myisampack</command>, <command>
205mysql</command>, <command>
206mysql_config</command>, <command>
207mysql_convert_table_format</command>, <command>
208mysql_create_system_tables</command>, <command>
209mysql_explain_log</command>, <command>
210mysql_find_rows</command>, <command>
211mysql_fix_extensions</command>, <command>
212mysql_fix_privilege_tables</command>, <command>
213mysql_install_db</command>, <command>
214mysql_secure_installation</command>, <command>
215mysql_setpermission</command>, <command>
216mysql_tableinfo</command>, <command>
217mysql_tzinfo_to_sql</command>, <command>
218mysql_waitpid</command>, <command>
219mysql_zap</command>, <command>
220mysqlacess</command>,<command>
221mysqladmin</command>, <command>
222mysqlbinlog</command>, <command>
223mysqlbug</command>, <command>
224mysqlcheck</command>, <command>
225mysqld</command>, <command>
226mysqld_multi</command>, <command>
227mysqld_safe</command>, <command>
228mysqldump</command>, <command>
229mysqldumpslow</command>, <command>
230mysqlhotcopy</command>, <command>
231mysqlimport</command>, <command>
232mysqlmanager</command>, <command>
233mysqlmanager-pwgen</command>, <command>
234mysqlmanagerc</command>, <command>
235mysqlshow</command>, <command>
236mysqltest</command>, <command>
237pack_isam</command>, <command>
238perror</command>, <command>
239replace</command>, <command>
240resolve_stack_dump</command>, <command>
241resolveip</command>, <filename class="libraryfile">
242libdbug</filename>, <filename class="libraryfile">
243libheap</filename>, <filename class="libraryfile">
244libmerge</filename>, <filename class="libraryfile">
245libmyisam</filename>, <filename class="libraryfile">
246libmyisammrg</filename>, <filename class="libraryfile">
247libmysqlclient</filename>, <filename class="libraryfile">
248libmysqlclient_r</filename>, <filename class="libraryfile">
249libmystrings</filename>, <filename class="libraryfile">
250libmysys</filename>, <filename class="libraryfile">
251libnisam</filename> and <filename class="libraryfile">
252libvio</filename>.</para>
253
254</sect2>
255
256<sect2><title>Description</title>
257
258<para>A package listing would be several pages long. Consult the
259<application>My<acronym>SQL</acronym></application> documentation for full
260details instead.</para>
261
262<para>Certain <application>My<acronym>SQL</acronym></application> support
263programs may require the <application>Perl</application> DBI modules to be
264installed to function properly.</para>
265
266</sect2>
267
268</sect1>
Note: See TracBrowser for help on using the repository browser.