织梦CMS - 轻松建站从此开始!

罗索

Mysql ERROR 1040 (HY000): Too many connections

落鹤生 发布于 2015-01-08 00:03 点击:次 
1、问题描述:连接数据库出现Too Many Connections 错误, 2、问题定位步骤: 1、mysql -u root -p 进入不了,同样出现上述错误。 2、修改/etc/mysql/my.cnf(ubuntu系统,其他系统在/etc/my.cnf
TAG: mysql  

1、问题描述:连接数据库出现Too Many Connections  错误,
 2、问题定位步骤:
           1、mysql -u root -p 进入不了,同样出现上述错误。
           2、修改/etc/mysql/my.cnf(ubuntu系统,其他系统在/etc/my.cnf
 [mysqld] 
port=3306 
#socket=MySQL 
skip-locking 
set-variable = key_buffer=16K 
set-variable = max_allowed_packet=1M 
set-variable = thread_stack=64K 
set-variable = table_cache=4 
set-variable = sort_buffer=64K 
set-variable = net_buffer_length=2K 
set-variable = max_connections=1000
3、重启mysql  /etc/init.d/mysql restart

搞定了。

4、还有一个方法就是直接 /etc/init.d/mysql restart 在做连接操作,呵呵,这个不好。


续:

再次mysql -u root -p 进入系统 ,如下,大部分的连接其实已经Sleep了,那么如何控制释放这些空闲连接,

mysql的默认连接上只有100,也就是说连接数据超过100 就会有可能出现 Too Many Connections

 

修改my.cnf配置文件添加并需要重启:
[mysqld] 
wait_timeout = 600
interactive_timeout = 600

上面的意思是设置10分钟内该连接没有请求就断开,当然你也可以通过kill掉下面的process的。命令是 kill ${id}    比如下面的19684 进程 kill 19684。

mysql> show full processlist;
+-------+----------------------+-----------------------------+------+---------+------+-------+-----------------------+
| Id    | User                 | Host                        | db   | Command | Time | State | Info                  |
+-------+----------------------+-----------------------------+------+---------+------+-------+-----------------------+
| 19684 | root                 | AY130121082434a.local:59618 | fo   | Sleep   | 7028 |       | NULL                  |
| 19691 | root                 | AY130121082434a.local:59888 | mo   | Sleep   | 6121 |       | NULL                  |
| 19709 | root                 | AY130121082434a.local:60339 | fo   | Sleep   | 7272 |       | NULL                  |
| 19708 | root                 | AY130121082434a.local:60338 | fo   | Sleep   | 6672 |       | NULL                  |
| 19710 | root                 | 222.95.56.226:4883          | fo   | Sleep   | 7263 |       | NULL                  |
| 19711 | root                 | 222.95.56.226:4884          | fo   | Sleep   | 7263 |       | NULL                  |
| 19712 | root                 | 222.95.56.226:4885          | fo   | Sleep   | 7264 |       | NULL                  |
| 19713 | root                 | 222.95.56.226:4886          | fo   | Sleep   | 7264 |       | NULL                  |
| 19714 | root                 | 222.95.56.226:4887          | fo   | Sleep   | 7265 |       | NULL                  |
| 19715 | root                 | 222.95.56.226:4888          | fo   | Sleep   | 7261 |       | NULL                  |
| 19716 | root                 | 222.95.56.226:4889          | fo   | Sleep   | 7256 |       | NULL                  |
| 19717 | root                 | 222.95.56.226:4891          | fo   | Sleep   | 7250 |       | NULL                  |
| 19718 | root                 | 222.95.56.226:4899          | fo   | Sleep   | 7246 |       | NULL                  |
| 19719 | root                 | 222.95.56.226:4900          | fo   | Sleep   | 3669 |       | NULL                  |
| 19720 | root                 | 222.95.56.226:4901          | fo   | Sleep   | 3035 |       | NULL                  |
| 19721 | root                 | 222.95.56.226:4904          | fo   | Sleep   | 7231 |       | NULL                  |
| 19722 | root                 | 222.95.56.226:4909          | fo   | Sleep   | 7226 |       | NULL                  |
| 19723 | root                 | 222.95.56.226:4910          | fo   | Sleep   | 7221 |       | NULL                  |
| 19724 | root                 | 222.95.56.226:4912          | fo   | Sleep   | 7216 |       | NULL                  |
| 19725 | root                 | 222.95.56.226:4913          | fo   | Sleep   | 7211 |       | NULL                  |
| 19726 | root                 | 222.95.56.226:4914          | fo   | Sleep   | 7206 |       | NULL                  |
| 19727 | root                 | 222.95.56.226:4915          | fo   | Sleep   | 7200 |       | NULL                  |
| 19728 | root                 | 222.95.56.226:4916          | fo   | Sleep   | 3034 |       | NULL                  |
| 19729 | root                 | 222.95.56.226:4918          | fo   | Sleep   | 3115 |       | NULL                  |
| 19730 | root                 | AY130121082434a.local:60622 | mo   | Sleep   | 6121 |       | NULL                  |
| 19731 | root                 | AY130121082434a.local:60623 | fo   | Sleep   | 6672 |       | NULL                  |
| 19732 | root                 | AY130121082434a.local:60692 | fo   | Sleep   | 6547 |       | NULL                  |
| 19733 | root                 | AY130121082434a.local:60693 | fo   | Sleep   | 6547 |       | NULL                  |
| 19734 | root                 | AY130121082434a.local:60694 | fo   | Sleep   | 6305 |       | NULL                  |
| 19735 | root                 | AY130121082434a.local:60695 | fo   | Sleep   | 6547 |       | NULL                  |
| 19736 | root                 | AY130121082434a.local:60791 | mo   | Sleep   | 5713 |       | NULL                  |
| 19737 | root                 | AY130121082434a.local:60792 | mo   | Sleep   | 5713 |       | NULL                  |
| 19738 | root                 | AY130121082434a.local:60793 | fo   | Sleep   | 5823 |       | NULL                  |
| 19739 | root                 | AY130121082434a.local:60794 | fo   | Sleep   | 5823 |       | NULL                  |
| 19756 | root                 | AY130121082434a.local:60875 | mo   | Sleep   | 5249 |       | NULL                  |
| 19755 | root                 | AY130121082434a.local:60874 | mo   | Sleep   | 5249 |       | NULL                  |
| 19758 | root                 | AY130121082434a.local:60877 | fo   | Sleep   | 5342 |       | NULL                  |
| 19757 | root                 | AY130121082434a.local:60876 | fo   | Sleep   | 5647 |       | NULL                  |
| 19759 | root                 | AY130121082434a.local:60878 | fo   | Sleep   | 5342 |       | NULL                  |
| 19771 | root                 | AY130121082434a.local:60923 | mo   | Sleep   | 4767 |       | NULL                  |
| 19772 | root                 | AY130121082434a.local:60924 | mo   | Sleep   | 4767 |       | NULL                  |
| 19773 | root                 | AY130121082434a.local:60926 | fo   | Sleep   | 3897 |       | NULL                  |
| 19774 | root                 | AY130121082434a.local:60927 | fo   | Sleep   | 3175 |       | NULL                  |
| 19775 | root                 | AY130121082434a.local:60998 | mo   | Sleep   | 4454 |       | NULL                  |
| 19776 | root                 | AY130121082434a.local:60999 | mo   | Sleep   | 4454 |       | NULL                  |
| 19777 | root                 | AY130121082434a.local:32913 | mo   | Sleep   | 4307 |       | NULL                  |
| 19778 | root                 | AY130121082434a.local:32914 | mo   | Sleep   | 4307 |       | NULL                  |
| 19779 | root                 | AY130121082434a.local:32915 | mo   | Sleep   | 4307 |       | NULL                  |
| 19780 | root                 | AY130121082434a.local:32916 | mo   | Sleep   | 3387 |       | NULL                  |
| 19781 | root                 | AY130121082434a.local:32957 | mo   | Sleep   | 1365 |       | NULL                  |
| 19782 | root                 | AY130121082434a.local:32959 | moco | Sleep   | 3840 |       | NULL                  |
| 19783 | root                 | AY130121082434a.local:32958 | moco | Sleep   | 3840 |       | NULL                  |
| 19784 | root                 | AY130121082434a.local:32961 | moco | Sleep   | 3840 |       | NULL                  |
| 19785 | root                 | AY130121082434a.local:32962 | moco | Sleep   | 3840 |       | NULL                  |
| 19786 | root                 | AY130121082434a.local:32963 | moco | Sleep   | 3840 |       | NULL                  |
| 19787 | root                 | AY130121082434a.local:32964 | moco | Sleep   | 3840 |       | NULL                  |
| 19788 | root                 | AY130121082434a.local:32965 | moco | Sleep   | 3840 |       | NULL                  |
| 19789 | root                 | AY130121082434a.local:32966 | moco | Sleep   | 3840 |       | NULL                  |
| 19790 | root                 | AY130121082434a.local:32967 | moco | Sleep   | 3840 |       | NULL                  |
| 19791 | root                 | AY130121082434a.local:32968 | moco | Sleep   | 3840 |       | NULL                  |
| 19792 | root                 | AY130121082434a.local:32969 | moco | Sleep   | 3839 |       | NULL                  |
| 19793 | root                 | AY130121082434a.local:32970 | moco | Sleep   | 3839 |       | NULL                  |
| 19794 | root                 | AY130121082434a.local:32971 | moco | Sleep   | 3839 |       | NULL                  |
| 19795 | root                 | AY130121082434a.local:32972 | moco | Sleep   | 3839 |       | NULL                  |
| 19796 | root                 | AY130121082434a.local:32973 | moco | Sleep   | 3839 |       | NULL                  |
| 19797 | root                 | AY130121082434a.local:32974 | moco | Sleep   | 3839 |       | NULL                  |
| 19798 | root                 | AY130121082434a.local:32975 | moco | Sleep   | 3839 |       | NULL                  |
| 19799 | root                 | AY130121082434a.local:32976 | moco | Sleep   | 3839 |       | NULL                  |
| 19800 | root                 | AY130121082434a.local:32977 | moco | Sleep   | 3839 |       | NULL                  |
| 19801 | root                 | AY130121082434a.local:33110 | mo   | Sleep   | 1365 |       | NULL                  |
| 19803 | root                 | AY130121082434a.local:33112 | fo   | Sleep   | 1363 |       | NULL                  |
| 19802 | root                 | AY130121082434a.local:33111 | fo   | Sleep   | 1390 |       | NULL                  |
| 19804 | root                 | AY130121082434a.local:33113 | fo   | Sleep   |  343 |       | NULL                  |
| 19805 | root                 | 222.95.56.226:8148          | fo   | Sleep   | 2910 |       | NULL                  |
| 19806 | root                 | 222.95.56.226:8147          | fo   | Sleep   | 2911 |       | NULL                  |
| 19807 | root                 | 222.95.56.226:8149          | fo   | Sleep   | 2910 |       | NULL                  |
| 19808 | root                 | 222.95.56.226:8150          | fo   | Sleep   | 2905 |       | NULL                  |
| 19809 | root                 | 222.95.56.226:8151          | fo   | Sleep   | 2901 |       | NULL                  |
| 19810 | root                 | 222.95.56.226:8153          | fo   | Sleep   | 2896 |       | NULL                  |
| 19811 | root                 | 222.95.56.226:8154          | fo   | Sleep   | 2891 |       | NULL                  |
| 19812 | root                 | 222.95.56.226:8155          | fo   | Sleep   | 2886 |       | NULL                  |
| 19813 | root                 | 222.95.56.226:8156          | fo   | Sleep   | 2881 |       | NULL                  |
| 19814 | root                 | 222.95.56.226:8159          | fo   | Sleep   | 2876 |       | NULL                  |
| 19815 | root                 | 222.95.56.226:8160          | fo   | Sleep   | 2870 |       | NULL                  |
| 19816 | root                 | 222.95.56.226:8161          | fo   | Sleep   | 2848 |       | NULL                  |
| 19817 | root                 | 222.95.56.226:8162          | fo   | Sleep   | 2848 |       | NULL                  |
| 19818 | root                 | 222.95.56.226:8163          | fo   | Sleep   | 2849 |       | NULL                  |
| 19819 | root                 | 222.95.56.226:8164          | fo   | Sleep   | 2849 |       | NULL                  |
| 19820 | root                 | 222.95.56.226:8167          | fo   | Sleep   | 2846 |       | NULL                  |
| 19821 | root                 | 222.95.56.226:8168          | fo   | Sleep   | 2468 |       | NULL                  |
| 19822 | root                 | 222.95.56.226:8169          | fo   | Sleep   | 2836 |       | NULL                  |
| 19823 | root                 | 222.95.56.226:8173          | fo   | Sleep   | 2468 |       | NULL                  |
| 19824 | root                 | 222.95.56.226:8174          | fo   | Sleep   | 2469 |       | NULL                  |
| 19825 | root                 | AY130121082434a.local:33342 | moco | Sleep   | 2570 |       | NULL                  |
| 19826 | root                 | AY130121082434a.local:33527 | moco | Sleep   | 2490 |       | NULL                  |
| 19827 | root                 | 222.95.56.226:8417          | fo   | Sleep   | 1266 |       | NULL                  |
| 19828 | root                 | 222.95.56.226:8416          | fo   | Sleep   | 1266 |       | NULL                  |
| 19829 | root                 | 222.95.56.226:8415          | fo   | Sleep   | 1263 |       | NULL                  |
| 19830 | root                 | 222.95.56.226:8418          | fo   | Sleep   | 1258 |       | NULL                  |
| 19831 | root                 | 222.95.56.226:8421          | fo   | Sleep   | 1253 |       | NULL                  |
| 19839 | root                 | AY130121082434a.local:33955 | moco | Sleep   | 1220 |       | NULL                  |
| 19841 | root                 | AY130121082434a.local:33957 | moco | Sleep   | 1220 |       | NULL                  |
| 19840 | root                 | AY130121082434a.local:33956 | moco | Sleep   | 1220 |       | NULL                  |
| 19842 | root                 | 222.95.56.226:8439          | fo   | Sleep   | 1141 |       | NULL                  |
| 19844 | root                 | 222.95.56.226:8440          | fo   | Sleep   | 1142 |       | NULL                  |
| 19843 | root                 | 222.95.56.226:8441          | fo   | Sleep   | 1143 |       | NULL                  |
| 19845 | root                 | 222.95.56.226:8442          | fo   | Sleep   | 1143 |       | NULL                  |
| 19846 | root                 | 222.95.56.226:8443          | fo   | Sleep   | 1144 |       | NULL                  |
| 19847 | root                 | 222.95.56.226:8451          | fo   | Sleep   | 1144 |       | NULL                  |
| 19849 | root                 | 222.95.56.226:8452          | fo   | Sleep   | 1144 |       | NULL                  |
| 19851 | root                 | 222.95.56.226:8453          | fo   | Sleep   | 1143 |       | NULL                  |
| 19853 | root                 | AY130121082434a.local:33981 | mo   | Sleep   | 1157 |       | NULL                  |
| 19852 | root                 | AY130121082434a.local:33980 | mo   | Sleep   | 1157 |       | NULL                  |
| 19854 | root                 | AY130121082434a.local:33982 | mo   | Sleep   | 1157 |       | NULL                  |
| 19856 | root                 | 222.95.56.226:8455          | fo   | Sleep   | 1112 |       | NULL                  |
| 19857 | root                 | AY130121082434a.local:33983 | fo   | Sleep   |  343 |       | NULL                  |
| 19858 | root                 | 222.95.56.226:8462          | fo   | Sleep   | 1112 |       | NULL                  |
| 19859 | root                 | 222.95.56.226:8463          | fo   | Sleep   | 1113 |       | NULL                  |
| 19860 | root                 | 222.95.56.226:8464          | fo   | Sleep   | 1113 |       | NULL                  |
| 19861 | root                 | 222.95.56.226:8466          | fo   | Sleep   | 1113 |       | NULL                  |
| 19869 | root                 | 222.95.56.226:8491          | fo   | Sleep   | 1052 |       | NULL                  |
| 19868 | root                 | 222.95.56.226:8492          | fo   | Sleep   | 1047 |       | NULL                  |
| 19870 | root                 | 222.95.56.226:8490          | fo   | Sleep   | 1042 |       | NULL                  |
| 19871 | root                 | 222.95.56.226:8493          | fo   | Sleep   | 1037 |       | NULL                  |
| 19872 | root                 | 222.95.56.226:8494          | fo   | Sleep   | 1032 |       | NULL                  |
| 19873 | root                 | 222.95.56.226:8495          | fo   | Sleep   | 1027 |       | NULL                  |
| 19874 | root                 | 222.95.56.226:8496          | fo   | Sleep   | 1022 |       | NULL                  |
| 19875 | root                 | 222.95.56.226:8497          | fo   | Sleep   | 1017 |       | NULL                  |
| 19877 | root                 | 222.95.56.226:8499          | fo   | Sleep   | 1007 |       | NULL                  |
| 19878 | root                 | 222.95.56.226:8500          | fo   | Sleep   | 1002 |       | NULL                  |
| 19879 | root                 | 222.95.56.226:8501          | fo   | Sleep   |  631 |       | NULL                  |
| 19880 | root                 | 222.95.56.226:8508          | fo   | Sleep   |  668 |       | NULL                  |
| 19881 | root                 | AY130121082434a.local:34006 | fo   | Sleep   |  343 |       | NULL                  |
| 19882 | root                 | AY130121082434a.local:34071 | moco | Sleep   |  320 |       | NULL                  |
| 19883 | root                 | AY130121082434a.local:34072 | moco | Sleep   |  320 |       | NULL                  |
| 19884 | root                 | AY130121082434a.local:34073 | moco | Sleep   |  320 |       | NULL                  |
| 19885 | root                 | AY130121082434a.local:34074 | moco | Sleep   |  320 |       | NULL                  |
| 19886 | root                 | AY130121082434a.local:34075 | moco | Sleep   |  320 |       | NULL                  |
| 19887 | root                 | AY130121082434a.local:34076 | moco | Sleep   |  320 |       | NULL                  |
| 19889 | root                 | AY130121082434a.local:34078 | moco | Sleep   |  320 |       | NULL                  |
| 19890 | root                 | AY130121082434a.local:34079 | moco | Sleep   |  320 |       | NULL                  |
| 19888 | root                 | AY130121082434a.local:34077 | moco | Sleep   |  320 |       | NULL                  |
| 19891 | root                 | AY130121082434a.local:34080 | moco | Sleep   |  320 |       | NULL                  |
| 19892 | root                 | AY130121082434a.local:34081 | moco | Sleep   |  320 |       | NULL                  |
| 19893 | root                 | AY130121082434a.local:34083 | moco | Sleep   |  320 |       | NULL                  |
| 19894 | root                 | AY130121082434a.local:34084 | moco | Sleep   |  320 |       | NULL                  |
| 19895 | root                 | AY130121082434a.local:34085 | moco | Sleep   |  320 |       | NULL                  |
| 19896 | root                 | AY130121082434a.local:34086 | moco | Sleep   |  320 |       | NULL                  |
| 19897 | root                 | AY130121082434a.local:34087 | moco | Sleep   |  320 |       | NULL                  |
| 19898 | root                 | AY130121082434a.local:34088 | mo   | Sleep   |  257 |       | NULL                  |
| 19899 | root                 | localhost                   | NULL | Query   |    0 | NULL  | show full processlist |
| 19901 | unauthenticated user | 211.149.151.45:4090         | NULL | Connect | NULL | login | NULL                  |
+-------+----------------------+-----------------------------+------+---------+------+-------+-----------------------+

 

查看mysql状态

mysql> show status;
+-----------------------------------+-----------+
| Variable_name                     | Value     |
+-----------------------------------+-----------+
| Aborted_clients                   | 1574      |
| Aborted_connects                  | 3890      |
| Binlog_cache_disk_use             | 0         |
| Binlog_cache_use                  | 0         |
| Bytes_received                    | 181       |
| Bytes_sent                        | 25363     |
| Com_admin_commands                | 0         |
| Com_assign_to_keycache            | 0         |
| Com_alter_db                      | 0         |
| Com_alter_db_upgrade              | 0         |
| Com_alter_event                   | 0         |
| Com_alter_function                | 0         |
| Com_alter_procedure               | 0         |
| Com_alter_server                  | 0         |
| Com_alter_table                   | 0         |
| Com_alter_tablespace              | 0         |
| Com_analyze                       | 0         |
| Com_backup_table                  | 0         |
| Com_begin                         | 0         |
| Com_binlog                        | 0         |
| Com_call_procedure                | 0         |
| Com_change_db                     | 0         |
| Com_change_master                 | 0         |
| Com_check                         | 0         |
| Com_checksum                      | 0         |
| Com_commit                        | 0         |
| Com_create_db                     | 0         |
| Com_create_event                  | 0         |
| Com_create_function               | 0         |
| Com_create_index                  | 0         |
| Com_create_procedure              | 0         |
| Com_create_server                 | 0         |
| Com_create_table                  | 0         |
| Com_create_trigger                | 0         |
| Com_create_udf                    | 0         |
| Com_create_user                   | 0         |
| Com_create_view                   | 0         |
| Com_dealloc_sql                   | 0         |
| Com_delete                        | 0         |
| Com_delete_multi                  | 0         |
| Com_do                            | 0         |
| Com_drop_db                       | 0         |
| Com_drop_event                    | 0         |
| Com_drop_function                 | 0         |
| Com_drop_index                    | 0         |
| Com_drop_procedure                | 0         |
| Com_drop_server                   | 0         |
| Com_drop_table                    | 0         |
| Com_drop_trigger                  | 0         |
| Com_drop_user                     | 0         |
| Com_drop_view                     | 0         |
| Com_empty_query                   | 0         |
| Com_execute_sql                   | 0         |
| Com_flush                         | 0         |
| Com_grant                         | 0         |
| Com_ha_close                      | 0         |
| Com_ha_open                       | 0         |
| Com_ha_read                       | 0         |
| Com_help                          | 0         |
| Com_insert                        | 0         |
| Com_insert_select                 | 0         |
| Com_install_plugin                | 0         |
| Com_kill                          | 0         |
| Com_load                          | 0         |
| Com_load_master_data              | 0         |
| Com_load_master_table             | 0         |
| Com_lock_tables                   | 0         |
| Com_optimize                      | 0         |
| Com_preload_keys                  | 0         |
| Com_prepare_sql                   | 0         |
| Com_purge                         | 0         |
| Com_purge_before_date             | 0         |
| Com_release_savepoint             | 0         |
| Com_rename_table                  | 0         |
| Com_rename_user                   | 0         |
| Com_repair                        | 0         |
| Com_replace                       | 0         |
| Com_replace_select                | 0         |
| Com_reset                         | 0         |
| Com_restore_table                 | 0         |
| Com_revoke                        | 0         |
| Com_revoke_all                    | 0         |
| Com_rollback                      | 0         |
| Com_rollback_to_savepoint         | 0         |
| Com_savepoint                     | 0         |
| Com_select                        | 1         |
| Com_set_option                    | 0         |
| Com_show_authors                  | 0         |
| Com_show_binlog_events            | 0         |
| Com_show_binlogs                  | 0         |
| Com_show_charsets                 | 0         |
| Com_show_collations               | 0         |
| Com_show_column_types             | 0         |
| Com_show_contributors             | 0         |
| Com_show_create_db                | 0         |
| Com_show_create_event             | 0         |
| Com_show_create_func              | 0         |
| Com_show_create_proc              | 0         |
| Com_show_create_table             | 0         |
| Com_show_create_trigger           | 0         |
| Com_show_databases                | 0         |
| Com_show_engine_logs              | 0         |
| Com_show_engine_mutex             | 0         |
| Com_show_engine_status            | 0         |
| Com_show_events                   | 0         |
| Com_show_errors                   | 0         |
| Com_show_fields                   | 0         |
| Com_show_function_status          | 0         |
| Com_show_grants                   | 0         |
| Com_show_keys                     | 0         |
| Com_show_master_status            | 0         |
| Com_show_new_master               | 0         |
| Com_show_open_tables              | 0         |
| Com_show_plugins                  | 0         |
| Com_show_privileges               | 0         |
| Com_show_procedure_status         | 0         |
| Com_show_processlist              | 2         |
| Com_show_profile                  | 0         |
| Com_show_profiles                 | 0         |
| Com_show_slave_hosts              | 0         |
| Com_show_slave_status             | 0         |
| Com_show_status                   | 1         |
| Com_show_storage_engines          | 0         |
| Com_show_table_status             | 0         |
| Com_show_tables                   | 0         |
| Com_show_triggers                 | 0         |
| Com_show_variables                | 1         |
| Com_show_warnings                 | 0         |
| Com_slave_start                   | 0         |
| Com_slave_stop                    | 0         |
| Com_stmt_close                    | 0         |
| Com_stmt_execute                  | 0         |
| Com_stmt_fetch                    | 0         |
| Com_stmt_prepare                  | 0         |
| Com_stmt_reprepare                | 0         |
| Com_stmt_reset                    | 0         |
| Com_stmt_send_long_data           | 0         |
| Com_truncate                      | 0         |
| Com_uninstall_plugin              | 0         |
| Com_unlock_tables                 | 0         |
| Com_update                        | 0         |
| Com_update_multi                  | 0         |
| Com_xa_commit                     | 0         |
| Com_xa_end                        | 0         |
| Com_xa_prepare                    | 0         |
| Com_xa_recover                    | 0         |
| Com_xa_rollback                   | 0         |
| Com_xa_start                      | 0         |
| Compression                       | OFF       |
| Connections                       | 19904     |
| Created_tmp_disk_tables           | 0         |
| Created_tmp_files                 | 5         |
| Created_tmp_tables                | 1         |
| Delayed_errors                    | 0         |
| Delayed_insert_threads            | 0         |
| Delayed_writes                    | 0         |
| Flush_commands                    | 1         |
| Handler_commit                    | 0         |
| Handler_delete                    | 0         |
| Handler_discover                  | 0         |
| Handler_prepare                   | 0         |
| Handler_read_first                | 0         |
| Handler_read_key                  | 0         |
| Handler_read_next                 | 0         |
| Handler_read_prev                 | 0         |
| Handler_read_rnd                  | 0         |
| Handler_read_rnd_next             | 277       |
| Handler_rollback                  | 0         |
| Handler_savepoint                 | 0         |
| Handler_savepoint_rollback        | 0         |
| Handler_update                    | 0         |
| Handler_write                     | 276       |
| Innodb_buffer_pool_pages_data     | 508       |
| Innodb_buffer_pool_pages_dirty    | 0         |
| Innodb_buffer_pool_pages_flushed  | 8159      |
| Innodb_buffer_pool_pages_free     | 1         |
| Innodb_buffer_pool_pages_misc     | 3         |
| Innodb_buffer_pool_pages_total    | 512       |
| Innodb_buffer_pool_read_ahead_rnd | 611       |
| Innodb_buffer_pool_read_ahead_seq | 181       |
| Innodb_buffer_pool_read_requests  | 23149188  |
| Innodb_buffer_pool_reads          | 9484      |
| Innodb_buffer_pool_wait_free      | 0         |
| Innodb_buffer_pool_write_requests | 190314    |
| Innodb_data_fsyncs                | 16464     |
| Innodb_data_pending_fsyncs        | 0         |
| Innodb_data_pending_reads         | 0         |
| Innodb_data_pending_writes        | 0         |
| Innodb_data_read                  | 268521472 |
| Innodb_data_reads                 | 11361     |
| Innodb_data_writes                | 21253     |
| Innodb_data_written               | 283684352 |
| Innodb_dblwr_pages_written        | 8159      |
| Innodb_dblwr_writes               | 1459      |
| Innodb_log_waits                  | 0         |
| Innodb_log_write_requests         | 20515     |
| Innodb_log_writes                 | 12238     |
| Innodb_os_log_fsyncs              | 13549     |
| Innodb_os_log_pending_fsyncs      | 0         |
| Innodb_os_log_pending_writes      | 0         |
| Innodb_os_log_written             | 15657472  |
| Innodb_page_size                  | 16384     |
| Innodb_pages_created              | 457       |
| Innodb_pages_read                 | 16256     |
| Innodb_pages_written              | 8159      |
| Innodb_row_lock_current_waits     | 0         |
| Innodb_row_lock_time              | 882       |
| Innodb_row_lock_time_avg          | 29        |
| Innodb_row_lock_time_max          | 185       |
| Innodb_row_lock_waits             | 30        |
| Innodb_rows_deleted               | 115       |
| Innodb_rows_inserted              | 13542     |
| Innodb_rows_read                  | 9862769   |
| Innodb_rows_updated               | 24051     |
| Key_blocks_not_flushed            | 0         |
| Key_blocks_unused                 | 13396     |
| Key_blocks_used                   | 5         |
| Key_read_requests                 | 9         |
| Key_reads                         | 5         |
| Key_write_requests                | 2         |
| Key_writes                        | 2         |
| Last_query_cost                   | 10.499000 |
| Max_used_connections              | 152       |
| Not_flushed_delayed_rows          | 0         |
| Open_files                        | 2         |
| Open_streams                      | 0         |
| Open_table_definitions            | 256       |
| Open_tables                       | 64        |
| Opened_files                      | 20815     |
| Opened_table_definitions          | 0         |
| Opened_tables                     | 0         |
| Prepared_stmt_count               | 0         |
| Qcache_free_blocks                | 594       |
| Qcache_free_memory                | 8994056   |
| Qcache_hits                       | 33660     |
| Qcache_inserts                    | 19694     |
| Qcache_lowmem_prunes              | 0         |
| Qcache_not_cached                 | 54423     |
| Qcache_queries_in_cache           | 2806      |
| Qcache_total_blocks               | 6369      |
| Queries                           | 498358    |
| Questions                         | 5         |
| Rpl_status                        | NULL      |
| Select_full_join                  | 0         |
| Select_full_range_join            | 0         |
| Select_range                      | 0         |
| Select_range_check                | 0         |
| Select_scan                       | 1         |
| Slave_open_temp_tables            | 0         |
| Slave_retried_transactions        | 0         |
| Slave_running                     | OFF       |
| Slow_launch_threads               | 0         |
| Slow_queries                      | 0         |
| Sort_merge_passes                 | 0         |
| Sort_range                        | 0         |
| Sort_rows                         | 0         |
| Sort_scan                         | 0         |
| Ssl_accept_renegotiates           | 0         |
| Ssl_accepts                       | 0         |
| Ssl_callback_cache_hits           | 0         |
| Ssl_cipher                        |           |
| Ssl_cipher_list                   |           |
| Ssl_client_connects               | 0         |
| Ssl_connect_renegotiates          | 0         |
| Ssl_ctx_verify_depth              | 0         |
| Ssl_ctx_verify_mode               | 0         |
| Ssl_default_timeout               | 0         |
| Ssl_finished_accepts              | 0         |
| Ssl_finished_connects             | 0         |
| Ssl_session_cache_hits            | 0         |
| Ssl_session_cache_misses          | 0         |
| Ssl_session_cache_mode            | NONE      |
| Ssl_session_cache_overflows       | 0         |
| Ssl_session_cache_size            | 0         |
| Ssl_session_cache_timeouts        | 0         |
| Ssl_sessions_reused               | 0         |
| Ssl_used_session_cache_entries    | 0         |
| Ssl_verify_depth                  | 0         |
| Ssl_verify_mode                   | 0         |
| Ssl_version                       |           |
| Table_locks_immediate             | 82747     |
| Table_locks_waited                | 0         |
| Tc_log_max_pages_used             | 0         |
| Tc_log_page_size                  | 0         |
| Tc_log_page_waits                 | 0         |
| Threads_cached                    | 0         |
| Threads_connected                 | 152       |
| Threads_created                   | 6866      |
| Threads_running                   | 1         |
| Uptime                            | 1368785   |
| Uptime_since_flush_status         | 1368785   |
+-----------------------------------+-----------+

说明:

Aborted_clients 由于客户没有正确关闭连接已经死掉,已经放弃的连接数量。 
Aborted_connects 尝试已经失败的MySQL服务器的连接的次数。 
Connections 试图连接MySQL服务器的次数。 
Created_tmp_tables 当执行语句时,已经被创造了的隐含临时表的数量。 
Delayed_insert_threads 正在使用的延迟插入处理器线程的数量。 
Delayed_writes 用INSERT DELAYED写入的行数。 
Delayed_errors 用INSERT DELAYED写入的发生某些错误(可能重复键值)的行数。 
Flush_commands 执行FLUSH命令的次数。 
Handler_delete 请求从一张表中删除行的次数。 
Handler_read_first 请求读入表中第一行的次数。 
Handler_read_key 请求数字基于键读行。 
Handler_read_next 请求读入基于一个键的一行的次数。 
Handler_read_rnd 请求读入基于一个固定位置的一行的次数。 
Handler_update 请求更新表中一行的次数。 
Handler_write 请求向表中插入一行的次数。 
Key_blocks_used 用于关键字缓存的块的数量。 
Key_read_requests 请求从缓存读入一个键值的次数。 
Key_reads 从磁盘物理读入一个键值的次数。 
Key_write_requests 请求将一个关键字块写入缓存次数。 
Key_writes 将一个键值块物理写入磁盘的次数。 
Max_used_connections 同时使用的连接的最大数目。 
Not_flushed_key_blocks 在键缓存中已经改变但是还没被清空到磁盘上的键块。 
Not_flushed_delayed_rows 在INSERT DELAY队列中等待写入的行的数量。 
Open_tables 打开表的数量。 
Open_files 打开文件的数量。 
Open_streams 打开流的数量(主要用于日志记载) 
Opened_tables 已经打开的表的数量。 
Questions 发往服务器的查询的数量。 
Slow_queries 要花超过long_query_time时间的查询数量。 
Threads_connected 当前打开的连接的数量。 
Threads_running 不在睡眠的线程数量。 
Uptime 服务器工作了多少秒。

(dracotianlong)
本站文章除注明转载外,均为本站原创或编译欢迎任何形式的转载,但请务必注明出处,尊重他人劳动,同学习共成长。转载请注明:文章转载自:罗索实验室 [http://www.rosoo.net/a/201501/17189.html]
本文出处:CSDN博客 作者:dracotianlong 原文
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
将本文分享到微信
织梦二维码生成器
推荐内容