Skip to content

Error: WordPress 6.5 requires MySQL 5.5.5 or higher #62

Closed

Description

@abhijitnandy

I've been using this plugin for many years now at my website. But Wordpress 6.5 came out a few days ago and started giving me this new error which I've never seen before.

I decided to set up a separate instance locally with a blank Wordpress site after adding the db.php file. The initial questions go through, but after asking all the questions when I click on 'Install Wordpress' I get this error -

Error: WordPress 6.5 requires MySQL 5.5.5 or higher

Any suggestions would help

Activity

  1. abhijitnandy commented on Apr 6, 2024

    @abhijitnandy
    Author

    After digging a bit, I found the following function in wp-includes/class-wpdb.php

    	public function check_database_version() {
    		global $wp_version, $required_mysql_version;
    		// Make sure the server has the required MySQL version.
    		if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) {
    			/* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */
    			return new WP_Error( 'database_version', sprintf( __( '<strong>Error:</strong> WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) );
    		}
    	}

    Changing it so that it just returns true seems to solve the problem.

    	public function check_database_version() {
    		global $wp_version, $required_mysql_version;
    		// Make sure the server has the required MySQL version.
    		if ( version_compare( $this->db_version(), $required_mysql_version, '<' ) ) {
    			/* translators: 1: WordPress version number, 2: Minimum required MySQL version number. */
    			/* return new WP_Error( 'database_version', sprintf( __( '<strong>Error:</strong> WordPress %1$s requires MySQL %2$s or higher' ), $wp_version, $required_mysql_version ) ); */
    			return true;
    		}
    	}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions