Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/69.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.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,多站点mysql多次崩溃 AH01071: Got error 'PHP message: PHP Warning: mysqli_query(): MySQL server has gone away in /home/xxxxxxxx/www/wp-includes/wp-db.php on line 1925 PHP message: PHP Warning: mysqli_query(): Error reading result set's header in /home/xxxx

多站点mysql多次崩溃

AH01071: Got error 'PHP message: PHP Warning:  mysqli_query(): MySQL server has gone away in /home/xxxxxxxx/www/wp-includes/wp-db.php on line 1925
PHP message: PHP Warning:  mysqli_query(): Error reading result set's header in /home/xxxxxxxx/www/wp-includes/wp-db.php on line 1925
PHP message: PHP Warning:  mysqli_real_connect(): (HY000/2002): Connection refused in /home/xxxxxxxx/www/wp-includes/wp-db.php on line 1531'
我在日志中没有发现任何可疑的东西

2020-02-06  6:18:28 140544489782656 [Note] Using unique option prefix 'myisam-recover' is error-prone and can break in the future. Please use the full name 'myisam-recover-options' instead.
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: The InnoDB memory heap is disabled
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Compressed tables use zlib 1.2.8
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Using Linux native AIO
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Using SSE crc32 instructions
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Initializing buffer pool, size = 2.9G
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Completed initialization of buffer pool
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Highest supported file format is Barracuda.
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Starting crash recovery from checkpoint LSN=795526465769
2020-02-06  6:18:28 140544489782656 [Note] InnoDB: Restoring possible half-written data pages from the doublewrite buffer...
2020-02-06  6:18:29 140544489782656 [Note] InnoDB: Starting final batch to recover 11 pages from redo log
InnoDB: Last MySQL binlog file position 0 67151849, file name ./mysql-bin.007416
2020-02-06  6:18:29 140544489782656 [Note] InnoDB: 128 rollback segment(s) are active.
2020-02-06  6:18:29 140544489782656 [Note] InnoDB: Waiting for purge to start
2020-02-06  6:18:29 140544489782656 [Note] InnoDB:  Percona XtraDB (http://www.percona.com) 5.6.36-82.1 started; log sequence number 795526513845
2020-02-06  6:18:30 140539223574272 [Note] InnoDB: Dumping buffer pool(s) not yet started
2020-02-06  6:18:30 140544489782656 [Note] Plugin 'FEEDBACK' is disabled.
2020-02-06  6:18:30 140544489782656 [Note] Recovering after a crash using mysql-bin
2020-02-06  6:18:30 140544489782656 [Note] Starting crash recovery...
2020-02-06  6:18:30 140544489782656 [Note] Crash recovery finished.
2020-02-06  6:18:30 140544489782656 [Note] Server socket created on IP: '::'.
2020-02-06  6:18:30 140544489782656 [Note] /usr/sbin/mysqld: ready for connections.
Version: '10.1.26-MariaDB-0+deb9u1'  socket: '/var/run/mysqld/mysqld.sock'  port: 3306  Debian 9.1

感谢您的帮助。

这是怎么发生的?是否更改了wordpress的前缀、mysql或php版本的更改或服务器的任何更改?也许这些就是问题所在。请提供相关信息。其原因是数据库损坏

  • 找到wp-db.php并添加此行$this->query(“设置会话等待超时=300”);$this->ready=true之后
  • 转到wp-config.php并添加define('wp\u ALLOW\u REPAIR',true)
  • 转到并单击修复数据库
  • 或者只是上传旧的备份