• Hi,

    I’m hosting files and db different servers. Wp installed successfully but not able to access dashboard…. and i received
    Warning: mysqli_query(): MySQL server has gone away in C:\Apache24\htdocs\pms\serverdetails\wp-includes\wp-db.php on line 1877

    can any one help me.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Might want to look at the wp-config.php file and make sure the following is correct for the MySQL server:

    
    // ** MySQL settings ** //
    define('DB_NAME', '(DB name)');    // The name of the database
    define('DB_USER', '(DB user)');     // Your MySQL username
    define('DB_PASSWORD', '(DB password)'); // ...and password
    define('DB_HOST', '(DB Host)');    // 99% chance you won't need to change this value
    

    But, if that was wrong then none of the blog would work. From your post it seems to imply that only the admin portion doesn’t work? In any case, the DB_HOST needs to be the IP address or name of the MySQL server and not the one where the files are hosted, if they are different.

    Thread Starter Anandaraj Balu

    (@anand000)

    Thanks for your reply,

    I used IP only at DB HOST, I dont know what was issue…

    The issue was (is still maybe?) either a networking problem between the two computers, or that one of them was overloaded and couldn’t make the connection correctly.

    That’s what the error of…

    MySQL server has gone away

    means. It’s something that you will need to check with your server techs about so they can look at server logs to try and diagnose the issue.

    Thread Starter Anandaraj Balu

    (@anand000)

    Great reply,

    I have tried connection with php mysqli, no drop between servers.

    Now i installed new wordpress instance and i able login to dashboard but i got following on dashboard.

    Warning: mysqli_query(): MySQL server has gone away in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php on line 1877
    
    Warning: mysqli_query(): Error reading result set's header in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php on line 1877
    
    Warning: mysqli_query(): MySQL server has gone away in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php on line 1877
    
    Warning: mysqli_query(): Error reading result set's header in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php on line 1877

    On dashboard not able to upload, delete theme and plugins.

    Not able to create menus.

    What errors are showing in your servers log files?

    Thread Starter Anandaraj Balu

    (@anand000)

    Following errors in log file.

    PHP Warning:  mysqli_query(): MySQL server has gone away in C:\\Apache24\\htdocs\\wordpress\\wp-includes\\wp-db.php on line 1877, referer: 
    

    You’ll need to look at the MySQL logs, and probably the networking logs, to see the errors there. All that the Apache )or web server) error logs show is what we already know.

    Thread Starter Anandaraj Balu

    (@anand000)

    I dont have error log in MYSQL and i need to check nw logs.

    thanks for your valuable replies, Great!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘mysqli_query()’ is closed to new replies.