编译安装 mysql :
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd 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
阅读(836) | 评论(0) | 转发(0) |