User Tools

Site Tools


build:mysql

This is an old revision of the document!


MySQL

These instructions are for MySQL 4.0 on our Debian 3.1 (RC) system.

Installation

Install the MySQL packages:

# apt-get install mysql-common mysql-client mysql-server

Answer YES when prompted to start MySQL at boot.

Password

NOTE: In the following instructions, replace $MYSQL_ROOT with the actual password.

Set the password for MySQL root user:

# /usr/bin/mysqladmin -u root password '$MYSQL_ROOT'

Create the MySQL configuration file, and make sure nobody else can read it:

# touch ~/.my.cnf
# chmod 0600 ~/.my.cnf

Edit the file to set the password when using various client programs:

[mysql]
user     = 'root'
password = '$MYSQL_ROOT'

[mysqladmin]
user     = 'root'
password = '$MYSQL_ROOT'

Notes

I wanted to install mysql-doc package too, but it doesn't seem to exist in Sarge.

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/README.Debian for more information.

TODO

Not sure if we need to set a password on the "debian-sys-maint" account, or anything else like that. The Debian docs don't say anything about it, so I suppose we're OK.

Could probably use some tuning and routine maintenance.

Backups.

Credits

Initially installed, configured, and documented by Craig Buchek, 2005-02-23.

build/mysql.1109825200.txt.gz · Last modified: 2005/09/10 14:48 (external edit)