メモ 5.5.28

# yum install cmake

# groupadd mysql
# useradd -m mysql -g mysql -d /home/mysql
# passwd mysql

$ tar xvfz mysql-5.5.28.tar.gz
$ cd mysql-5.5.28
$ su
# cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DWITH_EXTRA_CHARSETS=all -DMYSQL_UNIX_ADDR=/tmp/mysql.sock -DMYSQL_TCP_PORT=3306
# make
# make install

# /usr/local/mysql/scripts/mysql_install_db --basedir=/usr/local/mysql
# chown -R mysql:mysql /usr/local/mysql

# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
# chkconfig --add mysql
# chkconfig --list mysql
mysql           0:off   1:off   2:on    3:on    4:on    5:on    6:off
# /etc/init.d/mysql start
$ vi /etc/my.cnf

[mysqld]
datadir=/var/lib/mysql
socket=/tmp/mysql.sock
user=mysql
skip-character-set-client-handshake

# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

# Disabling symbolic-links is recommended to prevent assorted security risks;
# to do so, uncomment this line:
# symbolic-links=0

[mysqld_safe]
log-error=/usr/local/mysql/log/mysqld.log
pid-file=/usr/local/mysql/mysqld.pid

[client]
socket=/tmp/mysql.sock