VPS侦探论坛

 找回密码
 注册
查看: 15884|回复: 19

數據庫正常運行還是出現package mysql is not installed

[复制链接]
发表于 2012-7-30 14:19:41 | 显示全部楼层 |阅读模式

請問
我之前discuz搬家
我是直接安裝一個新的discuz
再把/usr/local/mysql/var裡的數據庫上傳
之後就正常運行
但是最近在使用502自動重起腳本
發現mysql都無法隨lnmp啟動
指令後出現package mysql is not installed
網站還是可以正常運行
但是我要如何解決package mysql is not installed
讓502自動重起腳本正常使用?
拜託了!!
謝謝

[ 本帖最后由 qoologo 于 2012-7-30 14:21 编辑 ]
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-7-30 15:27:18 | 显示全部楼层


安装lnmp时会出现package mysql is not installed,不用管,这个FAQ里说过

502重启脚本只是重启php-fpm 和mysql没关系,也没必要去重启mysql

启动不了需要看mysql日志
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-7-30 19:35:26 | 显示全部楼层

回复 2# 的帖子


120627 10:28:17 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

120627 10:28:17 [Note] Event Scheduler: Purging the queue. 0 events
120627 10:28:17 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

120627 10:28:17 mysqld_safe mysqld from pid file /usr/local/mysql/var/263824.anygoing.com.pid ended
120627 10:28:20 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
120627 10:28:20 [Note] Event Scheduler: Loaded 0 events
120627 10:28:20 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120630 22:37:02 [ERROR] /usr/local/mysql/libexec/mysqld: Sort aborted
120630 22:37:24 mysqld_safe Number of processes running now: 0
120630 22:37:24 mysqld_safe mysqld restarted
120630 22:37:25 [Note] Event Scheduler: Loaded 0 events
120630 22:37:25 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701 04:17:24 mysqld_safe Number of processes running now: 0
120701 04:17:24 mysqld_safe mysqld restarted
120701  4:17:25 [Note] Event Scheduler: Loaded 0 events
120701  4:17:25 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701  4:34:26 [ERROR] Error in accept: Cannot allocate memory
120701  4:34:27 [ERROR] /usr/local/mysql/libexec/mysqld: Sort aborted
120701  4:34:28 [ERROR] /usr/local/mysql/libexec/mysqld: Sort aborted
120701  4:35:28 [ERROR] /usr/local/mysql/libexec/mysqld: Sort aborted
120701  4:39:26 [ERROR] Error in accept: Cannot allocate memory
120701 04:39:27 mysqld_safe Number of processes running now: 0
120701 04:39:27 mysqld_safe mysqld restarted
120701  4:39:29 [Note] Event Scheduler: Loaded 0 events
120701  4:39:29 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701  5:07:03 [ERROR] Error in accept: Cannot allocate memory
120701  5:07:03 [ERROR] Error in accept: Cannot allocate memory
120701  5:07:03 [ERROR] Error in accept: Cannot allocate memory
120701  5:07:03 [ERROR] Error in accept: Cannot allocate memory
120701  5:07:03 [ERROR] Error in accept: Cannot allocate memory
120701 05:07:04 mysqld_safe Number of processes running now: 0
120701 05:07:04 mysqld_safe mysqld restarted
120701  5:07:04 [Note] Event Scheduler: Loaded 0 events
120701  5:07:04 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701  5:31:01 [ERROR] /usr/local/mysql/libexec/mysqld: Sort aborted
120701 05:36:48 mysqld_safe Number of processes running now: 0
120701 05:36:48 mysqld_safe mysqld restarted
120701  5:36:48 [Note] Event Scheduler: Loaded 0 events
120701  5:36:48 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701 05:45:25 mysqld_safe Number of processes running now: 0
120701 05:45:25 mysqld_safe mysqld restarted
120701  5:45:25 [Note] Event Scheduler: Loaded 0 events
120701  5:45:25 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701 05:59:53 mysqld_safe Number of processes running now: 0
120701 05:59:53 mysqld_safe mysqld restarted
120701  5:59:53 [Note] Event Scheduler: Loaded 0 events
120701  5:59:53 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701 08:16:53 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
120701  8:16:56 [Note] Event Scheduler: Loaded 0 events
120701  8:16:56 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120701  8:17:38 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

120701  8:17:38 [Note] Event Scheduler: Purging the queue. 0 events
120701  8:17:38 [ERROR] /usr/local/mysql/libexec/mysqld: Sort aborted
120701  8:17:40 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

120701 08:17:40 mysqld_safe mysqld from pid file /usr/local/mysql/var/263824.anygoing.com.pid ended
120701 08:17:44 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
120701  8:17:44 [Note] Event Scheduler: Loaded 0 events
120701  8:17:44 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution
120702 16:45:21 [Note] /usr/local/mysql/libexec/mysqld: Normal shutdown

120702 16:45:21 [Note] Event Scheduler: Purging the queue. 0 events
120702 16:45:22 [Note] /usr/local/mysql/libexec/mysqld: Shutdown complete

120702 16:45:22 mysqld_safe mysqld from pid file /usr/local/mysql/var/263824.anygoing.com.pid ended
120702 16:45:25 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var
120702 16:45:25 [Note] Event Scheduler: Loaded 0 events
120702 16:45:25 [Note] /usr/local/mysql/libexec/mysqld: ready for connections.
Version: '5.1.54'  socket: '/tmp/mysql.sock'  port: 3306  Source distribution



mysql日誌幫看一下哪裡出問題
拜託了
謝謝!!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2012-7-30 20:38:02 | 显示全部楼层



120701  4:34:26 [ERROR] Error in accept: Cannot allocate memory 内存不够了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-7-31 13:52:08 | 显示全部楼层

回复 4# 的帖子


現在mysql使用cpu超高
都跳在50-90%
其他都很正常
能幫看看哪裡出問題?

mysql> show full processlist;
+------+------+-----------+-------+---------+------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Id   | User | Host      | db    | Command | Time | State        | Info                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+------+------+-----------+-------+---------+------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 7165 | root | localhost | NULL  | Query   |    0 | NULL         | show full processlist                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 7456 | root | localhost | fenom | Query   |    0 | Sending data | SELECT p.*, m.uid, m.username, m.groupid, m.adminid, m.regdate, m.lastactivity, m.posts, m.threads, m.digestposts, m.oltime,
                m.pageviews, m.credits, m.extcredits1, m.extcredits2, m.extcredits3, m.extcredits4, m.extcredits5, m.extcredits6,
                m.extcredits7, m.extcredits8, m.email, m.gender, m.showemail, m.invisible, mf.nickname, mf.site,
                mf.icq, mf.qq, mf.yahoo, mf.msn, mf.taobao, mf.alipay, mf.location, mf.medals,
                mf.sightml AS signature, mf.customstatus, mf.spacename
                FROM cdb_posts p
                LEFT JOIN cdb_members m ON m.uid=p.authorid
                LEFT JOIN cdb_memberfields mf ON mf.uid=m.uid
                 WHERE p.tid='13092' AND p.invisible='0'   ORDER BY dateline LIMIT 30, 10 |
+------+------+-----------+-------+---------+------+--------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)



拜託了
謝謝!!

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2012-7-31 14:26:13 | 显示全部楼层

回复 5# 的帖子


又不一樣了

mysql> show full processlist;
+-------+------+-----------+-------+---------+------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Id    | User | Host      | db    | Command | Time | State                | Info                                                                                                                                                                                                      |
+-------+------+-----------+-------+---------+------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| 10332 | root | localhost | fenom | Query   |    0 | Copying to tmp table | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'370806' ORDER BY t.dateline DESC LIMIT 1 |
| 10333 | root | localhost | fenom | Query   |    1 | Copying to tmp table | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'361023' ORDER BY t.dateline DESC LIMIT 1 |
| 10335 | root | localhost | fenom | Query   |    9 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='400604'                                                                                                                                      |
| 10337 | root | localhost | fenom | Query   |    8 | removing tmp table   | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'466649' ORDER BY t.dateline DESC LIMIT 1 |
| 10339 | root | localhost | fenom | Query   |    1 | Copying to tmp table | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'361023' ORDER BY t.dateline DESC LIMIT 1 |
| 10340 | root | localhost | fenom | Query   |    1 | Copying to tmp table | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'371107' ORDER BY t.dateline DESC LIMIT 1 |
| 10341 | root | localhost | fenom | Query   |    8 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='400604'                                                                                                                                      |
| 10342 | root | localhost | fenom | Query   |    1 | Copying to tmp table | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'370912' ORDER BY t.dateline DESC LIMIT 1 |
| 10343 | root | localhost | fenom | Query   |    8 | Sorting result       | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid>'370904' ORDER BY t.views LIMIT 1         |
| 10344 | root | localhost | fenom | Query   |    1 | statistics           | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'371107' ORDER BY t.dateline DESC LIMIT 1 |
| 10345 | root | localhost | fenom | Query   |    8 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='273643'                                                                                                                                      |
| 10346 | root | localhost | fenom | Query   |    8 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='311030'                                                                                                                                      |
| 10347 | root | localhost | fenom | Query   |    8 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='360703'                                                                                                                                      |
| 10348 | root | localhost | fenom | Query   |    8 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='42290'                                                                                                                                       |
| 10349 | root | localhost | fenom | Query   |    7 | Sorting result       | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid>'361023' ORDER BY t.dateline LIMIT 1      |
| 10350 | root | localhost | NULL  | Query   |    0 | NULL                 | show full processlist                                                                                                                                                                                     |
| 10351 | root | localhost | fenom | Query   |    3 | Sorting result       | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid>'370912' ORDER BY t.dateline LIMIT 1      |
| 10352 | root | localhost | fenom | Query   |    1 | Sorting result       | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid>'370904' ORDER BY t.views LIMIT 1         |
| 10353 | root | localhost | fenom | Query   |    3 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='360703'                                                                                                                                      |
| 10354 | root | localhost | fenom | Query   |    1 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='177688'                                                                                                                                      |
| 10355 | root | localhost | fenom | Query   |    1 | Copying to tmp table | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid>'63042' ORDER BY t.views LIMIT 1          |
+-------+------+-----------+-------+---------+------+----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
21 rows in set (0.05 sec)


拜託了
感謝!!
 楼主| 发表于 2012-7-31 14:36:04 | 显示全部楼层

回复 4# 的帖子


PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
1926 mysql     15   0 76840  51m 4536 S 29.6  5.0  97:19.15 mysqld
24520 www       15   0 40572  11m 4664 S  0.3  1.1   0:00.40 php-cgi
26561 www       15   0 40264  10m 4160 S  0.3  1.0   0:00.01 php-cgi
    1 root      15   0  2828 1412 1232 S  0.0  0.1   0:00.73 init
1369 root      18   0 35504 1280  988 S  0.0  0.1   0:00.06 rsyslogd
1403 dbus      15   0  2932  868  672 S  0.0  0.1   0:00.00 dbus-daemon
1425 haldaemo  15   0  5732 2044 1752 S  0.0  0.2   0:00.17 hald
1426 root      18   0  3736 1040  912 S  0.0  0.1   0:00.00 hald-runner
1500 root      15   0  8240 1128  720 S  0.0  0.1   0:00.08 sshd
1620 root      15   0  6984 1192  652 S  0.0  0.1   0:00.10 crond
1626 nobody    15   0 56220  760  456 S  0.0  0.1   0:00.22 memcached
1639 root      18   0  8980  612  380 S  0.0  0.1   0:00.00 pure-ftpd
1792 root      20   0  6948  768  348 S  0.0  0.1   0:00.00 nginx
1793 www       15   0 17592  11m  956 S  0.0  1.1   0:03.12 nginx
1794 www       15   0 17512  11m  956 S  0.0  1.1   0:03.61 nginx
1795 www       15   0 17860  11m  956 S  0.0  1.1   0:03.36 nginx
1796 www       15   0 16792  11m  956 S  0.0  1.1   0:03.66 nginx
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-7-31 14:56:23 | 显示全部楼层

回复 4# 的帖子


mysql> show processlist;
+-------+------+-----------+------+---------+------+-------+------------------+
| Id    | User | Host      | db   | Command | Time | State | Info             |
+-------+------+-----------+------+---------+------+-------+------------------+
| 12921 | root | localhost | NULL | Query   |    0 | NULL  | show processlist |
+-------+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)

mysql> show processlist;
+-------+------+-----------+-------+---------+------+------------------------------+------------------------------------------------------------------------------------------------------+
| Id    | User | Host      | db    | Command | Time | State                        | Info                                                                                                 |
+-------+------+-----------+-------+---------+------+------------------------------+------------------------------------------------------------------------------------------------------+
| 12921 | root | localhost | NULL  | Query   |    0 | NULL                         | show processlist                                                                                     |
| 12930 | root | localhost | fenom | Query   |    3 | Sorting result               | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
| 12931 | root | localhost | fenom | Query   |    3 | Copying to tmp table on disk | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
| 12932 | root | localhost | fenom | Query   |    3 | Locked                       | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='466997'                                 |
| 12933 | root | localhost | fenom | Query   |    1 | Copying to tmp table on disk | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
| 12934 | root | localhost | fenom | Query   |    0 | Sorting result               | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
+-------+------+-----------+-------+---------+------+------------------------------+------------------------------------------------------------------------------------------------------+
6 rows in set (0.00 sec)
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-7-31 15:33:31 | 显示全部楼层

回复 2# 的帖子


mysql> show processlist;
+------+------+-----------+-------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| Id   | User | Host      | db    | Command | Time | State                | Info                                                                                                 |
+------+------+-----------+-------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
| 1257 | root | localhost | NULL  | Query   |    0 | NULL                 | show processlist                                                                                     |
| 1260 | root | localhost | fenom | Query   |    4 | Sending data         | SELECT `p`.`tid` AS `tid`,`p`.`pid`,`p`.`message`,`p`.`attachment`
                                        FROM `cdb_threads` `t`
                                         |
| 1262 | root | localhost | fenom | Query   |    3 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='340816'                                 |
| 1263 | root | localhost | fenom | Query   |    3 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='421803'                                 |
| 1264 | root | localhost | fenom | Query   |    2 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='350916'                                 |
| 1265 | root | localhost | fenom | Query   |    0 | Locked               | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='340816'                                 |
| 1266 | root | localhost | fenom | Query   |    0 | Copying to tmp table | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
+------+------+-----------+-------+---------+------+----------------------+------------------------------------------------------------------------------------------------------+
7 rows in set (0.11 sec)
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-7-31 16:19:02 | 显示全部楼层

回复 2# 的帖子




mysql> show full  processlist;
+------+------+-----------+-------+---------+------+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Id   | User | Host      | db    | Command | Time | State                        | Info                                                                                                                                                                                                      |
+------+------+-----------+-------+---------+------+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|   43 | root | localhost | NULL  | Query   |    0 | NULL                         | show full  processlist                                                                                                                                                                                    |
| 1189 | root | localhost | fenom | Query   |    2 | Sorting result               | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'434380' ORDER BY t.dateline DESC LIMIT 1 |
| 1190 | root | localhost | fenom | Query   |    2 | Sorting result               | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid>'417475' ORDER BY t.dateline LIMIT 1      |
| 1191 | root | localhost | fenom | Query   |    1 | Locked                       | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='9038'                                                                                                                                        |
| 1193 | root | localhost | fenom | Query   |    1 | Copying to tmp table on disk | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid and a.isimage in ('1','-1')    and t.dateline>='0' AND t.tid<'370825' ORDER BY t.dateline DESC LIMIT 1 |
+------+------+-----------+-------+---------+------+------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
5 rows in set (0.00 sec)


我需要索引cdb_attachments和cdb_threads??
拜託了
发表于 2012-7-31 17:39:21 | 显示全部楼层

看前面的内存,cpu都没有问题
 楼主| 发表于 2012-7-31 19:09:57 | 显示全部楼层

回复 11# 的帖子


內存有問題?
msql也正常嗎?
怎麼在top裡看只有mysql的問題....
還有硬碟會狂跳
一下子增加一下子減少
但我網站沒動作
現在是哪的問題??
拜託了
謝謝

[ 本帖最后由 qoologo 于 2012-7-31 19:12 编辑 ]
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2012-7-31 19:30:29 | 显示全部楼层

回复 11# 的帖子

mysql> show index from cdb_threads;
ERROR 1046 (3D000): No database selected
mysql> show processlist;
+------+------+-----------+-------+---------+------+------------------------------+------------------------------------------------------------------------------------------------------+
| Id   | User | Host      | db    | Command | Time | State                        | Info                                                                                                 |
+------+------+-----------+-------+---------+------+------------------------------+------------------------------------------------------------------------------------------------------+
| 4054 | root | localhost | NULL  | Query   |    0 | NULL                         | show processlist                                                                                     |
| 5184 | root | localhost | fenom | Query   |   10 | Copying to tmp table on disk | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
| 5186 | root | localhost | fenom | Query   |    9 | Copying to tmp table on disk | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
| 5187 | root | localhost | fenom | Query   |    8 | Locked                       | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='2170'                                   |
| 5189 | root | localhost | fenom | Query   |    2 | Copying to tmp table on disk | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
| 5190 | root | localhost | fenom | Query   |    4 | Locked                       | UPDATE LOW_PRIORITY cdb_threads SET views=views+1 WHERE tid='20007'                                  |
| 5191 | root | localhost | fenom | Query   |    2 | Copying to tmp table on disk | SELECT t.subject,t.tid FROM cdb_attachments a,cdb_threads t WHERE a.tid=t.tid and a.uid=t.authorid a |
+------+------+-----------+-------+---------+------+------------------------------+------------------------------------------------------------------------------------------------------+
7 rows in set (0.00 sec)

好多都鎖住了
我應該要建立索引嗎?
拜託了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2012-7-31 21:53:38 | 显示全部楼层

回复 11# 的帖子

主機商回我的
Hello,

I checked on your VPS and there were fail counts on kmemsize and privmpages which could have caused this error for you. I raised the kmemsize value which had a very high amount of fail counts, so if that is what is causing your issue it should be fixed. Privmpages is the amount of physical memory the VPS has so if running out of free memory is what is causing this error to occur then the only way to fix it would be to upgrade the VPS package. If you notice this error again please let me know and also let me know how I can reproduce it.

這是什麼問題?
是我的mysql?
還是主機的問題?
拜託了
感謝!!

军哥运维代购:http://shop63846532.taobao.com/

 楼主| 发表于 2012-7-31 22:39:29 | 显示全部楼层

回复 11# 的帖子

主機商說我是這個問題

This is the exact process that is running your system out of resources. There is nothing wrong with the VPS itself, there is a problem where this processes is causing a high amount of load within mysql.

mysql 1616 34.1 2.7 49344 28400 ? Sl 21:28 15:19 /usr/local/mysql/libexec/mysqld --basedir=/usr/local/mysql --datadir=/usr/local/mysql/var --user=mysql --log-error=/usr/local/mysql/var/263824.anygoing.com.err --pid-file=/usr/local/mysql/var/263824.anygoing.com.pid --socket=/tmp/mysql.sock --port=3306


該怎麼解決?
拜託了
感謝
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-23 15:26 , Processed in 0.030881 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表