Chinaunix

标题: mysql安装问题(red hat enterprise linux 4 + mysql5) [打印本页]

作者: wab830    时间: 2006-08-02 23:58
标题: mysql安装问题(red hat enterprise linux 4 + mysql5)
我是LINUX新手,这两天想在新装的red hat enterprise linux4下安装MYSQL+TOMCAT,TOMCAT已安装成功,可MYSQL总是不行,安装完后也启不来?在网上找了好多这样的贴子,按照上面说的去做,可到最后都没有成功,那们能详细的介绍一下.tar.gz二进制包的安装过程吗?先谢了
作者: yzcdf    时间: 2006-08-03 00:52
所有这些操作需要root权限

     安装mysql的时候,默认使用latin1编码,如果要改变默认编码,用选项--with-charst
     例如:

     shell> ./configure --with-charset=gb2312

     CHARSET 可以使下面编码中的一种: `big5', `cp1251', `cp1257', `czech',
     `danish', `dec8', `dos', `euc_kr', `gb2312', `gbk', `german1',
     `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1',
     `latin2', `sjis', `swe7', `tis620', `ujis', `usa7', or
     `win1251ukr'.  See *Note character-sets::.

                 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"
那位高手告诉我应该怎样安装呀,或给我个安装过程的链接




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2