免费注册 查看新帖 |

Chinaunix

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

mysql 求助! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-09-13 10:38 |只看该作者 |倒序浏览
请各位高手帮忙看下,连接mysql时报错,查看错误日志如下:
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
InnoDB: Unable to lock ./ibdata1, error: 11
InnoDB: Check that you do not already have another mysqld process
InnoDB: using the same InnoDB data or log files.
110910  5:01:48  InnoDB: Unable to open the first data file
InnoDB: Error in opening ./ibdata1
110910  5:01:48  InnoDB: Operating system error number 11 in a file operation.
InnoDB: Error number 11 means 'Resource temporarily unavailable'.
InnoDB: Some operating system error numbers are described at
InnoDB: http://dev.mysql.com/doc/refman/ ... em-error-codes.html
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
110910  5:01:48 [ERROR] Plugin 'InnoDB' init function returned error.
110910  5:01:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
110910  5:01:48 [ERROR] Can't start server: Bind on TCP/IP port: Address already in use
110910  5:01:48 [ERROR] Do you already have another mysqld server running on port: 3306 ?
110910  5:01:48 [ERROR] Aborting
相关文件日志:
                       129M ib_logfile0
7.1G ibdata1  129M ib_logfile1

配置文件my.cnf

[client]
port            = 3306
socket          = /tmp/mysql.sock
[mysqld]
port            = 3306
socket          = /tmp/mysql.sock
skip-locking
key_buffer_size = 512M
max_allowed_packet = 2M
table_open_cache = 1024
sort_buffer_size = 2M
read_buffer_size = 8M
read_rnd_buffer_size = 8M
myisam_sort_buffer_size = 128M
thread_cache_size = 128
query_cache_size= 32M
innodb_flush_log_at_trx_commit=2
innodb_log_file_size=128M
innodb_buffer_pool_size=512M
innodb_log_buffer_size = 32M
#thread_concurrency = 8
max_connections = 3000
wait_timeout = 2592000
interactive_timeout = 2592000
long_query_time = 3
log-slow-queries=/var/lib/mysql/slowquery.log
open_files_limit=200000
tmp_table_size = 256M
skip-name-resolve
group_concat_max_len=4096
back_log=500
max_heap_table_size=128M
local-infile = 0
#log-bin=mysql-bin
#expire_logs_days = 10
server-id       = 1
[mysqldump]
quick
max_allowed_packet = 256M
[mysql]
no-auto-rehash

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

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

[mysqlhotcopy]
interactive-timeout


请各位高手帮下小弟,最近总是出现个问题,出现之后我就只能强制杀掉mysql。在重新启动才能正常

论坛徽章:
0
2 [报告]
发表于 2011-09-13 13:55 |只看该作者
netstat -nlp| grep "mysql" 或 ps -ef| grep "mysql"

检查下,是否已经有启动,特别是默认安装的,操作系统已启动就会帮你启动一个....你这属于数据库已经启动来了,只是可能不是你需要的...

论坛徽章:
0
3 [报告]
发表于 2011-09-13 13:55 |只看该作者
关闭的话,建议用:mysqladmin -uroot -p*** shutdown的方式,别kill,以及把不需要的默认安装目录清空....以及去掉系统重新启动的时候,自动启动mysqld服务的功能...

论坛徽章:
0
4 [报告]
发表于 2011-09-13 15:07 |只看该作者
关键过几天还是这样的情况发生

论坛徽章:
0
5 [报告]
发表于 2011-09-13 16:17 |只看该作者
关键过几天还是这样的情况发生
liufengpkw 发表于 2011-09-13 15:07


你这个明显在启动之前,已经有一个mysql在跑了。先关闭所有mysql再启动。否则端口占用,也不是那回事儿啊。再说了,怎么能用3306端口呢???

论坛徽章:
0
6 [报告]
发表于 2011-09-13 16:18 |只看该作者
chkconfig --list 看一下是不是有个你不需要的mysqld
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP