免费注册 查看新帖 |

Chinaunix

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

mysql 启动不了,老是自动重启!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-06 23:11 |只看该作者 |倒序浏览
1、运行环境

原来:
1)硬件环境:公司的电脑配置是内存1G的双核CPU。
2)软件:使用vware 6.0 在公司电脑上自己配了个mysql 5 .0.41 。给vmware 配了512M 内存。
3)运行情况:一切正常
4)my.cnf 内容
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-bdb
skip-innodb
skip-locking
skip-name-resolve
back_log = 200
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
max_connections= 100
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
bind-address = 192.168.1.20

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout

现在环境:
1)硬件环境:自己电脑单核, 512M内存。
2)原来的给vmware 512M 调小到256M. 其他都没变。
3)my.cnf (根据my.cnf.small)
[client]
#password       = your_password
port            = 3306
socket          = /tmp/mysql.sock

# Here follows entries for some specific programs

# The MySQL server
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer = 16K
max_allowed_packet = 1M
max_connections= 2
table_cache = 4
sort_buffer_size = 64K
read_buffer_size = 256K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 64K

server-id       = 1

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash

[isamchk]
key_buffer = 8M
sort_buffer_size = 8M

[myisamchk]
key_buffer = 8M
sort_buffer_size = 8M

[mysqlhotcopy]
interactive-timeout

4)以下的错误,且不停地报错。
  
     日志报错提示:

090405 03:00:55  mysqld restarted
090405  3:00:55  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...
090405  3:00:55  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
090405  3:00:55  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
090405  3:00:55  InnoDB: Started; log sequence number 0 43655
090405  3:00:55 - mysqld got signal 4;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

key_buffer_size=16384
read_buffer_size=258048
max_used_connections=0
max_connections=2
threads_connected=0
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 647 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=(nil)
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbfc134b8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x80c3dbb
0x80b7002
0x80feb34
0x80c656e
0x8363d58
0x8048131
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0


请高手们 分析下问题原因,先谢谢了!!

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
2 [报告]
发表于 2009-04-07 08:46 |只看该作者
前面非正常关闭吧?(非正常关闭前内存使用完成了)

升级成5.1.32可以或是换成另外版本。

论坛徽章:
0
3 [报告]
发表于 2009-04-07 10:43 |只看该作者
原帖由 枫影谁用了 于 2009-4-7 08:46 发表
前面非正常关闭吧?(非正常关闭前内存使用完成了)

升级成5.1.32可以或是换成另外版本。


我拿来后 关机重启还这样吗?能从报错分析出原因吗?

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
4 [报告]
发表于 2009-04-07 10:46 |只看该作者
原帖由 gron 于 2009-4-7 10:43 发表


我拿来后 关机重启还这样吗?能从报错分析出原因吗?

具体原因不清楚。

我遇到过,我是kill掉的,5.1.24版本。

再启就启不了,不管是咱样改配置都不行。照它那个公式内存远远够。后来编译了5.1.32,把data目录复制过来就可以启动了。

论坛徽章:
0
5 [报告]
发表于 2009-04-07 14:51 |只看该作者

回复 #1 gron 的帖子

问题已经解决了,重新编译了下mysql  就没问题了。

多谢楼上朋友 热情支持!!不过具体原因 还是不大明白。反正先问题已经解决了。

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
6 [报告]
发表于 2009-04-07 15:15 |只看该作者
原帖由 gron 于 2009-4-7 14:51 发表
问题已经解决了,重新编译了下mysql  就没问题了。

多谢楼上朋友 热情支持!!不过具体原因 还是不大明白。反正先问题已经解决了。


大概原因还是知道的。
总的是因为在崩之前已经使用完内存,恢复的时候需要正常内存多出20%左右。
具体的没有去验证^_^
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP