You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Error: WordPress 6.5 requires MySQL 5.5.5 or higher #62
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
After digging a bit, I found the following function in wp-includes/class-wpdb.php
publicfunctioncheck_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. */returnnewWP_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.
publicfunctioncheck_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 ) ); */returntrue;
}
}
Activity
abhijitnandy commentedon Apr 6, 2024
After digging a bit, I found the following function in
wp-includes/class-wpdb.phpChanging it so that it just returns
trueseems to solve the problem.