MySQL#
- MySQL
- Installation
- Backups
- mysql daemon start/stop
- Set Root Password
- Connect to mysql DB
- MySQL (cmsdb01)
- Installation
- Backups
- mysql daemon start/stop
- Connect to mysql DB
Installation#
We are currently running MySQL 5.0.18 (required by prodAgent) and 3.23.55 (required by cdsagenda).#
NOTE : The ProdAgent running in
cmsprod04
connect to this database.#
Binaries for this MySQL are installed here:#
-
/cms/sw/mysql
-
/cms/sw/mysql/5.0.18
Backups#
Backups are handled by cron jobs that dump SQL to
/cms/cmsprod/archives/${dbname}
#
mysql daemon start/stop#
(need to login as cmsprod)
[cmsprod@clove:~]$ which mysql
/afs/hep.wisc.edu/cms/sw/mysql/5.0.18/bin/mysql
[cmsprod@clove ~]$ /etc/init.d/pagent-mysql start|stop
NOTE : The same mysql version i.e. 5.0.18 is also installed in /scratch/pagent/mysql/5.0.18/ in clove and is used in the scripts for starting and stopping the mysql daemon. Although /etc/my.cnf does exist in clove, it’s not used for any practical purpose by mysqld_safe, rather the options to mysqld_safe are passed as arguments in /scratch/pagent/start_pagent_db script which is called from pagent-mysql script.#
Set Root Password#
[ajit@clove pagent]$ mysqladmin -u root -h clove.hep.wisc.edu password 'new-password'
Connect to mysql DB#
[ajit@clove pagent]$ source ./setup.sh
[ajit@clove pagent]$ mysql -h clove.hep.wisc.edu -u root -p --socket=/scratch/pagent/mysqldata/mysql.sock
(/scratch/pagent/mysqldata is the $DATA dir that contains the innodbs, mysql.pid, mysql.log etc.)
MySQL (cmsdb01)#
Installation#
We are currently running MySQL 5.0.45-cmp3 (required by prodAgent).#
NOTE : The ProdAgents running in
stevia
and cassia
connect to this database.#
Binaries for this MySQL are installed here:#
-
[cmsprod@cmsdb01:/scratch/pagent/mysql/5.0.45-cmp3]$
Backups#
Backups are handled by cron jobs that dump SQL to
/cms/cmsprod/archives/${dbname}
#
mysql daemon start/stop#
(need to login as cmsprod)
[cmsprod@cmsdb01:/scratch/pagent]$ source setup.sh
[cmsprod@cmsdb01:/scratch/pagent]$ which mysql
/scratch/pagent/mysql/5.0.45-cmp3/bin/mysql
[cmsprod@cmsdb01:/scratch/pagent]$ start_pagent_db (start)
[cmsprod@cmsdb01:/scratch/pagent]$ shutdown_pagent_db (stop)
Connect to mysql DB#
[cmsprod@cmsdb01:/scratch/pagent]$ mysql -h cmsdb01 -u root -p --socket=/scratch/pagent/mysqldata/mysql.sock
(/scratch/pagent/mysqldata is the $DATA dir that contains the innodbs, mysql.pid, mysql.log, mysql.err etc.)