source: content/databases/mysql.xml@ 03d51788

10.0 10.1 11.0 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 ken/refactor-virt krejzi/svn lazarus nosym perl-modules qt5new systemd-11177 systemd-13485 trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since 03d51788 was 03d51788, checked in by Randy McMurchy <randy@…>, 17 years ago

Added index tags to TeX

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