Changeset 22c7fe6
- Timestamp:
- 05/16/2005 07:19:07 PM (19 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 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
- Children:
- e49a7cfd
- Parents:
- b742c85
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/databases/mysql.xml
rb742c85 r22c7fe6 7 7 <!ENTITY mysql-download-http "http://mysql.he.net/Downloads/MySQL-4.1/mysql-&mysql-version;.tar.gz"> 8 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 "0b99001b07cad53f161ec629a6bb24ea">9 <!ENTITY mysql-md5sum "0b99001b07cad53f161ec629a6bb24ea"> 10 10 <!ENTITY mysql-size "22 MB"> 11 11 <!ENTITY mysql-buildsize "207 MB"> … … 14 14 15 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 <indexterm zone="mysql"> 23 <primary sortas="a-MySQL">MySQL</primary></indexterm> 24 25 <sect2> 26 <title>Introduction to <application>My<acronym>SQL</acronym></application> 27 </title> 28 29 <para><application>My<acronym>SQL</acronym></application> is a widely used and 30 fast <acronym>SQL</acronym> database server. It is a client/server 31 implementation that consists of a server daemon and many different 32 client programs and libraries.</para> 33 34 <sect3><title>Package information</title> 35 <itemizedlist spacing='compact'> 36 <listitem><para>Download (HTTP): 37 <ulink url="&mysql-download-http;"/></para></listitem> 38 <listitem><para>Download (FTP): 39 <ulink url="&mysql-download-ftp;"/></para></listitem> 40 <listitem><para>Download MD5 sum: &mysql-md5;</para></listitem> 41 <listitem><para>Download size: &mysql-size;</para></listitem> 42 <listitem><para>Estimated disk space required: 43 &mysql-buildsize;</para></listitem> 44 <listitem><para>Estimated build time: 45 &mysql-time;</para></listitem></itemizedlist> 46 </sect3> 47 48 <sect3><title><application>My<acronym>SQL</acronym></application> dependencies 49 </title> 50 <sect4><title>Optional</title> 51 <para><xref linkend="openssl"/>, 52 <xref linkend="tcpwrappers"/>, 53 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink> 54 (as an alternative to readline), 55 <xref linkend="ORBit"/> (detected only if <xref linkend="which"/> is 56 installed), 57 <xref linkend="doxygen"/> and 58 <xref linkend="tex"/></para> 59 </sect4> 60 </sect3> 61 62 </sect2> 63 64 <sect2> 65 <title>Installation of <application>My<acronym>SQL</acronym></application> 66 </title> 67 68 <para>For security reasons, running the server as an unprivileged user 69 and group is strongly encouraged:</para> 70 71 <screen><userinput><command>groupadd mysql && 72 useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false mysql</command></userinput></screen> 73 74 <para>Build and install <application>My<acronym>SQL</acronym></application> by 75 running the following commands:</para> 76 77 <screen><userinput><command>CPPFLAGS="-D_GNU_SOURCE" ./configure --prefix=/usr --sysconfdir=/etc \ 16 <?dbhtml filename="mysql.html"?> 17 18 <sect1info> 19 <othername>$LastChangedBy$</othername> 20 <date>$Date$</date> 21 </sect1info> 22 23 <title>MySQL-&mysql-version;</title> 24 25 <indexterm zone="mysql"> 26 <primary sortas="a-MySQL">MySQL</primary> 27 </indexterm> 28 29 <sect2 role="package"> 30 <title>Introduction to MySQL</title> 31 32 <para><application>MySQL</application> is a widely used and fast SQL 33 database server. It is a client/server implementation that consists of a 34 server daemon and many different client programs and libraries.</para> 35 36 <bridgehead renderas="sect3">Package Information</bridgehead> 37 <itemizedlist spacing="compact"> 38 <listitem> 39 <para>Download (HTTP): <ulink url="&mysql-download-http;"/></para> 40 </listitem> 41 <listitem> 42 <para>Download (FTP): <ulink url="&mysql-download-ftp;"/></para> 43 </listitem> 44 <listitem> 45 <para>Download MD5 sum: &mysql-md5sum;</para> 46 </listitem> 47 <listitem> 48 <para>Download size: &mysql-size;</para> 49 </listitem> 50 <listitem> 51 <para>Estimated disk space required: &mysql-buildsize;</para> 52 </listitem> 53 <listitem> 54 <para>Estimated build time: &mysql-time;</para> 55 </listitem> 56 </itemizedlist> 57 58 <bridgehead renderas="sect3">TEMPLATE Dependencies</bridgehead> 59 60 <bridgehead renderas="sect4">Optional</bridgehead> 61 <para><xref linkend="openssl"/>, 62 <xref linkend="tcpwrappers"/>, 63 <ulink url="http://sourceforge.net/projects/libedit/">libedit</ulink> 64 (as an alternative to readline), 65 <xref linkend="ORBit"/> (detected only if <xref linkend="which"/> is 66 installed), 67 <xref linkend="doxygen"/> and 68 <xref linkend="tex"/></para> 69 70 </sect2> 71 72 <sect2 role="installation"> 73 <title>Installation of MySQL</title> 74 75 <para>For security reasons, running the server as an unprivileged user 76 and group is strongly encouraged:</para> 77 78 <screen role="root"><userinput>groupadd mysql && 79 useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false mysql</userinput></screen> 80 81 <para>Build and install <application>MySQL</application> by 82 running the following commands:</para> 83 84 <screen><userinput>CPPFLAGS="-D_GNU_SOURCE" ./configure --prefix=/usr --sysconfdir=/etc \ 78 85 --libexecdir=/usr/sbin --localstatedir=/srv/mysql \ 79 86 --enable-thread-safe-client --enable-assembler \ … … 81 88 --with-unix-socket-path=/var/run/mysql/mysql.sock \ 82 89 --without-debug --without-bench --without-readline && 83 make testdir=/usr/lib/mysql/mysql-test</ command></userinput></screen>84 85 <para>To test the results, issue: <command>make test</command>.</para>86 87 <para>Now, as the rootuser:</para>88 89 <screen ><userinput role='root'><command>make testdir=/usr/lib/mysql/mysql-test install &&90 make testdir=/usr/lib/mysql/mysql-test</userinput></screen> 91 92 <para>To test the results, issue: <command>make test</command>.</para> 93 94 <para>Now, as the <systemitem class="username">root</systemitem> user:</para> 95 96 <screen role="root"><userinput>make testdir=/usr/lib/mysql/mysql-test install && 90 97 install -v -d -m755 /usr/share/mysql/Docs/Images && 91 98 install -v -m644 Docs/manual{,_toc}.html \ … … 93 100 install -v -m644 Docs/Images/*.{jpg,gif} /usr/share/mysql/Docs/Images && 94 101 cd /usr/lib && 95 ln -v -sf mysql/libmysqlclient{,_r}.so* .</command></userinput></screen> 96 97 </sect2> 98 99 <sect2> 100 <title>Command explanations</title> 101 102 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs the 103 <command>mysqld</command> daemon in an appropriate location.</para> 104 105 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch forces 106 <application>My<acronym>SQL</acronym></application> to use 107 <filename class='directory'>/srv/mysql</filename> for database files and other 108 variable data.</para> 109 110 <para><parameter>--enable-thread-safe-client</parameter>: This switch compiles a 111 thread-safe <application>My<acronym>SQL</acronym></application> client library. 112 </para> 113 114 <para><parameter>--enable-assembler</parameter>: This switch allows using 115 assembler versions of some string functions.</para> 116 117 <para><parameter>--enable-local-infile</parameter>: This switch enables the 118 LOAD DATA INFILE <acronym>SQL</acronym> statement.</para> 119 120 <para><parameter>CPPFLAGS="-D_GNU_SOURCE" 121 --with-named-thread-libs=-lpthread</parameter>: This environment variable and 122 configure switch enable building on <acronym>NPTL</acronym> systems.</para> 123 124 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>: 125 This switch puts the unix-domain socket into <filename 126 class="directory">/var/run/mysql</filename> directory instead of default 127 <filename class="directory">/tmp</filename>.</para> 128 129 <para><parameter>--without-bench</parameter>: This switch skips building the 130 benchmark suite.</para> 131 132 <para><parameter>--without-readline</parameter>: This switch forces the build 133 to use the system copy of <application>readline</application> instead of the 134 bundled copy.</para> 135 136 <para><command>make testdir=...</command>: This installs the test suite in 137 <filename class='directory'>/usr/lib/mysql/mysql-test</filename>. 138 <acronym>BLFS</acronym> is currently seeking a method to omit the installation 139 of the test suite altogether.</para> 140 141 <para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This command 142 makes the <application>My<acronym>SQL</acronym></application> shared libraries 143 available to other packages at run-time.</para> 144 145 <para><option>--with-libwrap</option>: This switch adds tcpwrappers 146 support to <application>My<acronym>SQL</acronym></application>.</para> 147 148 <para><option>--with-openssl</option>: This switch adds OpenSSL support 149 to <application>My<acronym>SQL</acronym></application>.</para> 150 151 </sect2> 152 153 <sect2> 154 <title>Configuring <application>My<acronym>SQL</acronym></application></title> 155 156 <sect3 id="mysql-config"> 157 <title>Config files</title> 158 159 <para><filename>/etc/my.cnf</filename>, <filename>~/.my.cnf</filename></para> 160 <indexterm zone="mysql mysql-config"> 161 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary></indexterm> 162 <indexterm zone="mysql mysql-config"> 163 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary></indexterm> 164 165 </sect3> 166 167 <sect3> 168 <title>Configuration Information</title> 169 170 <para>There are several default configuration files available in 171 <filename class="directory">/usr/share/mysql</filename> which you can 172 use. Create <filename>/etc/my.cnf</filename> using the following 173 command as the root user:</para> 174 175 <screen><userinput role='root'><command>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</command></userinput></screen> 176 177 <para>You can now install a database and change the ownership to the 178 unprivileged user and group (perform as the root user):</para> 179 180 <screen><userinput role='root'><command>mysql_install_db --user=mysql && 181 chgrp -v mysql /srv/mysql{,/test,/mysql}</command></userinput></screen> 182 183 <para>Further configuration requires that the 184 <application>My<acronym>SQL</acronym></application> server be running. Start 185 the server using the following commands as the root user:</para> 186 187 <screen><userinput role='root'><command>install -v -m750 -o mysql -g mysql -d /var/run/mysql && 188 mysqld_safe --user=mysql 2>&1 >/dev/null &</command></userinput></screen> 189 190 <para>A default installation does not setup a password for the administrator, 191 so use the following command as the root user to set one. Replace 192 <replaceable>[new-password]</replaceable> with your own.</para> 193 194 <screen><userinput role='root'><command>mysqladmin -u root password <replaceable>[new-password]</replaceable></command></userinput></screen> 195 196 <para>Configuration of the server is now finished. Shut the server down 197 using the following command as the root user:</para> 198 199 <screen><userinput role='root'><command>mysqladmin -p shutdown</command></userinput></screen> 200 201 <para id="mysql-init">Install the <filename>/etc/rc.d/init.d/mysql</filename> 202 init script included in the <xref linkend="intro-important-bootscripts"/> 203 package as the root user to start the <application>MySQL</application> server 204 during system boot-up.</para> 205 <indexterm zone="mysql mysql-init"> 206 <primary sortas="f-mysql">mysql</primary></indexterm> 207 208 <screen><userinput role='root'><command>make install-mysql</command></userinput></screen> 209 210 </sect3> 211 212 </sect2> 213 214 <sect2> 215 <title>Contents</title> 216 217 <segmentedlist> 218 <segtitle>Installed Programs</segtitle> 219 <segtitle>Installed Libraries</segtitle> 220 <segtitle>Installed Directories</segtitle> 221 222 <seglistitem> 223 <seg>comp_err, isamchk, isamlog, make_win_binary_distribution, 224 make_win_src_distribution, msql2mysql, my_print_defaults, myisam_ftdump, 225 myisamchk, myisamlog, myisampack, mysql, mysql_client_test, mysql_config, 226 mysql_convert_table_format, mysql_create_system_tables, mysql_explain_log, 227 mysql_find_rows, mysql_fix_extensions, mysql_fix_privilege_tables, 228 mysql_install_db, mysql_secure_installation, mysql_setpermission, 229 mysql_tableinfo, mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess, 230 mysqladmin, mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi, 231 mysqld_safe, mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport, 232 mysqlmanager, mysqlmanager-pwgen, mysqlmanagerc, mysqlshow, mysqltest, 233 pack_isam, perror, replace, resolve_stack_dump and resolveip</seg> 234 <seg>libdbug.a, libheap.a, libmerge.a, libmyisam.a, libmyisammrg.a, 235 libmysqlclient.[so,a], libmysqlclient_r.[so,a], libmystrings.a, libmysys.a, 236 libnisam.a and libvio.a</seg> 237 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql and 238 /var/run/mysql</seg> 239 </seglistitem> 240 </segmentedlist> 241 242 <sect3><title>Short description</title> 243 <para>Descriptions of all the programs and libraries would be several pages 244 long. Instead, consult the <application>My<acronym>SQL</acronym></application> 245 documentation for full details.</para> 246 247 <para>Certain <application>My<acronym>SQL</acronym></application> support 248 programs may require the <application>Perl</application> DBI modules to be 249 installed to function properly.</para> 250 </sect3> 251 252 </sect2> 102 ln -v -sf mysql/libmysqlclient{,_r}.so* .</userinput></screen> 103 104 </sect2> 105 106 <sect2 role="commands"> 107 <title>Command Explanations</title> 108 109 <para><parameter>--libexecdir=/usr/sbin</parameter>: This switch installs 110 the <command>mysqld</command> daemon in an appropriate location.</para> 111 112 <para><parameter>--localstatedir=/srv/mysql</parameter>: This switch 113 forces <application>MySQL</application> to use 114 <filename class='directory'>/srv/mysql</filename> for database files and 115 other variable data.</para> 116 117 <para><parameter>--enable-thread-safe-client</parameter>: This 118 switch compiles a thread-safe <application>MySQL</application> client 119 library.</para> 120 121 <para><parameter>--enable-assembler</parameter>: This switch allows using 122 assembler versions of some string functions.</para> 123 124 <para><parameter>--enable-local-infile</parameter>: This switch enables 125 the <quote>LOAD DATA INFILE</quote> SQL statement.</para> 126 127 <para><parameter>CPPFLAGS="-D_GNU_SOURCE" 128 --with-named-thread-libs=-lpthread</parameter>: This environment variable 129 and configure switch enable building on NPTL systems.</para> 130 131 <para><parameter>--with-unix-socket-path=/var/run/mysql</parameter>: 132 This switch puts the unix-domain socket into <filename 133 class="directory">/var/run/mysql</filename> directory instead of default 134 <filename class="directory">/tmp</filename>.</para> 135 136 <para><parameter>--without-bench</parameter>: This switch skips building 137 the benchmark suite.</para> 138 139 <para><parameter>--without-readline</parameter>: This switch forces the 140 build to use the system copy of <application>readline</application> instead 141 of the bundled copy.</para> 142 143 <para><command>make testdir=...</command>: This installs the test suite in 144 <filename class='directory'>/usr/lib/mysql/mysql-test</filename>. 145 BLFS is currently seeking a method to omit the installation 146 of the test suite altogether.</para> 147 148 <para><command>ln -sf mysql/libmysqlclient{,_r}.so* .</command>: This 149 command makes the <application>MySQL</application> shared libraries 150 available to other packages at run-time.</para> 151 152 <para><option>--with-libwrap</option>: This switch adds tcpwrappers 153 support to <application>MySQL</application>.</para> 154 155 <para><option>--with-openssl</option>: This switch adds OpenSSL support 156 to <application>MySQL</application>.</para> 157 158 </sect2> 159 160 <sect2 role="configuration"> 161 <title>Configuring MySQL</title> 162 163 <sect3 id="mysql-config"> 164 <title>Config Files</title> 165 166 <para><filename>/etc/my.cnf</filename> and 167 <filename>~/.my.cnf</filename></para> 168 169 <indexterm zone="mysql mysql-config"> 170 <primary sortas="e-AA.my.cnf">~/.my.cnf</primary> 171 </indexterm> 172 173 <indexterm zone="mysql mysql-config"> 174 <primary sortas="e-etc-my.cnf">/etc/my.cnf</primary> 175 </indexterm> 176 177 </sect3> 178 179 <sect3> 180 <title>Configuration Information</title> 181 182 <para>There are several default configuration files available in 183 <filename class="directory">/usr/share/mysql</filename> which you can 184 use. Create <filename>/etc/my.cnf</filename> using the following command 185 as the <systemitem class="username">root</systemitem> user:</para> 186 187 <screen role="root"><userinput>install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf</userinput></screen> 188 189 <para>You can now install a database and change the ownership to the 190 unprivileged user and group (perform as the <systemitem 191 class="username">root</systemitem> user):</para> 192 193 <screen role="root"><userinput>mysql_install_db --user=mysql && 194 chgrp -v mysql /srv/mysql{,/test,/mysql}</userinput></screen> 195 196 <para>Further configuration requires that the 197 <application>MySQL</application> server be running. Start 198 the server using the following commands as the <systemitem 199 class="username">root</systemitem> user:</para> 200 201 <screen role="root"><userinput>install -v -m750 -o mysql -g mysql -d /var/run/mysql && 202 mysqld_safe --user=mysql 2>&1 >/dev/null &</userinput></screen> 203 204 <para>A default installation does not setup a password for the 205 administrator, so use the following command as the <systemitem 206 class="username">root</systemitem> user to set one. Replace 207 <replaceable>[new-password]</replaceable> with your own.</para> 208 209 <screen role="root"><userinput>mysqladmin -u root password <replaceable>[new-password]</replaceable></userinput></screen> 210 211 <para>Configuration of the server is now finished. Shut the server 212 down using the following command as the <systemitem 213 class="username">root</systemitem> user:</para> 214 215 <screen role="root"><userinput>mysqladmin -p shutdown</userinput></screen> 216 217 </sect3> 218 219 <sect3 id="mysql-init"> 220 <title>Boot Script</title> 221 222 <para>Install the <filename>/etc/rc.d/init.d/mysql</filename> init script 223 included in the <xref linkend="intro-important-bootscripts"/> package as 224 the <systemitem class="username">root</systemitem> user to start the 225 <application>MySQL</application> server during system boot-up.</para> 226 227 <indexterm zone="mysql mysql-init"> 228 <primary sortas="f-mysql">mysql</primary> 229 </indexterm> 230 231 <screen role="root"><userinput>make install-mysql</userinput></screen> 232 233 </sect3> 234 235 </sect2> 236 237 <sect2 role="content"> 238 <title>Contents</title> 239 240 <segmentedlist> 241 <segtitle>Installed Programs</segtitle> 242 <segtitle>Installed Libraries</segtitle> 243 <segtitle>Installed Directories</segtitle> 244 245 <seglistitem> 246 <seg>comp_err, isamchk, isamlog, make_win_binary_distribution, 247 make_win_src_distribution, msql2mysql, my_print_defaults, myisam_ftdump, 248 myisamchk, myisamlog, myisampack, mysql, mysql_client_test, mysql_config, 249 mysql_convert_table_format, mysql_create_system_tables, mysql_explain_log, 250 mysql_find_rows, mysql_fix_extensions, mysql_fix_privilege_tables, 251 mysql_install_db, mysql_secure_installation, mysql_setpermission, 252 mysql_tableinfo, mysql_tzinfo_to_sql, mysql_waitpid, mysql_zap, mysqlaccess, 253 mysqladmin, mysqlbinlog, mysqlbug, mysqlcheck, mysqld, mysqld_multi, 254 mysqld_safe, mysqldump, mysqldumpslow, mysqlhotcopy, mysqlimport, 255 mysqlmanager, mysqlmanager-pwgen, mysqlmanagerc, mysqlshow, mysqltest, 256 pack_isam, perror, replace, resolve_stack_dump, and resolveip</seg> 257 <seg>libdbug.a, libheap.a, libmerge.a, libmyisam.a, libmyisammrg.a, 258 libmysqlclient.[so,a], libmysqlclient_r.[so,a], libmystrings.a, libmysys.a, 259 libnisam.a, and libvio.a</seg> 260 <seg>/srv/mysql, /usr/include/mysql, /usr/lib/mysql, /usr/share/mysql, and 261 /var/run/mysql</seg> 262 </seglistitem> 263 </segmentedlist> 264 265 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 266 267 <para>Descriptions of all the programs and libraries would be several 268 pages long. Instead, consult the <application>MySQL</application> 269 documentation for full details.</para> 270 271 <para>Certain <application>MySQL</application> support programs may 272 require the <application>Perl</application> DBI modules to be 273 installed to function properly.</para> 274 275 </sect2> 253 276 254 277 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.