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