免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2638 | 回复: 3
打印 上一主题 下一主题

mysql安装问题(red hat enterprise linux 4 + mysql5) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-02 23:58 |只看该作者 |倒序浏览
我是LINUX新手,这两天想在新装的red hat enterprise linux4下安装MYSQL+TOMCAT,TOMCAT已安装成功,可MYSQL总是不行,安装完后也启不来?在网上找了好多这样的贴子,按照上面说的去做,可到最后都没有成功,那们能详细的介绍一下.tar.gz二进制包的安装过程吗?先谢了

论坛徽章:
0
2 [报告]
发表于 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

论坛徽章:
0
3 [报告]
发表于 2006-08-03 08:24 |只看该作者
谢谢楼上的大哥,我想再问一下,在我从新安装前是不是得把以前安装的MYSQL都删除才行行,我用rpm -qa|grep mysql查看,都两人MYSQL,我只删除了一个,别一个不知道为什么删不掉!还有我是在另一台windows2000 上给那台linux安装MYSQL的,安装完后是不是用ROOT用户登陆的时候必须在本机登陆呀?

论坛徽章:
0
4 [报告]
发表于 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"
那位高手告诉我应该怎样安装呀,或给我个安装过程的链接
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP