web-dev-qa-db-ja.com

Mysql PIDエラー、データベースのロック

My.cnfファイルを変更していくつかのパラメーターを追加しましたが、サービスを再起動した後、ロックエラーが発生し始めませんでした。 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]

I Centos5.3サーバーとmysql5.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
2
Master-Man
# service mysql Status 
MySQL is not running, but lock exists                      [FAILED]

これは、MySQLが正しくシャットダウンしないことを意味します。 pidは削除されましたが、ロックファイルはまだ存在しています。ロックファイルを削除して、再試行してください。

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