====== MySQL ====== These instructions are for MySQL 5.0 on our Debian 4.0 system. ===== Installation ===== Install MySQL along with its pre-requisites: apt-get install mysql-common mysql-client mysql-server NOTE: The MySQL documentation is non-free, and not included with Debian. Use the [[http://dev.mysql.com/doc/ | online documentation]] provided at MySQL's site. ===== Password ===== NOTE: In the following instructions, replace $MYSQL_ROOT with the actual password. Set the password for MySQL root user. (If this doesn't work, rename your ''.my.cnf'' file temporarily and try again). export MYSQL_ROOT=$MYSQL_ROOT mysqladmin -u root password "$MYSQL_ROOT" Create root's MySQL configuration file, and make sure nobody else can read it: touch /root/.my.cnf chmod 0600 /root/.my.cnf Edit the ''/root/.my.cnf'' file to set the password when using various client programs: [mysql] user = 'root' password = '$MYSQL_ROOT' # THIS IS NOT THE REAL PASSWORD; DO NOT CUT AND PASTE THIS! [mysqladmin] user = 'root' password = '$MYSQL_ROOT' # THIS IS NOT THE REAL PASSWORD; DO NOT CUT AND PASTE THIS! ===== Notes ===== I wanted to install mysql-doc package too, but it doesn't seem to exist even in the non-free section. This appears to be due to the MySQL corporation's licensing. The Debian installation creates a MySQL user named "debian-sys-maint". This MySQL account is used in the start/stop and cron scripts. Don't delete it. See ''/usr/share/doc/mysql-server-5.0/README.Debian.gz'' for more information. ===== TODO ===== Could probably use some tuning and routine maintenance. Backups. ===== Credits ===== Initially installed, configured, and documented by Craig Buchek, 2005-02-23. Installed version 5.0 on 2007-06-08, Craig Buchek.