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 --with-charset=gb2312
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 &
(用mysql用户启动很重要。)
shell> bin/mysql -uroot -p
(输入密码,默认密码为空,直接回车即可)
shell> Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
如果出现上面的提示,说明mysql服务没有正常启动,因为mysql服务启动的话,会自动生成mysql.sock文件
shell> killall mysql
杀掉所有mysql进程,重新启动
shell> bin/mysql_install_db --user=mysql
重新启动
shell> bin/mysql -uroot -p作者: wab830 时间: 2006-08-03 08:24
谢谢楼上的大哥,我想再问一下,在我从新安装前是不是得把以前安装的MYSQL都删除才行行,我用rpm -qa|grep mysql查看,都两人MYSQL,我只删除了一个,别一个不知道为什么删不掉!还有我是在另一台windows2000 上给那台linux安装MYSQL的,安装完后是不是用ROOT用户登陆的时候必须在本机登陆呀?作者: wab830 时间: 2006-08-03 22:08
[root@office-as4 /]# groupadd mysql
groupadd: group mysql exists
[root@office-as4 /]# cd /usr/local
[root@office-as4 local]# gunzip mysql-5.0.22.tar.gz | tar -xvf-
[root@office-as4 local]# cd mysql-5.0.22
[root@office-as4 mysql-5.0.22]# ./configure --prefix=/usr/local/mysql --with-charset=gb2312
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking "character sets"... default: gb2312, collation: gb2312_chinese_ci; compiled in: gb2312 latin1 utf8
checking whether to compile national Unicode collations... yes
checking whether build environment is sane... yes
checking whether make sets $(MAKE)... (cached) yes
checking for gawk... (cached) gawk
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
这是我按照上面操作出的错,之前我已经装过一次了,应该还没卸载,config里面是这样
E325: ATTENTION
Found a swap file by the name ".config.log.swp"
owned by: root dated: Thu Aug 3 22:09:30 2006
file name: /usr/local/mysql-5.0.22/config.log
modified: YES
user name: root host name: office-as4
process ID: 3778
While opening file "config.log"
那位高手告诉我应该怎样安装呀,或给我个安装过程的链接