[08254fc] | 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 |
|
---|
[c30b739] | 14 | <sect1 id="mysql" xreflabel="MySQL-&mysql-version;">
|
---|
[a0f03b0] | 15 | <sect1info>
|
---|
[5cd0959d] | 16 | <othername>$LastChangedBy$</othername>
|
---|
| 17 | <date>$Date$</date>
|
---|
[a0f03b0] | 18 | </sect1info>
|
---|
[00bb024c] | 19 | <?dbhtml filename="mysql.html"?>
|
---|
[c30b739] | 20 | <title>MySQL-&mysql-version;</title>
|
---|
[f45b1953] | 21 |
|
---|
[08254fc] | 22 | <sect2>
|
---|
[4b93ac2] | 23 | <title>Introduction to <application>My<acronym>SQL</acronym></application>
|
---|
| 24 | </title>
|
---|
[08254fc] | 25 |
|
---|
[4b93ac2] | 26 | <para><application>My<acronym>SQL</acronym></application> is a widely used and
|
---|
| 27 | fast <acronym>SQL</acronym> database server. It is a client/server
|
---|
[08254fc] | 28 | implementation that consists of a server daemon and many different
|
---|
| 29 | client 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 |
|
---|
[4b93ac2] | 40 | <sect3><title>Additional downloads</title>
|
---|
| 41 | <itemizedlist spacing='compact'>
|
---|
| 42 | <listitem><para>Required Patch (for building against NPTL): <ulink
|
---|
| 43 | url="&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>
|
---|
[08254fc] | 48 | <sect4><title>Optional</title>
|
---|
[5c89a13] | 49 | <para><xref linkend="openssl"/>, <xref linkend="tcpwrappers"/>,
|
---|
| 50 | <xref linkend="which"/> and <xref linkend="ORBit"/>
|
---|
[08254fc] | 51 | </para></sect4>
|
---|
| 52 | </sect3>
|
---|
| 53 |
|
---|
| 54 | </sect2>
|
---|
| 55 |
|
---|
| 56 | <sect2>
|
---|
[4b93ac2] | 57 | <title>Installation of <application>My<acronym>SQL</acronym></application>
|
---|
| 58 | </title>
|
---|
[08254fc] | 59 |
|
---|
| 60 | <para>For security reasons, running the server as an unprivileged user
|
---|
| 61 | and group is strongly encouraged:</para>
|
---|
| 62 |
|
---|
| 63 | <screen><userinput><command>groupadd mysql &&
|
---|
| 64 | useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql</command></userinput></screen>
|
---|
| 65 |
|
---|
[4b93ac2] | 66 | <para>Build and install <application>My<acronym>SQL</acronym></application> by
|
---|
| 67 | running the following commands:</para>
|
---|
[08254fc] | 68 |
|
---|
[4b93ac2] | 69 | <screen><userinput><command>patch -Np1 -i ../mysql-&mysql-version;-nptl-1.patch &&
|
---|
| 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 &&
|
---|
[08254fc] | 75 | make testdir=/usr/lib/mysql/mysql-test &&
|
---|
[4b93ac2] | 76 | make testdir=/usr/lib/mysql/mysql-test install &&
|
---|
| 77 | cd /usr/lib &&
|
---|
| 78 | ln -sf mysql/libmysqlclient{,_r}.so* .</command></userinput></screen>
|
---|
| 79 |
|
---|
| 80 | </sect2>
|
---|
| 81 |
|
---|
| 82 | <sect2>
|
---|
| 83 | <title>Command explanations</title>
|
---|
[08254fc] | 84 |
|
---|
[4b93ac2] | 85 | <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs the
|
---|
| 86 | <command>mysqld</command> daemon in an appropriate location.</para>
|
---|
[08254fc] | 87 |
|
---|
[4b93ac2] | 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
|
---|
| 91 | variable data.</para>
|
---|
| 92 |
|
---|
| 93 | <para><parameter>--enable-thread-safe-client</parameter>: This switch compiles a
|
---|
| 94 | thread-safe <application>My<acronym>SQL</acronym></application> client library.
|
---|
| 95 | </para>
|
---|
| 96 |
|
---|
| 97 | <para><parameter>--enable-assembler</parameter>: This switch allows using
|
---|
| 98 | assembler versions of some string functions.</para>
|
---|
| 99 |
|
---|
| 100 | <para><parameter>--without-readline</parameter>: This switch forces the build
|
---|
| 101 | to use the system copy of <application>readline</application> instead of the
|
---|
| 102 | bundled copy.</para>
|
---|
| 103 |
|
---|
| 104 | <para><option>--enable-local-infile</option>: This switch enables the
|
---|
| 105 | LOAD DATA INFILE <acronym>SQL</acronym> statement.</para>
|
---|
| 106 |
|
---|
| 107 | <para><option>--without-bench</option>: This switch skips building the
|
---|
| 108 | benchmark 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
|
---|
| 113 | of the test suite altogether.</para>
|
---|
| 114 |
|
---|
| 115 | <para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This commands
|
---|
| 116 | makes the <application>My<acronym>SQL</acronym></application> shared libraries
|
---|
| 117 | available to other packages at run-time.</para>
|
---|
[08254fc] | 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
|
---|
| 136 | use. Create <filename>/etc/my.cnf</filename> using the following
|
---|
| 137 | command:</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
|
---|
| 142 | unprivileged user and group.</para>
|
---|
| 143 |
|
---|
| 144 | <screen><userinput><command>mysql_install_db &&
|
---|
[4b93ac2] | 145 | chown -R mysql:mysql /srv/mysql</command></userinput></screen>
|
---|
[08254fc] | 146 |
|
---|
[4b93ac2] | 147 | <para>Further configuration requires that the
|
---|
| 148 | <application>My<acronym>SQL</acronym></application> server be running:</para>
|
---|
[08254fc] | 149 |
|
---|
| 150 | <screen><userinput><command>mysqld_safe --user=mysql 2>&1 >/dev/null &</command></userinput></screen>
|
---|
| 151 |
|
---|
[4b93ac2] | 152 | <para>A default installation does not setup a password for the administrator,
|
---|
| 153 | so use the following command to set one. Replace
|
---|
| 154 | <replaceable>[new-password]</replaceable> with your own.</para>
|
---|
[08254fc] | 155 |
|
---|
[15f5d9f] | 156 | <!--
|
---|
[08254fc] | 157 | <screen><userinput><command>mysql -uroot mysql</command></userinput>
|
---|
| 158 | Welcome to the MySQL monitor. Commands end with ; or \g.
|
---|
| 159 | Your MySQL connection id is 2 to server version: 3.23.51-log
|
---|
| 160 |
|
---|
| 161 | Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
|
---|
| 162 |
|
---|
| 163 | <prompt>mysql></prompt> <userinput><command>UPDATE user SET password=password('<replaceable>new-password</replaceable>') WHERE user='root';</command></userinput>
|
---|
| 164 | Query OK, 2 rows affected (0.00 sec)
|
---|
| 165 | Rows matched: 2 Changed: 2 Warnings: 0
|
---|
| 166 |
|
---|
| 167 | <prompt>mysql></prompt> <userinput><command>FLUSH PRIVILEGES;</command></userinput>
|
---|
| 168 | Query OK, 0 rows affected (0.00 sec)
|
---|
| 169 |
|
---|
| 170 | <prompt>mysql></prompt> <userinput><command>EXIT;</command></userinput>
|
---|
| 171 | bye
|
---|
| 172 | </screen>
|
---|
[15f5d9f] | 173 | -->
|
---|
[08254fc] | 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
|
---|
| 178 | using 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>
|
---|
[4b93ac2] | 183 | init script included in the <xref linkend="intro-important-bootscripts"/>
|
---|
| 184 | package.</para>
|
---|
| 185 |
|
---|
[08254fc] | 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>
|
---|
| 196 | comp_err</command>, <command>
|
---|
| 197 | isamchk</command>, <command>
|
---|
| 198 | isamlog</command>, <command>
|
---|
[4b93ac2] | 199 | make_win_binary_distribution</command>, <command>
|
---|
[08254fc] | 200 | make_win_src_distribution</command>, <command>
|
---|
| 201 | msql2mysql</command>, <command>
|
---|
| 202 | my_print_defaults</command>, <command>
|
---|
[4b93ac2] | 203 | myisam_ftdump</command>, <command>
|
---|
[08254fc] | 204 | myisamchk</command>, <command>
|
---|
| 205 | myisamlog</command>, <command>
|
---|
| 206 | myisampack</command>, <command>
|
---|
| 207 | mysql</command>, <command>
|
---|
| 208 | mysql_config</command>, <command>
|
---|
| 209 | mysql_convert_table_format</command>, <command>
|
---|
| 210 | mysql_explain_log</command>, <command>
|
---|
| 211 | mysql_find_rows</command>, <command>
|
---|
| 212 | mysql_fix_extensions</command>, <command>
|
---|
| 213 | mysql_fix_privilege_tables</command>, <command>
|
---|
| 214 | mysql_install</command>, <command>
|
---|
| 215 | mysql_install_db</command>, <command>
|
---|
| 216 | mysql_secure_installation</command>, <command>
|
---|
| 217 | mysql_setpermission</command>, <command>
|
---|
| 218 | mysql_tableinfo</command>, <command>
|
---|
| 219 | mysql_waitpid</command>, <command>
|
---|
| 220 | mysql_zap</command>, <command>
|
---|
| 221 | mysqlacess</command>,<command>
|
---|
| 222 | mysqladmin</command>, <command>
|
---|
| 223 | mysqlbinlog</command>, <command>
|
---|
| 224 | mysqlbug</command>, <command>
|
---|
| 225 | mysqlcheck</command>, <command>
|
---|
| 226 | mysqld</command>, <command>
|
---|
| 227 | mysqld_multi</command>, <command>
|
---|
| 228 | mysqld_safe</command>, <command>
|
---|
| 229 | mysqldump</command>, <command>
|
---|
| 230 | mysqldumpslow</command>, <command>
|
---|
| 231 | mysqlhotcopy</command>, <command>
|
---|
| 232 | mysqlimport</command>, <command>
|
---|
| 233 | mysqlmanager</command>, <command>
|
---|
| 234 | mysqlmanager-pwgen</command>, <command>
|
---|
| 235 | mysqlmanagerc</command>, <command>
|
---|
| 236 | mysqlshow</command>, <command>
|
---|
| 237 | mysqltest</command>, <command>
|
---|
| 238 | pack_isam</command>, <command>
|
---|
| 239 | perror</command>, <command>
|
---|
| 240 | replace</command>, <command>
|
---|
| 241 | resolve_stack_dump</command>, <command>
|
---|
| 242 | resolveip</command>, <filename class="libraryfile">
|
---|
| 243 | libdbug</filename>, <filename class="libraryfile">
|
---|
| 244 | libheap</filename>, <filename class="libraryfile">
|
---|
| 245 | libmerge</filename>, <filename class="libraryfile">
|
---|
| 246 | libmyisam</filename>, <filename class="libraryfile">
|
---|
| 247 | libmyisammrg</filename>, <filename class="libraryfile">
|
---|
| 248 | libmysqlclient</filename>, <filename class="libraryfile">
|
---|
[4b93ac2] | 249 | libmysqlclient_r</filename>, <filename class="libraryfile">
|
---|
[08254fc] | 250 | libmystrings</filename>, <filename class="libraryfile">
|
---|
| 251 | libmysys</filename>, <filename class="libraryfile">
|
---|
| 252 | libnisam</filename> and <filename class="libraryfile">
|
---|
| 253 | libvio</filename>.</para>
|
---|
| 254 |
|
---|
| 255 | </sect2>
|
---|
| 256 |
|
---|
| 257 | <sect2><title>Description</title>
|
---|
| 258 |
|
---|
[4b93ac2] | 259 | <para>A package listing would be several pages long. Consult the
|
---|
| 260 | <application>My<acronym>SQL</acronym></application> documentation for full
|
---|
| 261 | details instead.</para>
|
---|
[08254fc] | 262 |
|
---|
[4b93ac2] | 263 | <para>Certain <application>My<acronym>SQL</acronym></application> support
|
---|
| 264 | programs may require the <application>Perl</application> DBI modules to be
|
---|
| 265 | installed to function properly.</para>
|
---|
[08254fc] | 266 |
|
---|
| 267 | </sect2>
|
---|
[f45b1953] | 268 |
|
---|
| 269 | </sect1>
|
---|