Mysql PID错误,locking数据库

我改变my.cnf文件来添加一些参数,但在重新启动服务后,它没能开始给出locking错误。 我使用rm命令删除了锁,并再次尝试重新启动,但不启动

我也更新到my.cnf备份文件。 当我检查服务状态,并试图重新启动给下面的消息。

# service mysql Status MySQL is not running, but lock exists [FAILED] # service mysql restart MySQL manager or server PID file could not be found! [FAILED] 

我Centos 5.3服务器和MySQL 5.3社区版本

谢谢,

这里是错误日志文件:

 110702 06:00:50 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 110702 6:00:50 [Note] Plugin 'FEDERATED' is disabled. 110702 6:00:50 InnoDB: Initializing buffer pool, size = 8.0M 110702 6:00:50 InnoDB: Completed initialization of buffer pool InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 110702 6:00:50 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 110702 6:00:50 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 110702 6:00:50 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 110702 6:00:50 InnoDB: Started; log sequence number 0 0 110702 6:00:50 [Note] Event Scheduler: Loaded 0 events 110702 6:00:50 [Note] /usr/sbin/mysqld: ready for connections. Version: '5.1.56' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) Status information: Current dir: /var/lib/mysql/ Running threads: 1 Stack size: 262144 Current locks: lock: 0x127e9528: lock: 0x12771468: lock: 0x127dcfb8: lock: 0x127e4dd8: lock: 0x127e0f58: lock: 0x12748588: lock: 0x127c3568: lock: 0x127bf2d8: lock: 0x1276b9e8: lock: 0x1278b108: lock: 0x1279aed8: lock: 0x12768978: lock: 0x127a5ff0: lock: 0x127d67e8: lock: 0x127d42e8: lock: 0x127d1aa8: lock: 0x127cf6c8: lock: 0x127cd738: lock: 0x127b8cc8: Key caches: default Buffer_size: 8384512 Block_size: 1024 Division_limit: 100 Age_limit: 300 blocks used: 7 not flushed: 0 w_requests: 164 writes: 86 r_requests: 159 reads: 4 handler status: read_key: 19 read_next: 31 read_rnd 0 read_first: 30 write: 706 delete 4 update: 5 Table status: Opened tables: 613 Open tables: 26 Open files: 52 Open streams: 0 Alarm status: Active alarms: 1 Max used alarms: 2 Next alarm time: 28635 Begin safemalloc memory dump: End safemalloc memory dump. Memory status: Non-mmapped space allocated from system: 7983104 Number of free chunks: 34 Number of fastbin blocks: 0 Number of mmapped regions: 11 Space in mmapped regions: 23605248 Maximum total allocated space: 0 Space available in freed fastbin blocks: 0 Total allocated space: 6866800 Total free space: 1116304 Top-most, releasable space: 1045872 Estimated memory (with thread stack): 31850496 Events status: LLA = Last Locked At LUA = Last Unlocked At WOC = Waiting On Condition DL = Data Locked Event scheduler status: State : INITIALIZED Thread id : 0 LLA : n/a:0 LUA : n/a:0 WOC : NO Workers : 0 Executed : 0 Data locked: NO Event queue status: Element count : 0 Data locked : NO Attempting lock : NO LLA : drop_schema_events:375 LUA : drop_schema_events:377 WOC : NO Next activation : never 110705 3:28:09 [Note] /usr/sbin/mysqld: Normal shutdown 110705 3:28:09 [Note] Event Scheduler: Purging the queue. 0 events 

 # service mysql Status MySQL is not running, but lock exists [FAILED] 

这意味着MySQL不能正常closures。 该pid被删除,但locking文件仍然存在。 删除locking文件,然后重试:

 # rm -f /var/lock/subsys/mysqld