mysql编译安装
编译安装 mysql :shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzipcd mysql-VERSION
shell> ./configure --prefix=/infowarelab/mysql --datadir=/infowarelab/mysql/data
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /infowarelab/mysql
修改 bin/mysql_install_db 如下 :
指定 ldata=/infowarelab/mysql/data
shell> bin/mysql_install_db --user=mysql
shell> chown -R root.
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
cp /infowarelab/mysql/support-files/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
修改 /etc/init.d/mysql 如下:
指定
basedir=/infowarelab/mysql
datadir=/infowarelab/mysql/data
chkconfig --add mysql
chkconfig --level 345 mysql on
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/65976/showart_1183959.html 不错,学习了
页:
[1]