Backport from change made in D8 parent issue:
#2473301: Raise MySQL requirement to 5.5.3

Currently Drupal requires MySQL 5.1.21 but we should increase that requirement to at least 5.5.3 (released in 03/2010) in order to be able to use utf8mb4 encoding by default. However, to also force a more secure (and mature) 5.5 version, @crell advocated to raise it even further to 5.5.37, released on 2014-03-27 and present in most current Linux distros.

See
#1314214: MySQL driver does not support full UTF-8 (emojis, asian symbols, mathematical symbols)

Proposed resolution

Instead of only increasing the minimum version of MySQL it was decided that we better check for the feature in question to be available by doing a "set names utf8mtb4". This is more self explaining and allows for the fact that the different databases that this driver supports might have added this feature in different versions. Might have as according to comment #32, the feature divergence between MySql and MariaDb only started as of version 5.6. so in the future a pure version check might prove not usable.

Remaining tasks

review backport patch

Disruption

Not disruptive as major commonly used linux installs support 5.5

Comments

joseph.olstad created an issue. See original summary.

joseph.olstad’s picture

StatusFileSize
new2.12 KB
joseph.olstad’s picture

Issue summary: View changes
joseph.olstad’s picture

Upon closer review, the patch looks good to me, and issue was already RTBC in parent issue ***EDIT***I will follow up with another patch to fix the install.txt. Took out two lines postgresql and sqlite by accident

joseph.olstad’s picture

Issue tags: +Drupal 7.60 target
David_Rothstein’s picture

I'm not sure what benefit we'd get from this? It would prevent new sites from being installed on the older version, but what would happen to existing sites that already use the older version? (We don't want to break those, and this patch might not do that directly but if we made any other changes that assumed the newer version then it would.)

I haven't followed the issue too closely, but I think the suggestion for "backporting" it was something other than actually changing the minimum required version: https://www.drupal.org/node/2473301#comment-9858035

joseph.olstad’s picture

David, just trying to make D7 support easier. This would only prevent NEW installations from being installed on < 5.5.3 and would not break current installed sites.

It is very unlikely that someone would want to perform a fresh installation of D7.60 onto an operating system from 2010 or older. This would give them added incentive to upgrade and will make it easier for us to support Drupal as we will be avoiding obscure issues that have long since been resolved with newer versions of mysql >= 5.5.3.

as mentioned previously, any currently supported distribution of Linux is using at least version 5.5.3 or newer.

and acquia dev desktop is newer than 5.5.3 as well.

In this case, I'd say its best to move forward with this. It also will give some institutions/ people added incentive to upgrade in the rare case that they are on an ancient operating system and ancient mysql version.

While we're at it, we should also prevent new installations of Drupal on php 5.3.

joseph.olstad’s picture

Status: Needs review » Closed (works as designed)

Maybe not so important, either way.

David_Rothstein’s picture

Yeah, since we're not changing anything for existing sites, I think there's not much benefit in trying to make this a requirement in the code. Could definitely consider making it the minimum recommended version (e.g. in the documentation at https://www.drupal.org/docs/7/system-requirements/overview and within) though.

joseph.olstad’s picture

Status: Closed (works as designed) » Active

Yes I'm up for changing the minimum recommended version of mariadb/mysql/persona to 5.5.3 or higher. However I do not have access to change that document.

stefan.r’s picture

Title: D7 Raise MySQL requirement to 5.5.3 » D7 Raise MySQL recommended version to 5.5.3
Issue tags: -Drupal 7.60 target
stefan.r’s picture

Just to be clear, why exactly would we be recommending 5.5.3 or higher?

joseph.olstad’s picture

Answer:
To use a database server that supports 'utf8mb4 character encoding, such as MySQL/MariaDB/Persona versions 5.5.3 and up.

Red Hat 7 /CentOS 7 which is very very conservative in their default packaging included by default MariaDB version 5.5.3 (currently with security patches it's actually at 5.5.52).

To find a major Linux OS that proposes by default a version older than that you'd have to go back to 2010-11-09 when Red Hat 6 was released, and this was prior to the release of Drupal 7.

joseph.olstad’s picture

I'd say that for the "'60th" release of Drupal 7, now in 2017, it'd be safe to recommend mysql 5.5.3 or higher. (actually 5.5.52 is probably a safer bet as that is what the security release proposed by Centos 7 / Red Hat EL 7.

Most now would be putting new installations of Drupal on something like Ubuntu 16.04 LTS server which includes by default PHP 7.0 and mariadb version 10.0.29. This is actually something very common in VPS type solutions. I've got a couple of Ubuntu 16.04 LTS servers just itching to have Drupal installed.

joseph.olstad’s picture

so really, we should probably actually be recommending as a minimum 5.5.52 , as this is the latest and most secure bug fixed version of 5.5.x

David_Rothstein’s picture

Since Drupal 8 requires "MySQL 5.5.3/MariaDB 5.5.20/Percona Server 5.5.8 or higher" and I can't find anything that specifically recommends anything newer than that, I would say the Drupal 7 recommendation shouldn't be any higher than that either (at least at this point). If the goal is to change the Drupal 8 recommendations too, then maybe.

joseph.olstad’s picture

There is a difference between a minimum for compatibility, and a minimum recommended.

No one should be running service pack 1 windows XP unless they're just looking to play some video game and not connect to the internet, and if anyone recommends windows xp as a minimum it should be service pack 3 with all the security patches .

Similarly recommending 5.5.3 is saying, ok, 5.5.3 is the minimum, but we're not recommending you get the patched version of 5.5.x, we recommend the unpatched version that has several known issues , but no don't bother getting the patched version because this is the minimum recommended.

So basically, what I'm saying is, there is a difference between the minimum "fully compatible" version and the minimum recommended version.

I'd say, yes, 5.5.3 is the minimum version for D8, but the minimum recommended version would be 5.5.52, meaning , recommend the latest patched version of 5.5.x .

I'd say 5.5.3 is the minimum 'fully compatible' version , but 5.5.52 would be a minimum "recommended" version with an asterix * saying, or newer 5.5.x series or current 5.6.x or current 5.7.x , so on and so forth.

David_Rothstein’s picture

Alright, makes sense - so it sounds like you want to propose adding a recommended minimum for Drupal 8 too then.

joseph.olstad’s picture

Ya for sure D8 as well.

so minimum for full compatibility: 5.5.3
and minimum recommended: 5.5.52 (or most up-to-date version of 5.5.x)

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.