Installing MySQL for DocDB
Install the latest available release of MySQL for your machine.
(DocDB is known to work with releases as old as MySQL 3.22.30.)
- Create an account to own the mysql database.
MySQL assumes that this account will be named "mysql",
but this is not a requirement.
- Linux
- MySQL rpms are available with the standard RedHat or
FermiRedHat installation (e.g., ftp://linux.fnal.gov/linux/711/i386/RedHat/RPMS/).
- install the appropriate rpms
- We strongly advise you to change the default
mysql username and database location.
- if you don't plan to use the default mysql username or database
location, take the following actions:
- edit /etc/my.cnf
- change ownership of /var/log/mysqld.log
- change ownership of /var/run/mysqld
- rm /var/lib/mysql (default database location)
- edit /etc/rc.d/init.d/mysqld, changing username and datadir
- chkconfig mysqld on
- as the database owner, run /usr/bin/mysql_install_db
This script uses the information in /etc/my.cnf.
- start MySQL with
"/etc/rc.d/init.d/mysqld start"
- Create a mysql root administrator account with:
mysqladmin -u root password some password
- other UNIX
- Get MySQL from http://www.mysql.com/.
We recommend downloading a pre-compiled release of MySQL.
- Edit mysql/bin/mysqlaccess to point to the appropriate bin directory.
- install Msql-Mysql-modules
- Run the mysql scripts/mysql_install_db script.
This is where you decide where the database will reside.
- copy mysql/support-files/mysql.server into
your system startup files (often /etc/init.d)
and configure it to start
mysqld automatically when the machine is booted
- start MySQL with
"cd your mysql directory; mysql/bin/safe_mysqld &" or
"/etc/rc.d/init.d/mysqld start"
- Create a mysql root administrator account with:
mysqladmin -u root password some password
Document Database