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
|
---|
28 | fast <acronym>SQL</acronym> database server. It is a client/server
|
---|
29 | implementation that consists of a server daemon and many different
|
---|
30 | client 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-package"/>,
|
---|
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
|
---|
55 | installed),
|
---|
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
|
---|
68 | and group is strongly encouraged:</para>
|
---|
69 |
|
---|
70 | <screen><userinput><command>groupadd mysql &&
|
---|
71 | useradd -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
|
---|
74 | running 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 &&
|
---|
82 | make testdir=/usr/lib/mysql/mysql-test &&
|
---|
83 | make testdir=/usr/lib/mysql/mysql-test install &&
|
---|
84 | cd /usr/lib &&
|
---|
85 | ln -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
|
---|
98 | variable data.</para>
|
---|
99 |
|
---|
100 | <para><parameter>--enable-thread-safe-client</parameter>: This switch compiles a
|
---|
101 | thread-safe <application>My<acronym>SQL</acronym></application> client library.
|
---|
102 | </para>
|
---|
103 |
|
---|
104 | <para><parameter>--enable-assembler</parameter>: This switch allows using
|
---|
105 | assembler versions of some string functions.</para>
|
---|
106 |
|
---|
107 | <para><parameter>--enable-local-infile</parameter>: This switch enables the
|
---|
108 | LOAD DATA INFILE <acronym>SQL</acronym> statement.</para>
|
---|
109 |
|
---|
110 | <para><parameter>CPPFLAGS="-D_GNU_SOURCE" --with-named-thread-libs=-lpthread</parameter>:
|
---|
111 | This 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>:
|
---|
115 | This switch puts the unix-domain socket into <filename
|
---|
116 | class="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
|
---|
120 | benchmark suite.</para>
|
---|
121 |
|
---|
122 | <para><parameter>--without-readline</parameter>: This switch forces the build
|
---|
123 | to use the system copy of <application>readline</application> instead of the
|
---|
124 | bundled 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
|
---|
129 | of the test suite altogether.</para>
|
---|
130 |
|
---|
131 | <para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This command
|
---|
132 | makes the <application>My<acronym>SQL</acronym></application> shared libraries
|
---|
133 | available to other packages at run-time.</para>
|
---|
134 |
|
---|
135 | <para><option>--with-libwrap</option>: This switch adds tcpwrappers
|
---|
136 | support to <application>My<acronym>SQL</acronym></application>.</para>
|
---|
137 |
|
---|
138 | <para><option>--with-openssl</option>: This switch adds OpenSSL support
|
---|
139 | to <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
|
---|
158 | use. Create <filename>/etc/my.cnf</filename> using the following
|
---|
159 | command:</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
|
---|
164 | unprivileged 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 &&
|
---|
172 | mysqld_safe --user=mysql 2>&1 >/dev/null &</command></userinput></screen>
|
---|
173 |
|
---|
174 | <para>A default installation does not setup a password for the administrator,
|
---|
175 | so 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
|
---|
181 | using 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>
|
---|
186 | init script included in the <xref linkend="intro-important-bootscripts"/>
|
---|
187 | package.</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>
|
---|
201 | isamchk</command>, <command>
|
---|
202 | isamlog</command>, <command>
|
---|
203 | make_win_binary_distribution</command>, <command>
|
---|
204 | make_win_src_distribution</command>, <command>
|
---|
205 | msql2mysql</command>, <command>
|
---|
206 | my_print_defaults</command>, <command>
|
---|
207 | myisam_ftdump</command>, <command>
|
---|
208 | myisamchk</command>, <command>
|
---|
209 | myisamlog</command>, <command>
|
---|
210 | myisampack</command>, <command>
|
---|
211 | mysql</command>, <command>
|
---|
212 | mysql_config</command>, <command>
|
---|
213 | mysql_convert_table_format</command>, <command>
|
---|
214 | mysql_create_system_tables</command>, <command>
|
---|
215 | mysql_explain_log</command>, <command>
|
---|
216 | mysql_find_rows</command>, <command>
|
---|
217 | mysql_fix_extensions</command>, <command>
|
---|
218 | mysql_fix_privilege_tables</command>, <command>
|
---|
219 | mysql_install_db</command>, <command>
|
---|
220 | mysql_secure_installation</command>, <command>
|
---|
221 | mysql_setpermission</command>, <command>
|
---|
222 | mysql_tableinfo</command>, <command>
|
---|
223 | mysql_tzinfo_to_sql</command>, <command>
|
---|
224 | mysql_waitpid</command>, <command>
|
---|
225 | mysql_zap</command>, <command>
|
---|
226 | mysqlacess</command>,<command>
|
---|
227 | mysqladmin</command>, <command>
|
---|
228 | mysqlbinlog</command>, <command>
|
---|
229 | mysqlbug</command>, <command>
|
---|
230 | mysqlcheck</command>, <command>
|
---|
231 | mysqld</command>, <command>
|
---|
232 | mysqld_multi</command>, <command>
|
---|
233 | mysqld_safe</command>, <command>
|
---|
234 | mysqldump</command>, <command>
|
---|
235 | mysqldumpslow</command>, <command>
|
---|
236 | mysqlhotcopy</command>, <command>
|
---|
237 | mysqlimport</command>, <command>
|
---|
238 | mysqlmanager</command>, <command>
|
---|
239 | mysqlmanager-pwgen</command>, <command>
|
---|
240 | mysqlmanagerc</command>, <command>
|
---|
241 | mysqlshow</command>, <command>
|
---|
242 | mysqltest</command>, <command>
|
---|
243 | pack_isam</command>, <command>
|
---|
244 | perror</command>, <command>
|
---|
245 | replace</command>, <command>
|
---|
246 | resolve_stack_dump</command>, <command>
|
---|
247 | resolveip</command>, <filename class="libraryfile">
|
---|
248 | libdbug</filename>, <filename class="libraryfile">
|
---|
249 | libheap</filename>, <filename class="libraryfile">
|
---|
250 | libmerge</filename>, <filename class="libraryfile">
|
---|
251 | libmyisam</filename>, <filename class="libraryfile">
|
---|
252 | libmyisammrg</filename>, <filename class="libraryfile">
|
---|
253 | libmysqlclient</filename>, <filename class="libraryfile">
|
---|
254 | libmysqlclient_r</filename>, <filename class="libraryfile">
|
---|
255 | libmystrings</filename>, <filename class="libraryfile">
|
---|
256 | libmysys</filename>, <filename class="libraryfile">
|
---|
257 | libnisam</filename> and <filename class="libraryfile">
|
---|
258 | libvio</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
|
---|
266 | details instead.</para>
|
---|
267 |
|
---|
268 | <para>Certain <application>My<acronym>SQL</acronym></application> support
|
---|
269 | programs may require the <application>Perl</application> DBI modules to be
|
---|
270 | installed to function properly.</para>
|
---|
271 |
|
---|
272 | </sect2>
|
---|
273 |
|
---|
274 | </sect1>
|
---|