Packaging MySQL on Andrew Linux

Packaging MySQL on Andrew Linux Stephen Hathorne Unix Systems Administrator Infrastructure, Systems, Applications and Middleware Carnegie Mellon slh+@cmu. edu This document is a tutorial … … on how to install MySQL on an Andew Linux system. Assumptions This document assumes that you have some base familiarity with Systems Administration, administrative privileges on the system (s) that you are about to modify, and a passing familiarity with the Andrew Package System 1 . Finally, you have an understanding of how to modify files, …
Bold elements generally represent section headings or important topics Step by Step Installation 1. First, we will create an /etc/my. cnf file to configure the attributes of the MySQL database engine. The example file that we will use, uses the INNODB model which makes the database engine more robust. 2. Next we will need to create the data directory, which is referred to as the datadir in /etc/my. cnf, and in various places within the document. 3. Modify /etc/package. proto to include the %doesmysql definition, and to protect our version of /etc/my. cnf or optionally include a file from an AFS path. 4. Once /etc/package. proto completes we will need to run /etc/mpp- package to add the files included in our package definition to our Andrew Linux System. 5. Become the user database to initialize and configure the MySQL engine. 6. Restart the MySQL database 7. Set the MySQL root (administrative) password 8. Create a simple test database and user. I. Create an /etc/my. cnf file The file /etc/my. cnf is the main configuration file for the MySQL database engine. The file below is a sample currently in use. [mysqld] data dir=/usr/mysql/data/mysql inn od b_data_file_path = d1: 2000M innodb_data_home_dir = /usr/mysql/data/mysql/idb innodb_log_group_home_dir = /usr/mysql/data/mysql/idb/log innodb_log_arch_dir = /usr/mysql/data/mysql/idb/log set-variable = innodb_mirrored_log_groups=1 set-variable = innodb_log_files_in_group=5 set-variable = innodb_log_file_size=200M set-variable = innodb_log_buffer_size=100M inn od b_flush_log_at_trx_commit=1 innodb_log_archive=0 set-variable = innodb_buffer_pool_size=100M set-variable = innodb_additional_mem_pool_size=4M set-variable = innodb_file_io_threads=4 set-variable = innodb_lock_wait_timeout=50 The important items to note in the above file is the datadir This is the directory where the MySQL data files will live. There are also two (2) additional subdirectories defined in the file. Innodb_data_home_dir=/usr/mysql/data/mysql/idb Innodb_log_group_home_dir=/usr/mysql/data/mysql/idb/log As you can see from the file these two directories are used to define a couple of other variables Step I is now complete II. Create the Data Directory, set ownership and permissions. $>mkdir -p /usr/mysql/data/mysql/idb/log $> chown -R database /usr/mysql/data These two (2) commands create the directories necessary to hold our database data, and sets the permissions and ownership for the user database to be able to access the data. 2 Step II is now complete
Download Packaging MySQL on Andrew Linux.Pdf