Database Connection error

Discussion in 'ISPConfig 3 Priority Support' started by dgeho1, Sep 14, 2018.

  1. dgeho1

    dgeho1 Member

    Running apache2, wheezy, with php7 on most sites..(wordpress4.98) ispconfig 3.11.1
    I woke up this morning to heavy server utilization 40+ Usually runs .7 made no changes yesterday or last night
    was not able to determine the process hog.
    Have several wordpress sites that when I try to view gave me a "database connection error" with no content, when I try to /wp-admin I get
    Error establishing a database connection
    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost:3306. This could mean your host’s database server is down.
    I have verified the DB and username are correct via phpadmin, and mysql CLI.

    I have another WP site that runs fine, but it is on php 5.6.. if I switch it to php7 it fails in the same way.

    from the syslog (via Ispconfig) [INTERFACE]: PHP IDS Alert.Total impact: 5<br/> Affected tags: dt, id, lfi<br/> <br/> Variable: POST.fastcgi_php_version | Value: PHP 7.0:/opt/php-7.0/bin/php-cgi:/opt/php-7.0/lib<br/> Impact: 5 | Tags: dt, id, lfi<br/> Description: Detects specific directory and path traversal | Tags: dt, id, lfi | ID 11<br/> <br/>

    browsing the logs directly I see ;Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... ON DUPLICATE KEY UPDATE on a table with more than one UNIQUE KEY is unsafe Statement: INSERT INTO `wp_options` (`option_name`, `option_value`, `autoload`) VALUES ('_transient_timeout_jetpack_

    Sep 14 07:32:21 WebServer0 /etc/init.d/mysql[4230]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Sep 14 07:32:21 WebServer0 /etc/init.d/mysql[4230]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Sep 14 07:32:21 WebServer0 /etc/init.d/mysql[4230]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Sep 14 07:32:21 WebServer0 /etc/init.d/mysql[4230]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Sep 14 07:32:21 WebServer0 /etc/init.d/mysql[4230]:
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to find out why the mysql load is so high, might be a dos attack against one of your sites.

Share This Page