Troubleshooting
Old Drupal, conflict with the system table in MySQL 8
Withdrawn procedure. Do not rename the
systemtable or add an isolated prefix in production. Drupal 6 and Drupal 7 are no longer supported, and a partial change can break core or module queries.
MySQL 8 made SYSTEM a reserved word. A generic 1064 error does not prove that this is the cause: keep the full query and confirm that it fails precisely when referring to system without escaping.
Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds
Drupal 7.76 added support for MySQL 8 and escaping of reserved names. The $db_prefix setting shown in the old procedure belonged to Drupal 6; Drupal 7 uses prefix inside $databases['default']['default']. Neither of those branches should be published again as a permanent site.
Safe recovery
- Isolate the installation and create verified backups of files and database.
- If it is Drupal 7 earlier than 7.76, update only an isolated copy to the latest Drupal 7 version to regain read compatibility with MySQL 8.
- If it is Drupal 6, use a database compatible with that version in the recovery environment; do not expose it to the Internet.
- Migrate the data to a maintained version of Drupal and check users, content, files, URLs and modules before publishing.
See the official announcement of MySQL 8 support in Drupal 7.76. If a module's direct query still does not escape the table, replace or fix that module in the clone; do not rename a core table to hide the symptom.
After regaining read access
Check counts, users, files and content before exporting to the destination. A query working again does not prove that every module is compatible with MySQL 8, or that the old branch is secure.
Keep the URLs that have traffic or links and prepare their equivalents on the new site. If there are custom SQL queries, list their differences and replace the ones that depend on old behaviour during the migration.
You may also find useful
- SQLSTATE 2026 error when installing or updating PrestaShop Diagnose the SSL connection to MySQL that prevents Doctrine from querying the server version, withou...
- Corrupted tables in a MySQL database Confirm a table's error and engine before repairing it, keep a backup and avoid running REPAIR TABLE...
- Why cPanel and phpMyAdmin show different sizes for a database Explains why cPanel and phpMyAdmin calculate different sizes, how to find the large tables and when...
- Error "Argument X passed OrderProductForViewing must be of the type string" Identify the exact argument and row that deliver NULL when viewing a PrestaShop order, without bulk-...
Something wrong or out of date? Tell us and we will review it.