Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/62.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MySQL执行不正确,导致崩溃_Mysql - Fatal编程技术网

MySQL执行不正确,导致崩溃

MySQL执行不正确,导致崩溃,mysql,Mysql,我的MySQL服务器有问题。它最近刚刚安装在我的托管服务器上,我已经使用WP引擎安装了第一个web MySQL服务未挂起。。它总是崩溃。 我用过 ./mysqltuner.pl 结果如下: [OK] Currently running supported MySQL version 5.5.44 [OK] Operating on 64-bit architecture -------- Storage Engine Statistics --------------------------

我的MySQL服务器有问题。它最近刚刚安装在我的托管服务器上,我已经使用WP引擎安装了第一个web

MySQL服务未挂起。。它总是崩溃。 我用过

./mysqltuner.pl
结果如下:

[OK] Currently running supported MySQL version 5.5.44
[OK] Operating on 64-bit architecture

-------- Storage Engine Statistics -------------------------------------------
[--] Status: +ARCHIVE +BLACKHOLE +CSV -FEDERATED +InnoDB +MRG_MYISAM
[--] Data in InnoDB tables: 18M (Tables: 19)
[!!] Total fragmented tables: 19

-------- Security Recommendations  -------------------------------------------
[!!] User '@centos65x64basic.localdomain' is an anonymous account.
[!!] User '@localhost' is an anonymous account.
[!!] User '@centos65x64basic.localdomain' has no password set.
[!!] User '@localhost' has no password set.
[!!] User '@centos65x64basic.localdomain' has user name as password.
[!!] User '@localhost' has user name as password.
[!!] There is not basic password file list !

-------- Performance Metrics -------------------------------------------------
[--] Up for: 11s (10 q [0.909 qps], 7 conn, TX: 10K, RX: 713)
[--] Reads / Writes: 100% / 0%
[--] Binary logging is disabled
[--] Total buffers: 176.0M global + 2.8M per thread (151 max threads)
[OK] Maximum reached memory usage: 591.3M (59% of installed RAM)
[OK] Maximum possible memory usage: 596.0M (59.82% of installed RAM)
[OK] Slow queries: 0% (0/10)
[OK] Highest usage of available connections: 0% (1/151)
[!!] Aborded connections: 14.29%  (1/7)
[!!] Key buffer used: 18.8% (3K used / 16K cache)
[!!] Key buffer size / total MyISAM indexes: 16.0K/97.0K
[!!] Query cache efficiency: 0.0% (0 cached / 4 selects)
[OK] Query cache prunes per day: 0
[OK] Temporary tables created on disk: 0% (0 on disk / 2 total)
[OK] Thread cache hit rate: 85% (1 created / 7 connections)
[OK] Table cache hit rate: 78% (26 open / 33 opened)
[OK] Open file limit used: 1% (18/1K)
[OK] Table locks acquired immediately: 100% (36 immediate / 36 locks)
[!!] Connections aborted: 14%

-------- InnoDB Metrics -----------------------------------------------------
[--] InnoDB is enabled.
[OK] InnoDB buffer pool / data size: 128.0M/18.6M
[OK] InnoDB buffer pool instances: 1
[!!] InnoDB Used buffer: 4.96% (406 used/ 8192 total)
[OK] InnoDB Read buffer efficiency: 93.67% (6018 hits/ 6425 total)
[!!] InnoDB Write buffer efficiency: 0.00% (0 hits/ 1 total)
[OK] InnoDB log waits: 0.00% (0 waits / 1 writes)

-------- Replication Metrics -------------------------------------------------
[--] No replication slave(s) for this server.
[--] This is a standalone server..

-------- Recommendations -----------------------------------------------------
General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Remove Anonymous User account - there is 2 Anonymous account.
    Set up a Password for user with the following SQL statement ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); )
    Set up a Secure Password for user@host ( SET PASSWORD FOR 'user'@'SpecificDNSorIp' = PASSWORD('secure_password'); )
    MySQL started within last 24 hours - recommendations may be inaccurate
    Enable the slow query log to troubleshoot bad queries
    Reduce or eliminate unclosed connexions and network issues
    Your applications are not closing MySQL connections properly
Variables to adjust:
    key_buffer_size (~ 3K)
    key_buffer_size (> 97.0K)
    query_cache_limit (> 128M, or use smaller result sets)
首先,我不确定这些建议是什么?(自从我运行MySQL以来,已经24小时了)

我不能满足这些建议,因为它们相互矛盾——你知道应该怎么做吗

此外。。 我的日志文件中有以下内容:

150720  5:12:33 [Note] /usr/libexec/mysqld: Normal shutdown

150720  5:12:33 [Note] Event Scheduler: Purging the queue. 0 events
150720  5:12:33  InnoDB: Starting shutdown...
150720  5:12:35  InnoDB: Shutdown completed; log sequence number 56874574
150720  5:12:35 [Note] /usr/libexec/mysqld: Shutdown complete

150720 05:12:35 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
150720 05:12:35 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
150720  5:12:35 [Note] /usr/libexec/mysqld (mysqld 5.5.44) starting as process 2785 ...
150720  5:12:35 [Note] Plugin 'FEDERATED' is disabled.
150720  5:12:35 InnoDB: The InnoDB memory heap is disabled
150720  5:12:35 InnoDB: Mutexes and rw_locks use GCC atomic builtins
150720  5:12:35 InnoDB: Compressed tables use zlib 1.2.3
150720  5:12:35 InnoDB: Using Linux native AIO
150720  5:12:35 InnoDB: Initializing buffer pool, size = 128.0M
150720  5:12:35 InnoDB: Completed initialization of buffer pool
150720  5:12:35 InnoDB: highest supported file format is Barracuda.
150720  5:12:35  InnoDB: Waiting for the background threads to start
150720  5:12:36 InnoDB: 5.5.44 started; log sequence number 56874574
150720  5:12:36 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
150720  5:12:36 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
150720  5:12:36 [Note] Server socket created on IP: '0.0.0.0'.
150720  5:12:36 [Note] Event Scheduler: Loaded 0 events
150720  5:12:36 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.44'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL) by Remi
一切正常吗? 为什么它在IP上显示0.0.0.0


请帮助我提高MySQL的性能,这样它就不会在我身上崩溃:)

您认为它在哪里崩溃,以及如何崩溃?你的应用程序有错误吗?日志中有什么内容吗?我想你是在使用廉价的主机托管计划。99%的内存不足,需要设置交换。一两天后,我在我的WP页面上出现错误,说与DB的连接丢失了。然后我可以重新启动MySQL服务,一切正常。但是,在第二次与DB建立错误连接之后——我不能再重新启动MySQL服务了——只能重新启动并修复它。有什么想法吗?谢谢。我刚刚在我的托管服务器上完成了交换设置:)正在考虑这个问题,我有1 GB的交换空间-足够吗?我有CentOS 6.5服务器。“我不确定这些建议是什么?”关于它们有什么不清楚的地方?你认为它在哪里崩溃,又是如何崩溃的?你的应用程序有错误吗?日志中有什么内容吗?我想你是在使用廉价的主机托管计划。99%的内存不足,需要设置交换。一两天后,我在我的WP页面上出现错误,说与DB的连接丢失了。然后我可以重新启动MySQL服务,一切正常。但是,在第二次与DB建立错误连接之后——我不能再重新启动MySQL服务了——只能重新启动并修复它。有什么想法吗?谢谢。我刚刚在我的托管服务器上完成了交换设置:)正在考虑这个问题,我有1 GB的交换空间-足够吗?我有CentOS 6.5服务器。“我不确定这些建议是什么?”有什么不清楚的?