Merge branch '5418-database-user-creation-not-working-on-mysql-8' into 'stable-3.1'

Resolve "Database user creation not working on MySQL 8"

Closes #5418

See merge request !1127
2 jobs for stable-3.1 in 8 minutes and 23 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Syntax
passed #6254
syntax:lint

00:08:13

passed #6255
syntax_diff:lint

00:00:10