Skip to main content
Home
GrN.dk

Main navigation

  • Articles
  • Cases
  • Services
  • Your Digital Project Manager
  • About Greg Nowak
  • Image Gallery
  • Contact
User account menu
  • Log in

Join my community / free newsletter — sign up here

Breadcrumb

  1. Home

Drupal 7 on MySQL 8: Fixing the NO_AUTO_CREATE_USER Error

Illustrated infographic summarizing: Drupal 7 on MySQL 8: Fixing the NO_AUTO_CREATE_USER Error

By Greg Nowak. Last updated 2026-07-15.

A Drupal 7 site that fails after a move to MySQL 8 can produce an intimidating SQLSTATE[42000] message about NO_AUTO_CREATE_USER. The immediate cause is usually straightforward: Drupal is asking MySQL to enable an SQL mode that the database no longer recognises.

The technical fix can be small. The operational decision is larger. In 2026, Drupal 7 is no longer community supported, so this incident should produce two outcomes: a controlled recovery now and a documented decision about how long the platform should remain in service.

What the error actually means

MySQL removed NO_AUTO_CREATE_USER in version 8.0.11. Its upgrade documentation advises removing the value from server configuration and older dump files as well as application-generated settings.

Drupal addressed this as part of its wider MySQL 8 compatibility work in Drupal 7.76. That work also added quoting for identifiers such as the system table, whose name conflicts with MySQL 8 syntax. This is why deleting one string from a patched core file is an incomplete solution: later Drupal 7 releases contain related compatibility changes that a one-line edit does not provide.

Diagnose before changing production

Start by confirming the versions that are actually running. Do not rely only on a hosting dashboard or an old handover document. Check the deployed code and query the database connection used by the application.

grep "define('VERSION'" includes/bootstrap.inc
SELECT VERSION();
SELECT @@SESSION.sql_mode;
SELECT @@GLOBAL.sql_mode;

Before deploying a change, take a fresh database backup, retain the current code release and confirm that somebody can perform the rollback. A backup that has never been restored is reassurance, not yet a recovery plan.

What you find Likely explanation Practical next action
Drupal is older than 7.76 Core predates Drupal’s MySQL 8 compatibility work Test an update using the final community release or the baseline supplied by your extended-support provider
Drupal is exactly 7.76 It includes MySQL 8 support but also introduced a table-prefix regression Do not stop at 7.76; review the 7.77 hotfix and move to an appropriate later baseline
Current legacy core still sends the removed mode A proxy or managed service may be reporting the server version incorrectly Confirm the reported version, then consider a targeted connection override
The failure occurs during server startup or database restore An option file, deployment script or older dump may still contain the mode Remove the obsolete value at its source rather than changing Drupal alone
A quick decision matrix for separating a Drupal core problem from an infrastructure problem.

Use the final community release as the minimum reference point

Drupal 7.76 introduced MySQL 8 support, and 7.77 immediately followed with a hotfix for table prefixes containing dots. The final community release was Drupal 7.103, published in December 2024.

That does not make 7.103 supported today. It makes it a more credible starting point than a much older release with an isolated community patch. If the site has commercial extended support, follow that provider’s maintained distribution and update process instead. In either case, compare custom core modifications before replacing files; old Drupal estates often contain undocumented edits.

When the settings.php override is justified

If the deployed core already contains the MySQL 8 work but Drupal still builds the wrong mode, investigate how the server version reaches PHP. Drupal’s change record notes reports involving managed services and proxies that returned misleading version information.

After confirming that situation, a per-connection override in settings.php is a reasonable containment measure:

$databases['default']['default']['init_commands']['sql_mode'] =
  'SET SESSION sql_mode="REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO"';

Adding the named command avoids replacing unrelated entries if init_commands already exists. Keep the override in version-controlled configuration, comment on why it is necessary and record which infrastructure behaviour it compensates for. If the provider later corrects its version reporting, reassess the workaround instead of letting it become permanent folklore.

Do not disable MySQL identifier quoting as a routine MySQL 8 fix. Quoting was part of Drupal’s compatibility work. The old empty-string workaround documented by Drupal was intended for particular problems on older MySQL installations, not as a default setting for MySQL 8.

Test the business paths, not just the homepage

A successful homepage request proves only that Drupal can bootstrap. The release should also cover login, content editing, cache clearing, cron, search and file handling. Add the site’s revenue or service-critical journeys: checkout, lead forms, account creation, API synchronisation and scheduled exports.

Capture the deployed core version, database version, effective session mode, configuration change, test results and rollback location in the incident record. That gives the next engineer something better than an error screenshot and prevents the same investigation from being repeated.

Treat recovery and migration as separate workstreams

Drupal 7 reached end of life on January 5, 2025. Community releases, security coverage and compatibility updates have ended. A stable MySQL connection therefore solves today’s outage, but it does not restore an ongoing support path.

Once service is stable, decide who owns the legacy risk, whether extended support is required and when migration discovery will begin. That discovery should inventory custom modules, integrations, content types, editorial workflows and data-retention requirements before anyone estimates a rebuild.

If you need a second pair of eyes, Greg can help separate the immediate Drupal recovery from the migration decision and turn both into a workable delivery plan. Talk to Greg about the next step.

Related on GrN.dk

  • NGINX 1.30 changed upstream connection reuse by default: what to check before you upgrade
  • Fix the HTTPRL Network Configuration Error in Drupal 7
  • MariaDB 10.6 EOL: quiet CMS hosting debt needs a real upgrade plan before July 2026

Need help with this kind of work?

Discuss your Drupal recovery plan Get in touch with Greg.

Sources

  • MySQL 8 Support on Drupal 7
  • Drupal 7.77 release notes
  • Drupal 7.103 release notes
  • Drupal 7 has reached end of life
  • Changes in MySQL 8.0
Last modified
2026-08-12

Tags

  • Drupal
  • Drupal 7
  • MySQL 8
  • Legacy website support
  • Website migration

Review Greg on Google

Greg Nowak Google Reviews

 

Written recommendations from Trafik og Veje, Aarhus Municipality (2011) and AgroTech (2010) — read them on LinkedIn.

Illustrated infographic summarizing: Does Your AI Chatbot Clearly Identify Itself?
Does Your AI Chatbot Clearly Identify Itself?
2026-08-25

The EU’s transparency requirements for AI chatbots now apply. Here is how to make your bot’s identity clear, limit its system access and provide a genuine route to a member of staff.

Illustrated infographic summarizing: Should publishers add Google’s new Preferred Sources button?
Should publishers add Google’s new Preferred Sources button?
2026-08-24

Google’s Preferred Sources button is worth a controlled test for eligible publishers, with careful choices around placement, performance and measurement.

Illustrated infographic summarizing: Search Console Can See TikTok Now. Your Reporting Has to Catch Up
Search Console Can See TikTok Now. Your Reporting Has to Catch Up
2026-08-23

Google can now report how social profiles appear in Search. Here is how to measure cross-channel discovery without mistaking visibility for business results.

Illustrated infographic summarizing: Your AI workflow has logs. Can they explain one bad decision?
Your AI workflow has logs. Can they explain one bad decision?
2026-08-22

Logs can show that every service worked while leaving a bad AI decision unexplained. See how connected traces and careful redaction close the gap.

Illustrated infographic summarizing: Security Questionnaires Eat Into Selling Time—Let AI Find the Evidence
Security Questionnaires Eat Into Selling Time—Let AI Find the Evidence
2026-08-21

NIS 2 is generating more supplier questionnaires. A controlled AI assistant can find approved answers and sources—and route uncertain cases for review.

Illustrated infographic summarizing: Locked out of your Apple developer account? Fix it before October 1
Locked out of your Apple developer account? Fix it before October 1
2026-08-20

Apple's updated developer agreement must be accepted by October 1, 2026, and many small app owners cannot even log in. Here is where Apple's two-factor codes really go, and how to fix your access before the deadline.

Illustrated infographic summarizing: Cloudflare Workflows Now Charges by the Step—Price the Outcome
Cloudflare Workflows Now Charges by the Step—Price the Outcome
2026-08-20

Cloudflare Workflows now bills paid plans for steps and stored state. Here is how to track cost per completed outcome without weakening reliability.

Illustrated infographic summarizing: Google’s AI Search Toggle Is a Publishing Decision, Not an SEO Setting
Google’s AI Search Toggle Is a Publishing Decision, Not an SEO Setting
2026-08-19

Google’s AI Search toggle forces a commercial choice about visibility, attribution and content use. Here’s how to make that choice responsibly.

Illustrated infographic summarizing: From Supplier Invoice to Bookkeeping: AI with a Control Checkpoint
From Supplier Invoice to Bookkeeping: AI with a Control Checkpoint
2026-08-18

AI can reduce the work involved in processing supplier invoices, but reliable bookkeeping requires validation, duplicate checks, approval and a clear audit trail.

Illustrated infographic summarizing: Nginx 1.30 Changed the Upstream Defaults—Test Before You Upgrade
Nginx 1.30 Changed the Upstream Defaults—Test Before You Upgrade
2026-08-17

Nginx 1.30 defaults upstream proxying to HTTP/1.1 with keepalive enabled. Here is what to inspect, model and test before upgrading.

More articles

Built by AI — available for your business. The daily articles on this site are researched, written and illustrated by an autonomous AI pipeline. At nowa.dk I install the same kind of AI automation in businesses at fixed prices — site in Danish, English version here, and web/marketing agencies have a dedicated page.

RSS feed

Footer

  • All articles
  • Contact

GrN.dk — AI automation, web platforms, web optimization, data handling and logistics.

© 2026 GrN.dk · LinkedIn · Contact · AI automation in Danish: nowa.dk

Behind GrN.dk: Individual Entrepreneur Codecrafter · Tax ID 305669096 · Bakhtrioni St. 22, 0194 Tbilisi, Georgia · official business register