mysql – 夏清然的日志 https://www.qingran.net Xia Qingran Geek Blog Sun, 07 Aug 2016 09:50:33 +0000 en-US hourly 1 https://wordpress.org/?v=4.6.1 112893047 MySQL的莫名故障 https://www.qingran.net/2010/08/mysql%e7%9a%84%e8%8e%ab%e5%90%8d%e6%95%85%e9%9a%9c/ https://www.qingran.net/2010/08/mysql%e7%9a%84%e8%8e%ab%e5%90%8d%e6%95%85%e9%9a%9c/#respond Wed, 18 Aug 2010 16:32:45 +0000 https://www.qingran.net/?p=612 博客的wordpress的mysql数据库突然故障,报了一下错误,同时把我VPS的CPU搞到了100%

Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_commentmeta' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_commentmeta'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_comments' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_comments'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_options' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_options'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_postmeta' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_postmeta'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_posts' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_posts'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_term_relationships' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_term_relationships'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_term_taxonomy' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_term_taxonomy'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_terms' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_terms'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_usermeta' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_usermeta'
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [ERROR] /usr/sbin/mysqld: Table './qingran_blog/wp_users' is marked as crashed and should be repaired
Aug 18 23:36:29 www mysqld: 100818 23:36:29 [Warning] Checking table:   './qingran_blog/wp_users'
Aug 18 23:40:48 www ntpd[2718]: synchronized to 91.189.94.4, stratum 2

奇怪了,这个mysql的访问量很低,怎么会有如此问题?尝试mysqld restart,备份数据库,执行mysqlcheck和myisamchk,居然任何错误没有,一切正常。。。
这是我遇到的第n次mysql奇怪问题这两天找时间换PostgreSQL!

]]>
https://www.qingran.net/2010/08/mysql%e7%9a%84%e8%8e%ab%e5%90%8d%e6%95%85%e9%9a%9c/feed/ 0 612
获得MySQL/PostgreSQL的内存占用比例的脚本 https://www.qingran.net/2010/05/%e8%8e%b7%e5%be%97mysqlpostgresql%e7%9a%84%e5%86%85%e5%ad%98%e5%8d%a0%e7%94%a8%e6%af%94%e4%be%8b%e7%9a%84%e8%84%9a%e6%9c%ac/ https://www.qingran.net/2010/05/%e8%8e%b7%e5%be%97mysqlpostgresql%e7%9a%84%e5%86%85%e5%ad%98%e5%8d%a0%e7%94%a8%e6%af%94%e4%be%8b%e7%9a%84%e8%84%9a%e6%9c%ac/#comments Mon, 24 May 2010 07:32:31 +0000 https://www.qingran.net/?p=364 获得MySQL/PostgreSQL在GNU/Linux和FreeBSD下的内存占用比例:

GNU/Linux系统

MySQL

ps -o pmem,comm ax  | grep mysql | awk '{SUM+=$1}END{print SUM}'

PostgreSQL

ps -o pmem,comm ax  | grep postgre | awk '{SUM+=$1}END{print SUM}'

FreeBSD系统

MySQL

ps -o pmem,comm -wuax | grep mysql | awk '{SUM+=$1}END{print SUM}'

PostgreSQL

ps -o pmem,comm -wuax | grep postgre | awk '{SUM+=$1}END{print SUM}'

其他进程也可以如法泡制~

]]>
https://www.qingran.net/2010/05/%e8%8e%b7%e5%be%97mysqlpostgresql%e7%9a%84%e5%86%85%e5%ad%98%e5%8d%a0%e7%94%a8%e6%af%94%e4%be%8b%e7%9a%84%e8%84%9a%e6%9c%ac/feed/ 1 364