Skip to content

SQL Permissions checking seems to be broken #151

@baurmatt

Description

@baurmatt

Command I ran:

sudo -H -u www-data /var/www/bin/sw.phar install:release --no-interaction --release 5.5.4 --install-dir /var/www/shopware.example.org/htdocs --shop-host shopware.example.org --db-host 10.128.3.16 --db-port 3306 --db-user shopware --db-password kjahdkjhagsjdhasd --db-name shopware

Output:

Downloading release

Warning: count(): Parameter must be an array or an object that implements Countable in phar:///var/www/bin/sw.phar/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 67
Unzipping archive
Creating database shopware
Writing config.php



  [RuntimeException]
  Your user has not enough privileges for database "shopware" the ALTER privilege is required



install [--db-host="..."] [--db-port="..."] [--db-socket="..."] [--db-user="..."] [--db-password="..."] [--db-name="..."] [--no-skip-import] [--shop-locale="..."] [--shop-host="..."] [--shop-path="..."] [--shop-name="..."] [--shop-email="..."] [--shop-currency="..."] [--skip-admin-creation] [--admin-username="..."] [--admin-password="..."] [--admin-email="..."] [--admin-locale="..."] [--admin-name="..."]




  [RuntimeException]
  Command failed. Error Output:

    [RuntimeException]
    Your user has not enough privileges for database "shopware" the ALTER privilege is required

  install [--db-host="..."] [--db-port="..."] [--db-socket="..."] [--db-user="..."] [--db-password="..."] [--db-name="..."] [--no-skip-import] [--shop-locale="..."] [--shop-host="..."] [--shop-path="..."] [--shop-name="..."] [--shop-email="..."] [--shop-currency="..."] [--skip-admin-creation] [--admin-username="..."] [--admin-password="..."] [--admin-email=".
  .."] [--admin-locale="..."] [--admin-name="..."]


install:release [-r|--release RELEASE] [-i|--install-dir INSTALL-DIR] [--unpack-only] [--skip-download] [--db-host DB-HOST] [--db-port DB-PORT] [--db-socket DB-SOCKET] [--db-user DB-USER] [--db-password DB-PASSWORD] [--db-name DB-NAME] [--no-skip-import] [--shop-locale SHOP-LOCALE] [--shop-host SHOP-HOST] [-p|--shop-path SHOP-PATH] [--shop-name SHOP-NAME] [--shop-email SHOP-EMAIL] [--shop-currency SHOP-CURRENCY] [--skip-admin-creation] [--admin-username ADMIN-USERNAME] [--admin-password ADMIN-PASSWORD] [--admin-email ADMIN-EMAIL] [--admin-locale ADMIN-LOCALE] [--admin-name ADMIN-NAME]

But permissions should be enough:

root@mbaur:/var/log/mysql# pt-show-grants | grep shopware
-- Grants for 'shopware'@'10.128.3.%'
CREATE USER IF NOT EXISTS 'shopware'@'10.128.3.%';
ALTER USER 'shopware'@'10.128.3.%' IDENTIFIED WITH 'mysql_native_password' AS '*lkjahdkjhajkdhaskldjhaskljdhajdhaskld.hasd' REQUIRE NONE PASSWORD EXPIRE DEFAULT ACCOUNT UNLOCK;
GRANT ALL PRIVILEGES ON `shopware`.* TO 'shopware'@'10.128.3.%';
GRANT USAGE ON *.* TO 'shopware'@'10.128.3.%';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions