Re: [問題] mysql.sock找不到

看板Linux作者 (Reloading......)時間14年前 (2011/06/06 22:55), 編輯推噓0(005)
留言5則, 2人參與, 最新討論串2/2 (看更多)
※ 引述《mygarysm (Reloading......)》之銘言: : 標題: [問題] mysql.sock找不到 : 時間: Mon Jun 6 18:09:00 2011 : : OS是fedora 14 : mysql的版本是5.1.55 : : 錯誤訊息如下 : ERROR 2002 (HY000): Can't connect to local MySQL server through socket : '/var/lib/mysql/mysql.sock' (2) : : 用root去原位置查看 : 會看到mysql.sock如小星星般的消失又出現(閃爍= =) : mysql跟fedora都重開過了 : 網路上的方法只差yum重新安裝跟全都砍掉沒試過 : : 裡面有堆積如山的資料= = : : 有哪為大大能救救我嗎Q.Q : : -- : ※ 發信站: 批踢踢實業坊(ptt.cc) : ◆ From: 140.112.67.187 : → silentrain:不知道有種東西叫log嗎? 06/06 20:35 : 推 yihinwind:你有沒有把mysqld重開 06/06 20:42 : 推 chiouss:看 mysql 的 error log 會寫 06/06 20:57 : → mygarysm:我不知道mysql的error log 在哪裡ˊˋ 06/06 22:35 : → mygarysm:mysqld 跟 mysql都重開過了 06/06 22:35 從my.cnf的敘述中找到可能是error log的檔案了 但我實在不知要從何看起ˊˋ 因為有一部份的排程依舊再執行,去call mysql的資料出來使用 造成資訊洗頻= = 下面這段是"我以為"是一整段的訊息 Version: '5.1.55' socket: '/var/lib/mysql/mysql.sock' port: 3306 Source distribution 110606 22:41:58 InnoDB: Assertion failure in thread 140542605555456 in file log/log0log.c line 200 InnoDB: Failing assertion: len < log->buf_size / 2 InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 110606 22:41:58 - mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=8384512 read_buffer_size=131072 max_used_connections=0 max_threads=151 threads_connected=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338324 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = (nil) thread_stack 0x40000 /usr/libexec/mysqld(my_print_stacktrace+0x29) [0x861c69] /usr/libexec/mysqld(handle_segfault+0x460) [0x5bc640] /lib64/libpthread.so.0() [0x314f80eeb0] /lib64/libc.so.6(gsignal+0x35) [0x314f4330c5] /lib64/libc.so.6(abort+0x186) [0x314f434a76] /usr/libexec/mysqld() [0x7929dd] /usr/libexec/mysqld(mtr_commit+0x707) [0x79f837] /usr/libexec/mysqld() [0x7c0536] /usr/libexec/mysqld(row_purge_step+0x680) [0x7c1690] /usr/libexec/mysqld(que_run_threads+0x57b) [0x7b061b] /usr/libexec/mysqld(trx_purge+0x336) [0x7dcfd6] /usr/libexec/mysqld(srv_master_thread+0x718) [0x7d4c78] /lib64/libpthread.so.0() [0x314f806ccb] /lib64/libc.so.6(clone+0x6d) [0x314f4e0c2d] The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash. 110606 22:41:58 mysqld_safe Number of processes running now: 0 110606 22:41:58 mysqld_safe mysqld restarted 110606 22:41:59 InnoDB: Initializing buffer pool, size = 128.0M 110606 22:41:59 InnoDB: Completed initialization of buffer pool InnoDB: The log sequence number in ibdata files does not match InnoDB: the log sequence number in the ib_logfiles! 110606 22:41:59 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files... InnoDB: Restoring possible half-written data pages from the doublewrite InnoDB: buffer... 110606 22:41:59 InnoDB: Started; log sequence number 19 3118352567 110606 22:41:59 [ERROR] Column count of mysql.db is wrong. Expected 22, found 20. Created with MySQL 50045, now running 50155. Please use mysql_upgrade to fix this error. 110606 22:41:59 [ERROR] mysql.user has no `Event_priv` column at position 29 110606 22:41:59 [ERROR] Event Scheduler: An error occurred when initializing system tables. Disabling the Event Scheduler. 110606 22:41:59 [Note] /usr/libexec/mysqld: ready for connections. 以上訊息是代表著記錄權限的mysql.db掛點了嗎0.0? 所以我應該重建它? 重灌mysql? upgrade mysql? 謝謝大大幫忙>"< -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.112.67.187

06/07 00:29, , 1F
確認一下binlog以及schema有備份起來,再嘗試上面建議的
06/07 00:29, 1F

06/07 00:29, , 2F
mysql_upgrade 這指令看是否能修好
06/07 00:29, 2F

06/07 00:34, , 3F
做動作之前先用 rsync 把 mysql_data 資料夾複製一份到其他
06/07 00:34, 3F

06/07 00:34, , 4F
地方去..
06/07 00:34, 4F

06/07 06:23, , 5F
如樓上所說的,你的mysql.db欄位不對,mysql有升級?
06/07 06:23, 5F
文章代碼(AID): #1DxEfnJw (Linux)
討論串 (同標題文章)
文章代碼(AID): #1DxEfnJw (Linux)