'how to install mysql'에 해당되는 글 1건

  1. 2011.09.23 [CentOS] how to install MySQL 5.1.x on CensOS 5.X 64bit
Server-Side/Linux2011. 9. 23. 15:22
Download

Make user & group for MySQL
# groupadd mysql
# useradd -g mysql mysql

Install MySQL
# cd /usr/local/src
# tar xzfv mysql-5.1.59.tar.gz
# cd mysql-5.1.59.tar.gz
# ./configure --prefix=/usr/local/mysql --localstatedir=/usr/local/mysql/data --with-charset=utf8 --with-collation=utf8_general_ci --with-plugins=innobase
# make
# make install

Configuration

# cp support-files/my-small.cnf /etc/my.cnf
# chown root /etc/my.cnf 
# chgrp root /etc/my.cnf
# chmod 644 /etc/my.cnf 

# vi /etc/my.cnf
[mysqld]
user = mysql


Install DB

# /usr/local/mysql/bin/mysql_install_db --user=mysql


Run MySQL

# /usr/local/mysql/bin/mysqld_safe --user=mysql &

# mysql -u root -p 


Automatic startup

# cp support-files/mysql.server /etc/init.d/mysql
# chmod 755 /etc/init.d/mysql
# chkconfig --add mysql
# chkconfig --level 35 mysql on 



reference
 - how to install mysql


Posted by 준피