• 구름많음동두천 16.1℃
  • 흐림강릉 18.0℃
  • 구름많음서울 15.8℃
  • 구름많음대전 17.6℃
  • 구름많음대구 15.9℃
  • 구름많음울산 19.4℃
  • 구름많음광주 16.0℃
  • 구름조금부산 18.0℃
  • 구름많음고창 16.9℃
  • 흐림제주 18.6℃
  • 구름많음강화 15.4℃
  • 구름많음보은 13.1℃
  • 구름많음금산 14.4℃
  • 구름많음강진군 15.6℃
  • 구름많음경주시 19.3℃
  • 맑음거제 19.0℃
기상청 제공

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;