• I updated to 4.5 this morning and the site is working fine, but im noticing a huge amount of errors in my php error log. Every time a page is loaded i get the following error

    PHP Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50541 Library:50628 in …../wp-includes/wp-db.php on line 1515

    What has happened here? It seems as though this is typically caused by an issue with the version of php and sql installed on a server. Nothing has changed on the server so i dont know how this has happened.

    I have a few other wordpress sites on the same server that i have not updated yet. None of these are throwing this error

Viewing 15 replies - 1 through 15 (of 15 total)
  • I m facing the same problem and now cannot log in

    Thread Starter nerdburglars

    (@nerdburglars)

    Here is the lazy fix for the problem. It at least stops the log errors. Would still like to know why this is happening though.

    $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );

    I am seeing a error (Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50536 Library:50629 in /home/bcauzco/public_html/extranet/wp-includes/wp-db.php on line 1515) at this site: https://bcauz.com/extranet/. I’ve only tested it on a couple of sites on this server and they were also affected. I tried nerdburglars fix and saw no change. I have tried it with no plugins running and on alternate WordPress themes and got the same result. We are running MySQL 5.6.29 on our server. I suspect it is a MySQL version thing, but would appreciate comments.

    Having the same issue. thanks for the code hack but need to deal with this properly.

    What are the implications of making that change on the function of the site?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Try adding this to your wp-config:

    define('WP_USE_EXT_MYSQL', true);

    I am also facing same issue after upgrading to WordPress 4.5. Tried using Ipstenu’s solution (adding adding “define(‘WP_USE_EXT_MYSQL’, true)” to wp-config) it did not work.
    Error : Headers and client library minor version mismatch. Headers:50546 Library:50627
    /wp-includes/wp-db.php on line 1515
    Can some one please help?

    I’m facing the same issue. Not working even after trying to remove blank line from end of the file wp-db.php. In fact the error is on line 1515.

    $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );

    This error seems to be something to do with mysql_connect.

    Any help on this pls.

    I did attempt a variation of nerdbuglars’ fix by grabbing line by replacing line 1515 with code from line 151 of version 4.4.2 and it solved my problem.

    if ( WP_DEBUG ) {
    				$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    			} else {
    				$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    			}

    hello, so all what should i do is to replace this in wp-db.php on line 1515:

    $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );

    to this:

    if ( WP_DEBUG ) {
    				$this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    			} else {
    				$this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $new_link, $client_flags );
    			}

    right?

    it wooooorks!!!!
    thank you guys

    Same problem of my website resolved when i raised ticket hosting service provider. Following was a response from service provider :

    “On checking, we could see that your website is running php version 5.2.

    we have switched php version from 5.2 to latest version 5.4 which has fixed the issue

    However, you can use PHP versions from version 5.3 to 5.6

    Directions: Login to cpanel>>Software and services>>Select Php version”

    I had the same issue, and tried to “fix it” but made it worst. I follow abhany.sonak advice and contacted my hosting service provider. The updated my php version and problem solved.

    I had the same issue, and could not login to my site. Based on some other threads I found regarding database issues and recompiling PHP, I decided to run the MariaDB conversion again. I also decided to upgrade to 10.1 from 10.0.
    That solved my problem.

    I am facing same issue.
    Anyone please let me know how can I fix it.

    Warning: mysql_connect(): Headers and client library minor version mismatch. Headers:50542 Library:50630 in /home/abc/public_html/wp-includes/wp-db.php on line 1515

    Notice: wpdb::escape is deprecated since version 3.6! Use wpdb::prepare() or esc_sql() instead. in /home/abc/public_html/wp-includes/functions.php on line 3667

    Notice: Undefined index: action in /home/abc/public_html/wp-content/plugins/wp-filemanager/wp-filemanager.php on line 129

    Strict Standards: Declaration of My_Walker_Nav_Menu::start_lvl() should be compatible with Walker_Nav_Menu::start_lvl(&$output, $depth = 0, $args = Array) in /home/abc/public_html/wp-content/themes/abc/functions.php on line 1129

    Warning: Cannot modify header information – headers already sent by (output started at /home/abc/public_html/wp-includes/wp-db.php:1515) in /home/abc/public_html/wp-includes/pluggable.php on line 1171

    I decided to run the MariaDB conversion again. I also decided to upgrade to 10.1 from 10.0.
    That solved my problem.

    I use MariaDB but I have no clue how to run a MariaDB conversion or what exactly that even means. Can anyone help me out with this?

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Headers and client library minor version mismatch after 4.5 update’ is closed to new replies.