Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magento 2 1.0.0-beta Merchant Beta1 - Webinstaller / Console Installer - Error "Database user does not have enough privileges" #1813

Closed
magentofaz opened this issue Sep 8, 2015 · 9 comments
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@magentofaz
Copy link

Since the Magento 2 1.0.0-beta, the webinstaller and "console installer" doesn't work anymore at the step adddatabase, I always have the message "Database user does not have enough privileges.". Since previous beta/alpha versions of Magento 2 we use GRANT ALL PRIVILEGES ON synbshop\_%.* TO 'synbshop'@'localhost' WITH GRANT OPTION, and now the % is not interpreted. So to bypass this we need to put each database in the GRANT (for exemple GRANT ALL PRIVILEGES ON synbshop_faz_magento2merchant1.* TO 'synbshop'@'localhost' WITH GRANT OPTION). Our MySql version is 5.6.23-72.1.

Can you fix it ? or find a workaround ?

@ghost
Copy link

ghost commented Sep 8, 2015

This way has always worked for me:
GRANT ALL ON magento.* TO magento@localhost IDENTIFIED BY 'magento';

@magentofaz
Copy link
Author

The problem is on the joker % . On your exemple you specify a database name with GRANT ALL, in development context all databases are named like synbshop_mydatabasename. This type of syntax worked on the magento2-0740beta9 version, what do you suggest ?

@magentofaz
Copy link
Author

After quick test on magento2-0740beta16, this type of syntax also worked.

I have compared the file DbValidatorTest.php (in setup/src/Magento/Setup/Test/Unit/Validator) in magento2-0740beta16 and magento2-merchant1, it seems the function testCheckDatabaseConnectionNotEnoughPrivileges only exist in merchant1 version and the function testCheckDatabaseConnection has been modified with GRANT checks.

Also there are GRANT checks in the file DbValidator.php (in setup/src/Magento/Setup/Validator) since the magento2-merchant1 version.

@mazhalai
Copy link
Contributor

mazhalai commented Sep 9, 2015

@magentofaz thank you for the details, we have created MAGETWO-42678 to track this fix internally.

@scholtz
Copy link

scholtz commented Oct 20, 2015

I confirm this is not fixed yet.

I did clear installation from git as is described in the manual.

I did create new magento user and database through phpmyadmin by creating user, and clicking the checkbox "create database with the same name" .. it grants all permissions to database for this user, but does not grant it any global permissions. After granting some global permissions the installation moved on, however i clicked ctrl-c in process and it did not create database structure correctly, and now it fails.. now i have to find out how to clear cache or something..

php magento --version shows only "Magento CLI version 1.0.0-beta" not version of magento installed, but these are currently installed packages by composer (you can consider not showing a magento version through console as suggestion for improvement)

braintree/braintree_php 2.39.0 Braintree PHP Client Library
composer/composer 1.0.0-alpha10 Composer helps you declare, manage and install dependencies of PHP projects, ensuring you have the right stack everywhere.
doctrine/instantiator 1.0.5 A small, lightweight utility to instantiate objects in PHP without invoking their constructors
fabpot/php-cs-fixer v1.10.1 A tool to automatically fix PHP code style
justinrainbow/json-schema 1.5.0 A library to validate a json schema.
league/climate 2.6.1 PHP's best friend for the terminal. CLImate allows you to easily output colored text, special formats, and more.
lusitanian/oauth v0.7.0 PHP 5.3+ oAuth 1/2 Library
magento/composer 1.0.2 Magento composer library helps to instantiate Composer application and run composer commands.
magento/magento-composer-installer 0.1.5 Composer installer for Magento modules
magento/zendframework1 1.12.16 Magento Zend Framework 1
monolog/monolog 1.16.0 Sends your logs to files, sockets, inboxes, databases and various web services
oyejorge/less.php v1.7.0.3 PHP port of the Javascript version of LESS http://lesscss.org
pdepend/pdepend 2.0.6 Official version of pdepend to be handled with Composer
pelago/emogrifier v0.1.1 Converts CSS styles into inline style attributes in your HTML code
phpmd/phpmd 2.3.2 PHPMD is a spin-off project of PHP Depend and aims to be a PHP equivalent of the well known Java tool PMD.
phpseclib/phpseclib 0.3.10 PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.
phpunit/php-code-coverage 2.2.4 Library that provides collection, processing, and rendering functionality for PHP code coverage information.
phpunit/php-file-iterator 1.3.4 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-text-template 1.2.1 Simple template engine.
phpunit/php-timer 1.0.7 Utility class for timing
phpunit/php-token-stream 1.4.8 Wrapper around PHP's tokenizer extension.
phpunit/phpunit 4.1.0 The PHP Unit Testing framework.
phpunit/phpunit-mock-objects 2.3.8 Mock Object library for PHPUnit
psr/log 1.0.0 Common interface for logging libraries
sebastian/comparator 1.2.0 Provides the functionality to compare PHP values for equality
sebastian/diff 1.3.0 Diff implementation
sebastian/environment 1.3.2 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 1.2.1 Provides the functionality to export PHP variables for visualization
sebastian/recursion-context 1.0.1 Provides functionality to recursively process PHP variables
sebastian/version 1.0.6 Library that helps with managing the version number of Git-hosted PHP projects
seld/jsonlint 1.3.1 JSON Linter
sjparkinson/static-review 4.1.1 An extendable framework for version control hooks.
squizlabs/php_codesniffer 1.5.3 PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.
symfony/config v2.7.5 Symfony Config Component
symfony/console v2.6.11 Symfony Console Component
symfony/dependency-injection v2.7.5 Symfony DependencyInjection Component
symfony/event-dispatcher v2.7.5 Symfony EventDispatcher Component
symfony/filesystem v2.7.5 Symfony Filesystem Component
symfony/finder v2.7.5 Symfony Finder Component
symfony/process v2.7.5 Symfony Process Component
symfony/stopwatch v2.7.5 Symfony Stopwatch Component
symfony/yaml v2.7.5 Symfony Yaml Component
tedivm/jshrink v1.0.1 Javascript Minifier built in PHP
tubalmartin/cssmin v2.4.8-p4 A PHP port of the YUI CSS compressor
zendframework/zend-code 2.4.8 provides facilities to generate arbitrary code using an object oriented interface
zendframework/zend-config 2.4.8 provides a nested object property based user interface for accessing this configuration data within application code
zendframework/zend-console 2.4.8
zendframework/zend-crypt 2.4.8
zendframework/zend-di 2.4.8
zendframework/zend-escaper 2.4.8
zendframework/zend-eventmanager 2.4.8
zendframework/zend-filter 2.4.8 provides a set of commonly needed data filters
zendframework/zend-form 2.4.8
zendframework/zend-http 2.4.8 provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests
zendframework/zend-i18n 2.4.8
zendframework/zend-inputfilter 2.4.8
zendframework/zend-json 2.4.8 provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP
zendframework/zend-loader 2.4.8
zendframework/zend-log 2.4.8 component for general purpose logging
zendframework/zend-math 2.4.8
zendframework/zend-modulemanager 2.4.8
zendframework/zend-mvc 2.4.8
zendframework/zend-serializer 2.4.8 provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover
zendframework/zend-server 2.4.8
zendframework/zend-servicemanager 2.4.8
zendframework/zend-soap 2.4.8
zendframework/zend-stdlib 2.4.8
zendframework/zend-text 2.4.8
zendframework/zend-uri 2.4.8 a component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)
zendframework/zend-validator 2.4.8 provides a set of commonly needed validators
zendframework/zend-view 2.4.8 provides a system of helpers, output filters, and variable escaping

@mazhalai
Copy link
Contributor

@scholtz thank you for your report. We are still working on this ticket.

@mazhalai mazhalai added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development and removed question labels Oct 20, 2015
@thomascrepain
Copy link

@mazhalai I provided pull request #2055 for this issue, with a unittest to proof that permissions with wildcards are now supported. Please look into this first before fixing it a second time internally.

@mazhalai
Copy link
Contributor

@magentofaz and @scholtz this has been fixed in 2.0.0 Please have a look and create a new issue if necessary.

okorshenko pushed a commit that referenced this issue Dec 11, 2017
[Pangolin] Deliver changes from Sprint 14

 - MQE-528: Robo commands should override certain files.
 - MQE-382: Adding custom "assertElementContainsAttribute" method.
 - MQE-572: Expose selenium configuration from within our .env file
 - MQE-513: added attachment (screenshots/logs) support in Allure reporting.
 - MQE-439: .env.example parameter example comment block
 - MQE-569: added SampleTests in module blacklist and not allowed to generate them.
 - MQE-570: Sanitize MAGENTO_BASE_URL (.env file) and Selenium params
 - MQE-541: Rename mergeKey
 - MQE-574: Test schema should specify required attributes correctly
 - MQE-347: Use a remove tag instead of a remove attribute
 - MQE-386: Ignore _generated folder for mftf code sniffer
 - MQE-592: Audit Test Cases on Firefox/Chrome on Windows/OSX
 - MQE-599: Move composer.json, README, etc from EE to CE
 - MQE-583: set release version to 1.0.0 and updated composer dependencies.
@magento-engcom-team
Copy link
Contributor

Hi @magentofaz. Thank you for your report.
The issue has been fixed in #29959 by @engcom-Golf in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

@magento-engcom-team magento-engcom-team added Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

6 participants