shell> groupadd mysql
shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
shell> cd mysql-VERSION
shell> ./configure --prefix=/usr/local/mysql
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
shell> cd /usr/local/mysql
shell> bin/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql var
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
如[root@guigu home]#
shell> groupadd mysql shell> useradd -g mysql mysql
shell> gunzip < mysql-VERSION.tar.gz | tar -xvf -
gunzip是Linux下解压缩的命令,同等功能的命令如:tar,可根据个人喜好任意使用,参考命令:
tar -zvxf mysql-4.1.18.tar.gz
shell> cd mysql-VERSION
1.cd mysql-4.1.18
shell> ./configure --prefix=/usr/local/mysql
./configure --prefix=/usr/local/mysql --with-charset=gb2312
./configure --prefix=/usr/local/mysql --with-charset=gb2312 --with-extra-charsets=gbk,utf8
shell> make
shell> make install
shell> cp support-files/my-medium.cnf /etc/my.cnf
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 2
shell> cd /usr/local/mysql shell> bin/mysql_install_db --user=mysql
shell> chown -R root . shell> chown -R mysql var shell> chgrp -R mysql .
chown mysql xxx
chgrp mysql xxx
shell> bin/mysqld_safe --user=mysql &
mysqladmin -u root -p shutdown