• 맑음동두천 -9.2℃
  • 맑음강릉 -2.7℃
  • 맑음서울 -6.1℃
  • 구름많음대전 -3.9℃
  • 맑음대구 -3.9℃
  • 구름조금울산 -2.8℃
  • 구름조금광주 -2.1℃
  • 맑음부산 -2.1℃
  • 구름많음고창 -3.3℃
  • 제주 5.4℃
  • 맑음강화 -8.8℃
  • 흐림보은 -4.4℃
  • 맑음금산 -5.5℃
  • 구름많음강진군 -4.0℃
  • 흐림경주시 -5.6℃
  • 맑음거제 0.3℃
기상청 제공

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;