Mysql 자료실
Vote Reply Modify Delete Forward Next List

  작성자   : 조성환 [ ladmin ] 추천: 177, 수정: 3, 조회: 775, 줄수: 183, 분류: Etc.
XE 로그인이 안되면서 DB 로그에 table 복구하라는 메시지가 쌓였을때 해결 방법

XE 로그인이 안되면서 DB 로그에 (키 파일이 손상되어) xe_session table 을 복구하라는 메시지가 쌓였을때 해결하는 방법입니다.



1. 우선 mysql 서버의 로그를 확인합니다.


[webzine:/apache/bin] #   cd /mysql/var

[webzine:/mysql/var] #   l
총 338
drwxr-xr-x   6 mysql    mysql        512  2월 15일  02:21 ./
drwxr-xr-x  11 mysql    mysql        512 2011년 12월 12일 ../
drwx------   2 mysql    mysql       8192  2월 15일  02:21 db_jfriends_www/
drwx------   2 mysql    mysql       8704 12월 24일  01:27 db_project_graduate/
drwx------   2 mysql    mysql       8192 12월 24일  01:57 db_webzine_cnue_ac_kr/
-rw-rw----   1 mysql    root       39696 2014년  3월  6일 down.err
-rw-rw----   1 mysql    mysql          5 2014년  3월  6일 down.pid
-rwxr-xr-x   1 mysql    root       21249 2013년  9월 23일 hosting.err*
-rw-rw----   1 mysql    mysql          6 2013년  9월 23일 hosting.pid
drwxr-xr-x   2 mysql    mysql       2048 2011년 12월 12일 mysql/
-rw-rw----   1 mysql    root        2228 2015년  6월 11일 support.err
-rw-rw----   1 mysql    root       75730  2월 15일  02:21 webzine.err
-rw-rw----   1 mysql    mysql          5  2월 15일  02:21 webzine.pid

[webzine:/mysql/var] #   tail -30 webzine.err
160215  2:14:18 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:22 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:22 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:23 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:23 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:29 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:29 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:29 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:29 [ERROR] /usr/local/mysql/libexec/mysqld: Incorrect key file for table './db_jfriends_www/xe_session.MYI'; try to repair it
160215  2:14:56 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

160215  2:14:56 [Note] Event Scheduler: Purging the queue. 0 events
160215  2:14:56 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

160215 02:14:56 mysqld_safe mysqld from pid file /usr/local/mysql/var/webzine.pid ended
160215 02:15:24 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
160215  2:15:24 [Note] Event Scheduler: Loaded 0 events
160215  2:15:24 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.60'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
160215  2:18:33 [ERROR] /usr/local/mysql/libexec/mysqld: Table './db_jfriends_www/xe_session' is marked as crashed and should be repaired
160215  2:21:20 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

160215  2:21:20 [Note] Event Scheduler: Purging the queue. 0 events
160215  2:21:20 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

160215 02:21:20 mysqld_safe mysqld from pid file /usr/local/mysql/var/webzine.pid ended
160215 02:21:27 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
160215  2:21:27 [Note] Event Scheduler: Loaded 0 events
160215  2:21:27 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.60'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution


2. 로그에서 알 수 있듯이 mysql DB 가 불완전하게 종료됨에 따라 db_jfriends_www 의 xe_session 테이블을 복구하려고 계속 시도한 기록을 볼 수 있었습니다.


3. 수동으로 해당 테이블을 복구합니다.

mysql> use db_jfriends_www
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> show tables ;
+-------------------------------+
| Tables_in_db_jfriends_www     |
+-------------------------------+
| xe_action_forward             |
| xe_addons                     |
| xe_addons_site                |
| xe_admin_favorite             |
| xe_admin_log                  |
| xe_ai_installed_packages      |
| xe_ai_remote_categories       |
| xe_autoinstall_packages       |
| xe_comment_declared           |
| xe_comment_declared_log       |
| xe_comment_voted_log          |
| xe_comments                   |
| xe_comments_list              |
| xe_counter_log                |
| xe_counter_site_status        |
| xe_counter_status             |
| xe_document_aliases           |
| xe_document_categories        |
| xe_document_declared          |
| xe_document_declared_log      |
| xe_document_extra_keys        |
| xe_document_extra_vars        |
| xe_document_histories         |
| xe_document_readed_log        |
| xe_document_trash             |
| xe_document_voted_log         |
| xe_documents                  |
| xe_editor_autosave            |
| xe_editor_components          |
| xe_editor_components_site     |
| xe_files                      |
| xe_lang                       |
| xe_layouts                    |
| xe_member                     |
| xe_member_auth_mail           |
| xe_member_autologin           |
| xe_member_count_history       |
| xe_member_denied_nick_name    |
| xe_member_denied_user_id      |
| xe_member_friend              |
| xe_member_friend_group        |
| xe_member_group               |
| xe_member_group_member        |
| xe_member_join_form           |
| xe_member_login_count         |
| xe_member_message             |
| xe_member_openid              |
| xe_member_openid_association  |
| xe_member_openid_nonce        |
| xe_member_scrap               |
| xe_menu                       |
| xe_menu_item                  |
| xe_menu_layout                |
| xe_module_admins              |
| xe_module_categories          |
| xe_module_config              |
| xe_module_extend              |
| xe_module_extra_vars          |
| xe_module_filebox             |
| xe_module_grants              |
| xe_module_locks               |
| xe_module_mobile_skins        |
| xe_module_part_config         |
| xe_module_skins               |
| xe_module_trigger             |
| xe_modules                    |
| xe_point                      |
| xe_poll                       |
| xe_poll_item                  |
| xe_poll_log                   |
| xe_poll_title                 |
| xe_sequence                   |
| xe_session                    |
| xe_site_admin                 |
| xe_sites                      |
| xe_spamfilter_denied_ip       |
| xe_spamfilter_denied_word     |
| xe_spamfilter_log             |
| xe_syndication_except_modules |
| xe_syndication_logs           |
| xe_tags                       |
| xe_trackbacks                 |
| xe_trash                      |
+-------------------------------+
83 rows in set (0.00 sec)


mysql> repair table xe_session ;
+----------------------------+--------+----------+----------+
| Table                      | Op     | Msg_type | Msg_text |
+----------------------------+--------+----------+----------+
| db_jfriends_www.xe_session | repair | status   | OK       |
+----------------------------+--------+----------+----------+
1 row in set (0.25 sec)


mysql> exit
Bye


[webzine:/mysql/var] #



mysql DB 와 Apache 웹서버를 restart 한 후 웹을 확인해 보시면 문제가 해결된 것을 확인하실 수 있을 것입니다.



다음: marked as crashed and should be repaired 에러 날때 2016/02/15(02:42) from 59.29.152.10
CrazyWWWBoard 2000

Vote Reply Modify Delete Forward Next List
(c) Nobreak Technologies, Inc.