Installing MySQL

./configure \
--with-charset=utf8 \
--with-extra-charsets=big5,gb2312 \
--prefix=/usr/local/mysql \
--enable-local-infile \
--enable-thread-safe-client

make
make install


choose correct config file
cp support-files/my-xxxxx.cnf /etc/my.cnf
./scripts/mysql_install_db
useradd -s /sbin/nologin mysql
chown -R mysql /usr/local/mysql/var
cp support-files/mysql.server /etc/rc.d/init.d/mysqld
chmod 755 /etc/rc.d/init.d/mysqld
chkconfig --add mysqld
chkconfig --level 3 mysqld on
change root password
/usr/local/mysql/bin/mysqladmin -u root password ‘new-password’

# To Strip mysqld yeilding up to 4% performance gain.
strip /usr/local/mysql/libexec/mysqld

edit /etc/rc.d/init.d/mysqld
add --skip-name-resolve to $bindir/mysqld_safe --datadir=$datadir --pid-file=$pid_file

Mount the file system with noatime
/dev/VolGroup00/LogVol04 /usr/local/mysql/var ext3 rw,noatime 1 2

Leave a Reply