banner

[Rule] Rules  [Home] Main Forum  [Portal] Portal  
[Members] Member Listing  [Statistics] Statistics  [Search] Search  [Reading Room] Reading Room 
[Register] Register  
[Login] Loginhttp  | https  ]
 
Forum Index Thảo luận hệ điều hành *nix MySQL - Restart báo fail nhưng status vẫn running  XML
  [Question]   MySQL - Restart báo fail nhưng status vẫn running 22/06/2012 11:01:15 (+0700) | #1 | 265430
traunui
Member

[Minus]    0    [Plus]
Joined: 28/02/2012 20:23:08
Messages: 62
Offline
[Profile] [PM]
Con mysql của em không hiểu sao, kiểm tra status vẫn running nhưng restart thì thấy fail. Còn vào webmin thì ko thấy nó chạy, vì thấy nó nút Start


[root@test ~]# service mysqld status
mysqld (pid 16110) is running...
[root@test ~]# service mysqld restart
Stopping mysqld: [ OK ]
Timeout error occurred trying to start MySQL Daemon.
Starting mysqld: [FAILED]
[root@test ~]# service mysqld status
mysqld (pid 21947) is running...
[root@test ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 119
Server version: 5.5.19 MySQL Community Server (GPL) by Remi

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>
 


Còn đây là trong webmin
[URL=http://imageshack.us/photo/my-images/832/screenshot712.png/]
[/URL]
[Up] [Print Copy]
  [Question]   MySQL - Restart báo fail nhưng status vẫn running 22/06/2012 11:07:38 (+0700) | #2 | 265431
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]
Xem log `/var/log/mysqld.log` để biết thêm chi tiết.
Let's build on a great foundation!
[Up] [Print Copy]
  [Question]   MySQL - Restart báo fail nhưng status vẫn running 22/06/2012 12:39:43 (+0700) | #3 | 265434
traunui
Member

[Minus]    0    [Plus]
Joined: 28/02/2012 20:23:08
Messages: 62
Offline
[Profile] [PM]
Đây là nội dung cuối của log file

120622 4:49:44 [ERROR] Native table 'performance_schema'.'events_waits_history' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'events_waits_history_long' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'setup_consumers' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'threads' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_thread_by_event_name' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'events_waits_summary_by_instance' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'events_waits_summary_global_by_event_name' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'file_summary_by_event_name' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'file_summary_by_instance' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'mutex_instances' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'rwlock_instances' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'cond_instances' has the wrong structure
120622 4:49:44 [ERROR] Native table 'performance_schema'.'file_instances' has the wrong structure
120622 4:49:44 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50077, now running 50519. Please use mysql_upgrade to fix this error.
120622 4:49:44 [ERROR] mysql.user has no `Event_priv` column at position 29
120622 4:49:44 [ERROR] Cannot open mysql.event
120622 4:49:44 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler.
120622 4:49:44 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.19' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Remi
120622 06:36:46 mysqld_safe A mysqld process already exists
 
[Up] [Print Copy]
  [Question]   MySQL - Restart báo fail nhưng status vẫn running 22/06/2012 12:51:57 (+0700) | #4 | 265438
[Avatar]
quanta
Moderator

Joined: 28/07/2006 14:44:21
Messages: 7265
Location: $ locate `whoami`
Offline
[Profile] [PM]
Có vẻ đoạn log này không tương ứng với thời điểm restart MySQL. Bạn nên chạy một cái `screen`, chia làm 2 regions, cái trên `tail -f /var/log/mysqld.log | ccze`, cái dưới `service mysqld restart`.

Tuy vậy, bạn nên fix hết các lỗi ở trên đi đã, đặc biệt là:

[ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50077, now running 50519. Please use mysql_upgrade to fix this error.
 
Let's build on a great foundation!
[Up] [Print Copy]
  [Question]   MySQL - Restart báo fail nhưng status vẫn running 22/06/2012 13:21:53 (+0700) | #5 | 265445
traunui
Member

[Minus]    0    [Plus]
Joined: 28/02/2012 20:23:08
Messages: 62
Offline
[Profile] [PM]
Cảm ơn bác.
Em check lại file config của nó thì thấy có 1 dòng bị lỗi, em đã thay đổi và giờ hoạt động bình thường rồi.


[root@test ~]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@test ~]# service mysqld status
mysqld (pid 28245) is running...
[root@test ~]# service mysqld restart
Stopping mysqld: [ OK ]
Starting mysqld: [ OK ]
[root@test ~]#
 

[Up] [Print Copy]
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to: 
 Users currently in here 
1 Anonymous

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|