These steps illustrate how to install the MySQL software in the default directory /usr/local/mysql.
phys-schost-1# cd /usr/local phys-schost-1# tar xvf mysql-max-5.0.12-solaris11-architecture_64.tar.gz phys-schost-1# ln -s mysql-max-5.0.12-solaris11-architecture_64 mysql
phys-schost-1# chown -R mysql:mysql /usr/local/mysql
phys-schost-1# mkdir -p /local/mysql-data/logs phys-schost-1# mkdir /local/mysql-data/innodb
phys-schost-1# cd /usr/local/mysql phys-schost-1# ./bin/mysqld --initialize --datadir=/local/mysql-data
phys-schost-1# cat > /local/mysql-data/my.cnf << EOF [mysqld] server-id=1 #port=3306 # 10.18.5.1 is the address of the logical host #bind-address=10.18.5.1 # socket=/tmp/phys-schost-1 .sock log=/local/mysql-data/logs/log1 log-bin=/local/mysql-data/logs/bin-log binlog-ignore-db=sc3_test_database log-slow-queries=/local/mysql-data/logs/log-slow-queries #log-update=/local/mysql-data/logs/log-update # Innodb #skip-innodb innodb_data_home_dir = /local/mysql-data/innodb innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /local/mysql-data/innodb innodb_log_arch_dir = /local/mysql-data/innodb # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high set-variable = innodb_buffer_pool_size=50M set-variable = innodb_additional_mem_pool_size=20M # Set .._log_file_size to 25 % of buffer pool size set-variable = innodb_log_file_size=12M set-variable = innodb_log_buffer_size=4M innodb_flush_log_at_trx_commit=1 set-variable = innodb_lock_wait_timeout=50 # Replication of Slave #server-id=2 #master-host=administerix #master-user=repl #master-password=repl #master-info-file=/local/mysql-data/logs/master.info # MySQL 4.x #relay-log=/local/mysql-data/logs/slave-bin.log #relay-log-info-file=/local/mysql-data/logs/slave-info
phys-schost-1# chown -R mysql:mysql /local/mysql-data
phys-schost-1# chmod 644 /local/mysql-data/my.cnf