• -동두천 26.7℃
  • -강릉 22.9℃
  • 서울 26.1℃
  • 대전 24.3℃
  • 대구 25.4℃
  • 울산 26.2℃
  • 박무광주 29.2℃
  • 구름많음부산 29.5℃
  • -고창 26.8℃
  • 흐림제주 33.6℃
  • -강화 25.4℃
  • -보은 21.9℃
  • -금산 25.8℃
  • -강진군 30.1℃
  • -경주시 24.9℃
  • -거제 29.9℃

mysql 소스 설치

# mysql 소스 설치

tar xvfpz mysql-5.0.83.tar.gz
cd mysql-5.0.83

useradd -M -r -d /var/lib/mysql -s /bin/bash -c "MySQL Server" -u 27 mysql
./configure
--prefix=/opt/webapps/mysql5
--localstatedir=/var/lib/mysql5
--with-thread-safe-client
--with-client-ldflags=-all-static
--with-mysqld-ldflags=-all-static
--enable-thread-safe-client
--without-debug
--without-docs
--without-bench
--with-charset=utf8
--with-language=korea
--with-extra-charsets=all
--with-plugins=innobase

make
make install

mv my.cnf /etc/my.cnf
mv mysqld.log /etc/logrotate.d/mysqld
mv mysqld_5 /etc/init.d/mysqld

chmod 700 /etc/init.d/mysqld
chkconfig --level 345 mysqld on
chmod 640 /etc/logrotate.d/mysqld
chown root.root /etc/logrotate.d/mysqld

/opt/webapps/mysql5/bin/mysql_install_db
chown mysql.nobody /var/lib/mysql5/
chown mysql.mysql /var/lib/mysql5/* -R
chmod 710 /var/lib/mysql5/

rm -rf /opt/webapps/mysql5/mysql-test
rm -rf /var/lib/mysql5/test
ln -s /tmp/mysql.sock /var/lib/mysql5/mysql.sock

update user set password=password('pwpwpwpw') where user='root';
update user set host='%' where host='localhost' and user='root';
flush privileges;