Magento 2 setup:upgrade fails privilege check on TiDB
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
Description:
Magento 2's bin/magento setup:upgrade fails with "Database user does not have enough privileges" on TiDB, despite GRANT ALL PRIVILEGES being applied. Magento's DbSchemaReader queries INFORMATION_SCHEMA.SCHEMA_PRIVILEGES and USER_PRIVILEGES to validate requirements before altering tables.
Environment:
TiDB Version: v8.5.3-serverless
Magento Version: 2.4.8
Steps to Reproduce:
CREATE DATABASE magento;
GRANT ALL PRIVILEGES ON magento.* TO 'magento_user'@'%';
FLUSH PRIVILEGES;
Run php bin/magento setup:upgrade
Actual Result:
Error: Database user does not have enough privileges... (list of 16 privileges).
Request:
Please verify if TiDB’s INFORMATION_SCHEMA returns privilege strings in a format (case/spacing) that differs from MySQL 8.0, causing Magento's regex parser to fail.
Contributor guide
Research direction
Reproduce the failure with TiDB v8.5.3-serverless using the listed GRANT statements, then inspect the INFORMATION_SCHEMA privilege results consumed by Magento's DbSchemaReader. Compare their format with MySQL 8.0 and determine what must change for bin/magento setup:upgrade to pass its privilege check.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100