找回密码
 立即注册
搜索
查看: 227|回复: 14

求救信号--红色

[复制链接]

43

主题

346

回帖

527

积分

高级会员

积分
527
发表于 2004-6-11 14:00:26 | 显示全部楼层 |阅读模式
本人在linux ad3。0下面要启动mysql。提示:ERROR 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
去了mysql的网站,查了一些相关的信息后,依然找不到解决的方法。
结果我就突发奇想,从新安装了个mysql。
可是当我configure的时候,它出现了这个提示:
./configure
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Neither host 'vincent' and 'localhost' could not be looked up with
./bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
弄来弄去,找到原因,可是解决不了,大家帮忙想一想解决一下。
我已经试过了在hosts,network里面修改了hostname也是不行
打了hostname vion800显示我的主机名是vion800了,可是一configure也是不行!
救命啊~~~

43

主题

346

回帖

527

积分

高级会员

积分
527
 楼主| 发表于 2004-6-14 08:20:11 | 显示全部楼层
怎么?没人懂啊
再自己顶上去
回复

使用道具 举报

426

主题

4758

回帖

5279

积分

管理员

积分
5279
发表于 2004-6-14 14:15:47 | 显示全部楼层
删除/var/lib/mysql/mysql.sock文件以及/tmp/mysql.sock文件,然后killall mysql ,多kill几遍,确保没有这个进程。
重新安装mysql
将mysql.huge(或者mini的)文件复制到/etc/my.cnf
my.cnf里面有mysql.sock文件的具体位置,把server和client的文件都设置成一个位置的,比如tmp/mysql.sock。
回复

使用道具 举报

43

主题

346

回帖

527

积分

高级会员

积分
527
 楼主| 发表于 2004-6-14 14:21:19 | 显示全部楼层
问题是:
1。找不到/var/lib/mysql这个文件,更别说说后面那这个mysql.sock了ps
2。我ps xa | grep mysqld,也kill了,但是每次都不一样,我一kill又有。
回复

使用道具 举报

426

主题

4758

回帖

5279

积分

管理员

积分
5279
发表于 2004-6-14 14:28:58 | 显示全部楼层
killall mysqld
这样就会kill所有mysqld进程。
安装的方法是
1、解压缩。
2、运行configure prefix=/usr/local/mysql
(假设你解压缩到这里)
3、建立/etc/my.cnf文件(这个是全局的配置,你可以不用在date下建立这个文件)。
4、运行哪个脚本文件初始化数据库。
回复

使用道具 举报

426

主题

4758

回帖

5279

积分

管理员

积分
5279
发表于 2004-6-14 14:30:36 | 显示全部楼层
还有按照INSTALL文件那样,首先建立用户和设置文件权限。
回复

使用道具 举报

43

主题

346

回帖

527

积分

高级会员

积分
527
 楼主| 发表于 2004-6-14 14:40:09 | 显示全部楼层
安装install做了,可是到了这里就不行了。
[root@vincent mysql]# killall mysql
mysql: no process killed
[root@vincent mysql]# scripts/mysql_install_db --user=mysql
Neither host 'vincent' and 'localhost' could not be looked up with
./bin/resolveip
Please configure the 'hostname' command to return a correct hostname.
If you want to solve this at a later stage, restart this script with
the --force option
回复

使用道具 举报

426

主题

4758

回帖

5279

积分

管理员

积分
5279
发表于 2004-6-14 14:42:49 | 显示全部楼层
编辑/etc/sysconfig/network文件里面的hostaname和你的/etc/hosts文件,使里面的主机名对应。
重新启动生效,或者编辑完了以后用hostname命令设置。
回复

使用道具 举报

43

主题

346

回帖

527

积分

高级会员

积分
527
 楼主| 发表于 2004-6-14 14:47:42 | 显示全部楼层
下面是/etc/sysconfig/networkNETWORKING=yes
HOSTNAME=vincent
GATEWAY=192.168.5.254
这个是/etc/hosts里面的:
127.0.0.1               vincent localhost.localdomain localhost
192.168.5.11            vincent bin.com  vincent

本来我就是这样的。

我还发觉一个问题,我在ms的机子下面ping 我的linux的ip的话显示是正常的
可是当我ping我的linux的主机名的时候是ping不通来的,我ping -a加我的linux的主机也是ping不通

我怀疑是防火墙的问题,于是我把防火墙给close了,可是问题依然出现。
回复

使用道具 举报

426

主题

4758

回帖

5279

积分

管理员

积分
5279
发表于 2004-6-14 14:49:05 | 显示全部楼层
把hosts文件的第二行删除看看?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|海浩社区

GMT+8, 2025-9-21 07:04 , Processed in 0.115036 second(s), 20 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表