Table of Contents
Kuali Rice was developed using two relational database management systems:
MySQL
Oracle
Install the MySQL database management system.
If you are installing MySQL after the initial operating system installation, use the RHEL update manager or yum on CentOS and install these packages:
mysql
mysql-server
If you did not install MySQL with the distribution, execute this command line (this assumes that you installed a CentOS 5.3 distribution):
Check if MySQL is installed:
rpm -qa | grep mysql
If the command has the following text in the results, then go down to the step where you check if MySQL is set to start at the appropriate run-levels:
mysql-server-5.1.xx-x.el5 mysql-5.1.xx-x.el5
If the command returns no results, no MySQL packages are installed. In that case, do this:
yum -y install mysql yum -y install mysql-server
Next check that the MySQL server is set to start at the appropriate run-levels:
chkconfig --list | grep mysqld mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
If the word “on” does not appear after the 3, 4, and 5, the MySQL server is set to be started manually. To set the MySQL server to start at the appropriate run-levels, execute this:
chkconfig --level 345 mysqld on
Now, double check the run-levels for the MySQL server:
chkconfig --list | grep mysqld mysqld 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Check if the MySQL server has been started automatically:
ps -ef | grep mysql
If you get the following output:
root 4829 3577 0 22:57 pts/1 00:00:00 grep mysql
Then, start the MySQL daemon with the following command:
/etc/init.d/mysqld start
You should see results similar to this:
Initializing MySQL database: Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h krice password 'new-password' See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com [ OK ] Starting MySQL: [ OK ]
These instructions assume that this is a fresh installation of Linux and NO MySQL server has been installed on the computer. Use the RHEL update manager or yum on CentOS and install this package:
mysql
mysql-server
If you did not install MySQL with the distribution, execute this command line (this assumes that you installed a CentOS 5.3 distribution):
Check if MySQL is installed:
rpm -qa | grep mysql
If the command has the following text in the results, then go down to the step where you check if MySQL is set to start at the appropriate run-levels:
mysql-server-5.1.xx-x.el5 mysql-5.1.xx-x.el5
If the command returns no results, no MySQL packages are installed. In that case, do this:
yum -y install mysql yum -y install mysql-server
Next check that the MySQL server is set to start at the appropriate run-levels:
chkconfig --list | grep mysqld mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
If the word “on” does not appear after the 3, 4, and 5, the MySQL server is set to be started manually. To set the MySQL server to start at the appropriate run-levels, execute this:
chkconfig --level 345 mysqld on
Now, double check the run-levels for the MySQL server:
chkconfig --list | grep mysqld mysqld 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Check if the MySQL server has been started automatically:
ps -ef | grep mysql
If you get the following output:
root 4829 3577 0 22:57 pts/1 00:00:00 grep mysql
Then, start the MySQL daemon with the following command:
/etc/init.d/mysqld start
You should see results similar to this:
Initializing MySQL database: Installing MySQL system tables... OK Filling help tables... OK
To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system.
Remember to set a password for the MySQL root User!
To do so, start the server and then issue the following commands:
/usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h Rice password 'new-password' See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com [ OK ] Starting MySQL: [ OK ]
This completes the MySQL server installation. Next, you install the MySQL client on the Rice computer.
Log onto your MySQL/Rice computer as the root user. If you are installing MySQL after the initial operating system installation, use the RHEL update manager or yum on CentOS and install the MySQL package.
If you did not install MySQL with the distribution, execute this in the command line (this assumes that you installed a CentOS 5.3 distribution):
Check if MySQL is installed:
rpm –qa | grep mysql
If the command has this text in the results, then go to the second step after this:
mysql-5.1.xx-x.el5
If the command returns no results, no MySQL packages are installed. In that case, do this:
yum -y install mysql
→ Now, edit the /etc/hosts file and enter the IP address and the host name of the computer where the MySQL server is located. In the following example, kmysql is name of the MySQL server:
<ip address of mysql server> kmysql
Once you have installed MySQL, ensure that MySQL is running by performing this on the computer where the MySQL server is running:
mysqladmin -u root -p version Enter password: [hit return, enter nothing]
If you see the following text, your MySQL server is NOT running:
mysqladmin: connect to server at ‘computername’ failed error: ‘Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)’ Check that mysqld is running and that the socket ‘/var/lib/mysql/mysql.sock’ exists!
If your MySQL server is NOT running, execute this on the computer as root where the MySQL server is installed:
/etc/init.d/mysqld start
If you see something similar to this, your MySQL server is running:
mysqladmin Ver 8.41 Distrib 5.0.45, for redhat-linux-gnu on i686 Copyright (C) 2000-2006 MySQL AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 5.0.45 Protocol version 10 Connection Localhost via UNIX socket UNIX socket /var/lib/mysql/mysql.sock Uptime: 34 sec Threads: 1 Questions: 1 Slow queries: 0 Opens: 12 Flush tables: 1 Open tables: 6 Queries per second avg: 0.029
If this is a new MySQL install, you have to set the initial password. To do so after you have started the MySQL daemon, execute this command:
mysqladmin –u root password ‘new-password’
After initial installation, you must set the MySQL root password. This applies to all platforms: Standalone and Developer Platform and Production Platform. To set the MySQL root password, do this on the computer where the MySQL server is running (substitute the name of the machine for ‘computername’):
mysqladmin -u root password ‘kualirice’ mysql -u root --password=”kualirice” mysql> use mysql mysql> set password for ‘root’@’localhost’=password(‘kualirice’); mysql> set password for ‘root’@’127.0.0.1’=password(‘kualirice’); mysql> set password for ‘root’@’computername’=password(‘kualirice’); mysql> mysql> grant all on *.* to ‘root’@’localhost’ with grant option; mysql> grant all on *.* to ‘root’@’127.0.0.1’ with grant option; mysql> grant all on *.* to ‘root’@’computername’ with grant option; mysql> mysql> grant create user on *.* to ‘root’@’localhost’ with grant option; mysql> grant create user on *.* to ‘root’@’127.0.0.1’ with grant option; mysql> grant create user on *.* to ‘root’@’computername’ with grant option; mysql> mysql> quit
If your MySQL server is running remotely (this is usually true for the Production Platform), do this on the computer where the MySQL server is running:
mysql -u root --password=”kualirice” mysql> use mysql mysql> create user ‘root’@’client_computername’; mysql> mysql> set password for ‘root’@’client_computername’=password(‘kualirice’); mysql> mysql> grant all on *.* to ‘root’@’client_computername’ with grant option; mysql> mysql> grant create user on *.* to ‘root’@’client_computername’ with grant option; mysql> mysql> quit
When you install MySQL, you must decide what port number the database will use for communications. The default port is 3306. If you decide to have MySQL communicate on a port other than the default, please refer to the MySQL documentation to determine how to change the port. These instructions assume for Quick Start Recommended Best Practice sections that the MySQL communications port remains at the default value of 3306.
Please ensure your MySQL server has the following settings at a minimum. If not, set them and then restart your MySQL daemon after modifying the configuration file, my.cnf.
These settings reflect a CentOS 5.3 distribution using the distribution-installed MySQL packages. They are stored in /etc/my.cnf.
Only the root user can change these settings, and they should only be changed when the database server is not running.
[mysqld] max_allowed_packet=20M transaction-isolation=READ-COMMITTED lower_case_table_names=1 max_connections=1000 innodb_locks_unsafe_for_binlog=1
It is very important to verify that the default transaction isolation is set to READ-COMMITTED. KEW uses some ‘SELECT ... FOR UPDATE’ statements that do NOT function properly with the default MySQL isolation of REPEATABLE-READ.
innodb_locks_unsafe_for_binlog=1 is only necessary if you are running MySQL 5.0.x. This behavior has been changed in MySQL 5.1+ so that, in 5.1+, this command is NOT necessary as long as you specify READ-COMMITTED transaction isolation.
3. If you make the changes to your MySQL configuration specified above, you will have to restart your MySQL server for these changes to take effect. You can restart your MySQL daemon by executing this command:
/etc/init.d/mysqld restart