Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.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 wordpress中的数据库连接错误_Mysql_Wordpress - Fatal编程技术网

Mysql wordpress中的数据库连接错误

Mysql wordpress中的数据库连接错误,mysql,wordpress,Mysql,Wordpress,我的网站位于Wordpress上,托管在VPS服务器上。流量不大,但是数据库连接错误显示了很多次,然后我不得不重新启动MySQL 我已经检查了MySQL错误文件日志。这是日志的一部分 140310 01:13:26 mysqld_safe mysqld from pid file /var/lib/mysql/server.gosoftnep.com.pid ended 140310 01:13:26 mysqld_safe Starting mysqld daemon with databas

我的网站位于Wordpress上,托管在VPS服务器上。流量不大,但是数据库连接错误显示了很多次,然后我不得不重新启动MySQL

我已经检查了MySQL错误文件日志。这是日志的一部分

140310 01:13:26 mysqld_safe mysqld from pid file /var/lib/mysql/server.gosoftnep.com.pid ended
140310 01:13:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140310  1:13:26 [Note] Plugin 'FEDERATED' is disabled.
140310  1:13:26 InnoDB: The InnoDB memory heap is disabled
140310  1:13:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140310  1:13:26 InnoDB: Compressed tables use zlib 1.2.3
140310  1:13:26 InnoDB: Using Linux native AIO
140310  1:13:26 InnoDB: Initializing buffer pool, size = 128.0M
140310  1:13:26 InnoDB: Completed initialization of buffer pool
140310  1:13:26 InnoDB: highest supported file format is Barracuda.
140310  1:13:26  InnoDB: Waiting for the background threads to start
140310  1:13:27 InnoDB: 5.5.36 started; log sequence number 12082242998
140310  1:13:27 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140310  1:13:27 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140310  1:13:27 [Note] Server socket created on IP: '0.0.0.0'.
140310  1:13:27 [Note] Event Scheduler: Loaded 0 events
140310  1:13:27 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.36-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
140310 01:13:32 mysqld_safe A mysqld process already exists
140310  5:52:48 [Warning] IP address '58.118.152.8' could not be resolved: Temporary failure in name resolution
140310 12:27:37 mysqld_safe Number of processes running now: 0
140310 12:27:38 mysqld_safe mysqld restarted
140310 12:27:44 [Note] Plugin 'FEDERATED' is disabled.
140310 12:27:45 InnoDB: The InnoDB memory heap is disabled
140310 12:27:45 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140310 12:27:45 InnoDB: Compressed tables use zlib 1.2.3
140310 12:27:45 InnoDB: Using Linux native AIO
140310 12:27:47 InnoDB: Initializing buffer pool, size = 128.0M
140310 12:27:49 InnoDB: Completed initialization of buffer pool
140310 12:27:50 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 12354557593
140310 12:27:52  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...
InnoDB: Doing recovery: scanned up to log sequence number 12354588661
140310 12:28:05  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
140310 12:28:07  InnoDB: Waiting for the background threads to start
140310 12:28:08 InnoDB: 5.5.36 started; log sequence number 12354588661
140310 12:28:08 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140310 12:28:08 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140310 12:28:08 [Note] Server socket created on IP: '0.0.0.0'.
140310 12:28:12 [Note] Event Scheduler: Loaded 0 events
140310 12:28:12 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.36-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)
140311 11:51:59 [Warning] IP address '61.160.249.239' could not be resolved: Name or service not known
140312  9:23:21 [Warning] IP address '183.60.107.205' could not be resolved: Name or service not known
140313  0:33:47 [Warning] IP address '221.228.231.59' could not be resolved: Name or service not known
140313  7:33:05 [Warning] IP address '61.147.103.160' could not be resolved: Name or service not known
140313 20:42:42 [Warning] IP address '124.89.32.242' could not be resolved: Name or service not known
140313 23:33:38 mysqld_safe Number of processes running now: 0
140313 23:33:38 mysqld_safe mysqld restarted
140313 23:34:09 [Note] Plugin 'FEDERATED' is disabled.
140313 23:34:14 InnoDB: The InnoDB memory heap is disabled
140313 23:34:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140313 23:34:14 InnoDB: Compressed tables use zlib 1.2.3
140313 23:34:14 InnoDB: Using Linux native AIO
140313 23:34:17 InnoDB: Initializing buffer pool, size = 128.0M
140313 23:34:20 InnoDB: Completed initialization of buffer pool
140313 23:34:30 mysqld_safe mysqld from pid file /var/lib/mysql/server.gosoftnep.com.pid ended
140314 02:55:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
140314  2:55:10 [Note] Plugin 'FEDERATED' is disabled.
140314  2:55:10 InnoDB: The InnoDB memory heap is disabled
140314  2:55:10 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140314  2:55:10 InnoDB: Compressed tables use zlib 1.2.3
140314  2:55:10 InnoDB: Using Linux native AIO
140314  2:55:10 InnoDB: Initializing buffer pool, size = 128.0M
140314  2:55:10 InnoDB: Completed initialization of buffer pool
140314  2:55:10 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 14587500130
140314  2:55:10  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...
InnoDB: Doing recovery: scanned up to log sequence number 14587535674
140314  2:55:11  InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percents: 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 
InnoDB: Apply batch completed
140314  2:55:11  InnoDB: Waiting for the background threads to start
140314  2:55:12 InnoDB: 5.5.36 started; log sequence number 14587535674
140314  2:55:12 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
140314  2:55:12 [Note]   - '0.0.0.0' resolves to '0.0.0.0';
140314  2:55:12 [Note] Server socket created on IP: '0.0.0.0'.
140314  2:55:12 [Note] Event Scheduler: Loaded 0 events
140314  2:55:12 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.36-cll'  socket: '/var/lib/mysql/mysql.sock'  port: 3306  MySQL Community Server (GPL)

我对此一无所知。有谁能向我解释一下这个问题或建议一个解决方案吗?

看起来它崩溃了,必须执行数据恢复过程。它现在工作了吗?嗨,Ed Cattrell,是的,该站点正在工作,但是经常显示数据库连接错误,我必须重新启动mysql。我不知道为什么会这样。有什么建议吗?没有更多的信息,我不知道。该VPS是否承载其他站点?你的交通有多拥挤?此查询的结果是什么:
SELECT@@max\u connections
?这是VPS主机上唯一的站点,该站点上只有1到5个并发访问者。我已经运行了您提到的查询,“Array([0]=>151[@@max\u connections]=>151)”这是结果。该日志中有一些可疑的内容。例如,它尝试解析一组IP地址。这听起来像是有主/从或集群设置。你…吗?如果是,上面的日志是否来自Wordpress连接的实际机器?其他服务器上发生了什么?