shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /opt/
shell> gunzip < mysql-standard-5.0.24a-linux-i686.tar.gz | tar xvf -
shell> ln -s mysql-standard-5.0.24a-linux-i686 mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
shell> useradd -g mysql mysql
shell> cd /opt/
shell> gunzip < mysql-standard-5.0.24a-linux-i686.tar.gz | tar xvf -
shell> ln -s mysql-standard-5.0.24a-linux-i686 mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
下面是我的安装过程:
groupadd mysql
useradd –g mysql mysql
tar zxvf mysql-5.0.24.tar.gz
cd mysql-5.0.24
./configure –prefix=/usr/local/mysql –with-charset=gb2312
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db –user=mysql
chown –R mysql .
chown –R mysql var(这里,你要到安装目录下看看生成的目录名是data,还是var)
chgrp –R mysql .
还是有问题:
[root@localhost mysql]# ./bin/safe_mysqld user=mysql&
[3] 13353
[root@localhost mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data
STOPPING server from pid file /usr/local/mysql/data/localhost.localdomain.pid
061013 17:31:25 mysqld ended