Description
Preconditions and environment
This is the same issue as #33822 , that was originally raised by @sych74, commented by @siliconalchemy and looked into by @engcom-Echo and was closed without resolution.
- Magento version: 2.4.7p2
- Ubuntu 24.04
- MySQL Galera Percona XtraDB 8.0
- PHP 8.3
Steps to reproduce
Prepare database:
mysql -u root -p
CREATE DATABASE magentodb;
CREATE USER 'magento'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL ON `magentodb`.* TO 'magento'@'localhost';
CREATE USER 'magento'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL ON `magentodb`.* TO 'magento'@'%';
EXIT
Install Magento prequisites- database, PHP, Composer, RabbitMQ, Redis, Elasticsearch
Download Magento Community repository:
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition=2.4.7-p2 /var/www/html/magento
Set permissions:
cd /var/www/html/magento
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod -Rf 777 var
chmod -Rf 777 pub/static
chmod -Rf 777 pub/media
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chmod -Rf 775 bin
Install Magento
php bin/magento setup:install --base-url=<url> --db-host=ip:port --db-name=magentodb --db-user="magento" --db-password=<db password> --admin-firstname="xx" --admin-lastname="yy" --admin-email="[email protected]" --admin-user="[email protected]" --admin-password="Testing123%567" --use-rewrites=1 --backend-frontname="admin" --db-prefix=mage_ --timezone=America/Los_Angeles --currency=USD --language=en_US --session-save="redis" --search-engine=elasticsearch8 --elasticsearch-host=<ip> --elasticsearch-port=9200 --elasticsearch-index-prefix=magento2 --amqp-host=<ip> --amqp-port="5672" --amqp-user="magentorabbit" --amqp-password="<magentorabbit password>" --amqp-virtualhost="magento" --amqp-ssl=
Expected result
Magento installed successfully.
Actual result
Magento not installed successfully.
[Progress: 585 / 1448]
Module 'Magento_MessageQueue':
Running schema recurring...
In Mysql.php line 109:
SQLSTATE[HY000]: General error: 1105 Percona-XtraDB-Cluster prohibits use of DML command on a table (magentodb.mage_queue_poison_pill) without an explicit primary key with pxc_str
ict_mode = ENFORCING or MASTER, query was: INSERT INTO `mage_queue_poison_pill` (`version`) VALUES (?)
In Mysql.php line 90:
SQLSTATE[HY000]: General error: 1105 Percona-XtraDB-Cluster prohibits use of DML command on a table (magentodb.mage_queue_poison_pill) without an explicit primary key with pxc_str
ict_mode = ENFORCING or MASTER
Additional information
pxc_strict_mode
of the Galera cluster is set to ENFORCING
Per Percona's detailed explanation, the solution is to have primary keys on every table, including queue_poison_pill
.
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.