免费注册 查看新帖 |

Chinaunix

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

求助,关于mysql.sock的诡异事件 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-11-20 10:31 |显示全部楼层 |倒序浏览
5可用积分
昨天在VM里非正常关闭了red hat,结果今天一登陆mysql就提示连不上mysql.sock,查看了一下根本就没生成这个文件,原来一直是用的默认路径/tmp,关机重装在my.cnf里添加路径之类的办法都用过了,结果还是老样子

实在没辙了,拜求哪位提供些解决思路

论坛徽章:
0
2 [报告]
发表于 2008-11-20 11:11 |显示全部楼层
我装的时候就是在/TMP下的......而且直到昨天mysql用的好好的......

论坛徽章:
0
3 [报告]
发表于 2008-11-20 11:17 |显示全部楼层
原帖由 ziggler 于 2008-11-20 11:14 发表

还有其他变动吗?比如防火墙、杀毒软件等?

没有.......昨天就添加了几个数据库

论坛徽章:
0
4 [报告]
发表于 2008-11-20 11:24 |显示全部楼层
my.cnf中mysql.sock路径在/tmp/里,日志如下:



081120 05:43:37  mysqld started
081120  5:43:37  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081120  5:43:37  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 36808.
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
081120  5:43:37  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
081120  5:43:38  InnoDB: Started; log sequence number 0 43655
081120  5:43:38 [Note] Recovering after a crash using mysql-bin
081120  5:43:38 [Note] Starting crash recovery...
081120  5:43:38 [Note] Crash recovery finished.
081120  5:43:38 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
081120 05:43:38  mysqld ended

论坛徽章:
0
5 [报告]
发表于 2008-11-20 11:24 |显示全部楼层
原帖由 ziggler 于 2008-11-20 11:21 发表

是不是和这个添加动作有关系?

问题是我把mysql删了后重装都没用......而且我的各条语句都是按照网上的教学贴敲的

[ 本帖最后由 mig-21-93 于 2008-11-20 11:29 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2008-11-20 11:50 |显示全部楼层
在网上找到了个方法,往mysql.cnf中添加
[mysqld]

basedir = /usr/local/mysql

datadir = /usr/local/mysql/data

之后重启系统,结果警告:GConf erreo :Failed to contact configuration server;some possible causes are that you need to enable TCP/IP networking for ORBit,or you have stale NFS locak due to a system crash.
整个系统背景变黑,任务栏也不见了
我除了添了几行语句什么都没干啊orz

论坛徽章:
0
7 [报告]
发表于 2008-11-20 12:24 |显示全部楼层
非常感谢LS,黑屏问题解决了



只是mysql还是启动不了......

论坛徽章:
0
8 [报告]
发表于 2008-11-20 12:28 |显示全部楼层
081120 06:25:56  mysqld started
081120  6:25:56  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
081120  6:25:56  InnoDB: Starting log scan based on checkpoint at
InnoDB: log sequence number 0 36808.
InnoDB: Doing recovery: scanned up to log sequence number 0 43655
081120  6:25:56  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
081120  6:25:56  InnoDB: Started; log sequence number 0 43655
081120  6:25:56 [Note] Recovering after a crash using mysql-bin
081120  6:25:56 [Note] Starting crash recovery...
081120  6:25:56 [Note] Crash recovery finished.
081120  6:25:56 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
081120 06:25:56  mysqld ended

老样子,按照网上的某个解决方法试过,没用,正在试其他办法

论坛徽章:
0
9 [报告]
发表于 2008-11-20 13:22 |显示全部楼层
知道是怎么回事了,非常感谢LS诸位,初始化的时候用的是相对路径而非绝对路径
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP