• 흐림동두천 1.0℃
  • 흐림강릉 1.3℃
  • 서울 3.2℃
  • 대전 3.3℃
  • 대구 6.8℃
  • 울산 6.6℃
  • 광주 8.3℃
  • 부산 7.7℃
  • 흐림고창 6.7℃
  • 흐림제주 10.7℃
  • 흐림강화 2.2℃
  • 흐림보은 3.2℃
  • 흐림금산 4.4℃
  • 흐림강진군 8.7℃
  • 흐림경주시 6.7℃
  • 흐림거제 8.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;