0

This question already has an answer here:

I'm trying to run upgrade command but I'm getting this error. Any help would be appreciated (see pictureenter image description here).

P.S: User = Root, and privileges are ALL YES in 'magento2' DB. M2.2.3 and PHP 7.

marked as duplicate by Jai, 7ochem, Murtuza Zabuawala, Dhiren Vasoya, Priyank May 30 '18 at 4:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

0

You need to make sure you put correct username and password for your user. If they are correct, make sure the user has all privileges to the database.

See this: Error display on Setup upgrade command

0

Go to app/code/etc/env.php and make sure that the username and password fields that have been entered have the correct privileges.

Or

go to your Database Management System and assign the privileges to the account that has been set up in env.php

0

Please try to clarify if the user Magento is using is named "root" or if you are running the command as "root" of your system.

bin/magento setup:upgrade is going to take the values shown in magentoroot/app/etc/env.php inside the database context. I am not sure if it is the same path in windows but the file should have the same name, so look for it.

Then make sure your database user has all privileges(No Grant for obvious reasons) on the database your magento is using(also found in env.php).

To Grant all privileges, login to MySql and then :

GRANT ALL PRIVILEGES ON database_magento.* TO 'magento_username'@'x';
0

IF you are using C-Panel, when you have created database, you have to set all Privileges for specific mysql user. Only privileges user can access all operation of your register user database.

Not the answer you're looking for? Browse other questions tagged or ask your own question.