diff --git a/appendices/symlinks/rc0.xml b/appendices/symlinks/rc0.xml index 5ba4eb5a1a..a7065ccf08 100644 --- a/appendices/symlinks/rc0.xml +++ b/appendices/symlinks/rc0.xml @@ -34,6 +34,13 @@ Shut down Postfix MTA: + +K26 +mysql +../init.d/mysql +Shut down MySQL Daeomon: + + K30 sshd diff --git a/appendices/symlinks/rc1.xml b/appendices/symlinks/rc1.xml index a206ca5e1c..65a8bb08ef 100644 --- a/appendices/symlinks/rc1.xml +++ b/appendices/symlinks/rc1.xml @@ -34,6 +34,13 @@ Shut down Postfix MTA: + +K26 +mysql +../init.d/mysql +Shut down MySQL Daemon: + + K30 sshd diff --git a/appendices/symlinks/rc2.xml b/appendices/symlinks/rc2.xml index 9ae2f62f93..ad50e539d3 100644 --- a/appendices/symlinks/rc2.xml +++ b/appendices/symlinks/rc2.xml @@ -34,6 +34,13 @@ Shut down Postfix MTA: + +K26 +mysql +../init.d/mysql +Shut down MySQL Daemon: + + K30 sshd diff --git a/appendices/symlinks/rc3.xml b/appendices/symlinks/rc3.xml index 3b8958f161..1ee9577d5c 100644 --- a/appendices/symlinks/rc3.xml +++ b/appendices/symlinks/rc3.xml @@ -48,6 +48,13 @@ Start Secure Shell Daemon: + +S34 +mysql +../init.d/mysql +Start MySQL Daemon: + + S35 postfix diff --git a/appendices/symlinks/rc4.xml b/appendices/symlinks/rc4.xml index be48e23e88..0ca4298a07 100644 --- a/appendices/symlinks/rc4.xml +++ b/appendices/symlinks/rc4.xml @@ -48,6 +48,13 @@ Start Secure Shell Daemon: + +S34 +mysql +../init.d/mysql +Start MySQL Daemon: + + S35 postfix diff --git a/appendices/symlinks/rc5.xml b/appendices/symlinks/rc5.xml index 9db9f1d1af..96a864e701 100644 --- a/appendices/symlinks/rc5.xml +++ b/appendices/symlinks/rc5.xml @@ -48,6 +48,13 @@ Start Secure Shell Daemon: + +S34 +mysql +../init.d/mysql +Start MySQL Daemon: + + S35 postfix diff --git a/appendices/symlinks/rc6.xml b/appendices/symlinks/rc6.xml index 8814f55fd9..19da4dce93 100644 --- a/appendices/symlinks/rc6.xml +++ b/appendices/symlinks/rc6.xml @@ -34,6 +34,13 @@ Shut down Postfix MTA: + +K26 +mysql +../init.d/mysql +Shut down MySQL Daemon: + + K30 sshd diff --git a/content/databases/mysql.xml b/content/databases/mysql.xml index b4341ba461..2d2efb947a 100644 --- a/content/databases/mysql.xml +++ b/content/databases/mysql.xml @@ -1,8 +1,11 @@ - + -mysql +MySQL-&mysql-version; -TO BE DONE +&mysql-intro; +&mysql-inst; +&mysql-exp; +&mysql-config; +&mysql-desc; - diff --git a/content/databases/mysql/mysql-config.xml b/content/databases/mysql/mysql-config.xml new file mode 100644 index 0000000000..3c05a24296 --- /dev/null +++ b/content/databases/mysql/mysql-config.xml @@ -0,0 +1,121 @@ + +Configuring mysql + + +Config files + +/etc/my.cnf, ~/.my.cnf + + + + +Configuration Information + +There are several default configurations file available in +/usr/share/mysql which you can use. + +cp /usr/share/mysql/my-medium.cnf /etc/my.cnf + +We can now install a database and change the ownership to the +unpriviledged user and group. + +mysql_install_db +chown -R mysql:mysql /var/mysql + +Further configuration requires that the mysql server be running: + +safe_mysqld 2>&1 >/dev/null & + +A default installation, does not setup a password for the administrator. +So here we will login and set one. We strongly suggest changing +'new-password' to your own. + +mysql -uroot mysql +Welcome to the MySQL monitor. Commands end with ; or \g. +Your MySQL connection id is 2 to server version: 3.23.51-log + +Type 'help;' or '\h' for help. Type '\c' to clear the buffer. + +mysql> UPDATE user SET password=password('new-password') WHERE user='root'; +Query OK, 2 rows affected (0.00 sec) +Rows matched: 2 Changed: 2 Warnings: 0 + +mysql> FLUSH PRIVILEGES; +Query OK, 0 rows affected (0.00 sec) + +mysql> EXIT; +bye + + +Now that we are done with the configuration of the server, we can +shut it down. + +kill `pidof -x safe_mysqld mysqld` + + + +mysql init.d script + +To automate the running of mysql, use the following command to create +the init.d script: + +cat > /etc/rc.d/init.d/mysql << "EOF" +#!/bin/bash +# Begin $rc_base/init.d/ + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org + +source /etc/sysconfig/rc +source $rc_functions + +case "$1" in + start) + echo "Starting MySQL daemon..." + /usr/bin/safe_mysqld 2>&1 >/dev/null & + evaluate_retval + ;; + + stop) + echo "Stopping MySQL daemon..." + killproc mysqld + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/mysqld + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/ +EOF +chmod 755 /etc/rc.d/init.d/mysql + +Create the symbolic links to this file in the relevant rc.d directory +with the following commands: + +cd /etc/rc.d/init.d && +ln -sf ../init.d/mysql ../rc0.d/K26mysql && +ln -sf ../init.d/mysql ../rc1.d/K26mysql && +ln -sf ../init.d/mysql ../rc2.d/K26mysql && +ln -sf ../init.d/mysql ../rc3.d/S34mysql && +ln -sf ../init.d/mysql ../rc4.d/S34mysql && +ln -sf ../init.d/mysql ../rc5.d/S34mysql && +ln -sf ../init.d/mysql ../rc6.d/K26mysql + + + + + + + diff --git a/content/databases/mysql/mysql-desc.xml b/content/databases/mysql/mysql-desc.xml new file mode 100644 index 0000000000..b5e870605b --- /dev/null +++ b/content/databases/mysql/mysql-desc.xml @@ -0,0 +1,14 @@ + +Contents + +The mysql package contains mysql mysqladmin mysqlcheck mysqlshow mysqldump mysqlimport mysqltest mysqlbinlog replace comp_err perror resolveip my_print_defaults resolve_stack_dump isamchk isamlog pack_isam myisamchk myisamlog myisampack safe_mysqld mysql_install_db msql2mysql mysql_config mysql_fix_privilege_tables mysql_setpermission mysql_zap mysqlacess mysqlbug mysql_convert_table_format mysql_find_rows mysqlhotcopy mysqldumbslow mysqld_multi mysqld + + + +Description + +A full package listing would be several pages long, for that reason, we suggest consulting the mysql documetation for full details, instead. + +Certain mysql support programs may require the perl DBI modules to be installed to function properly. + + diff --git a/content/databases/mysql/mysql-exp.xml b/content/databases/mysql/mysql-exp.xml new file mode 100644 index 0000000000..cc11d2e3b9 --- /dev/null +++ b/content/databases/mysql/mysql-exp.xml @@ -0,0 +1,7 @@ + +Command explanations + +sed -e "s%mysql-test/Makefile%%" -e "s% mysql-test%%" configure.old > configure: +This sed is used to disable the mysql test suite. + + diff --git a/content/databases/mysql/mysql-inst.xml b/content/databases/mysql/mysql-inst.xml new file mode 100644 index 0000000000..b9f43e5756 --- /dev/null +++ b/content/databases/mysql/mysql-inst.xml @@ -0,0 +1,23 @@ + +Installation of mysql + +For security reasons, running the server as an unpriviledged user and group is strongly encouraged: + +groupadd mysql && +useradd -c mysql -d /dev/null -g mysql -s /bin/false mysql + +Build and install mysql by running the following commands: + +cp configure configure.old && +sed -e "s%mysql-test/Makefile%%" -e "s% mysql-test%%" configure.old > configure && +./configure --prefix=/usr \ + --sysconfdir=/etc \ + --libexecdir=/usr/sbin \ + --localstatedir=/var/mysql \ + --enable-thread-safe-client \ + --without-debug \ + --without-bench && +make && +make install + + diff --git a/content/databases/mysql/mysql-intro.xml b/content/databases/mysql/mysql-intro.xml new file mode 100644 index 0000000000..dfd52cd8b4 --- /dev/null +++ b/content/databases/mysql/mysql-intro.xml @@ -0,0 +1,12 @@ + +Introduction to MySQL + +Download location (HTTP): +Download location (FTP): +Version used: &mysql-version; +Package size: &mysql-size; +Estimated Disk space required: &mysql-buildsize; + +The MySQL package contains the mysql library, server and client utilities. + + diff --git a/content/databases/mysql/mysql.ent b/content/databases/mysql/mysql.ent index de81d0aa77..0742d8589e 100644 --- a/content/databases/mysql/mysql.ent +++ b/content/databases/mysql/mysql.ent @@ -1 +1,11 @@ + + + + + + + + + + diff --git a/index.xml b/index.xml index b51e9b92b8..48ed6959b0 100644 --- a/index.xml +++ b/index.xml @@ -2,8 +2,8 @@ - + + diff --git a/introduction/welcome/changelog.xml b/introduction/welcome/changelog.xml index 89de57cab3..a633bcb05c 100644 --- a/introduction/welcome/changelog.xml +++ b/introduction/welcome/changelog.xml @@ -10,6 +10,9 @@ page in Chapter 1 for details on who wrote what. +August 15th, 2002 [highos]: Content Databases: Added +MySQL-3.23.51. + August 13th, 2002 [larry]: X: updated to qt-3.0.5.