Score:1

Why grant all privileges doesn't work in Phpmyadmin?

kr flag

After command

GRANT ALL PRIVILEGES ON `dbname`.* TO 'userA'@'localhost' IDENTIFIED BY 'password';

MySql says ok. Then i log in user A, but when I try to grant some privileges to user B it gives error #1044, saying that user A has no rights to do this. MySql grants all privileges to user A, and at the same time it doesn't allow him to do anything. I have no idea how to solve this.

Score:1
in flag

all does not include the grant privilege.

Quote from the documentation:

The optional WITH clause is used to enable a user to grant privileges to other users. The WITH GRANT OPTION clause gives the user the ability to give to other users any privileges the user has at the specified privilege level.

To grant the GRANT OPTION privilege to an account without otherwise changing its privileges, do this:

GRANT USAGE ON *.* TO 'someuser'@'somehost' WITH GRANT OPTION;

So, in your case:

GRANT ALL PRIVILEGES ON `dbname`.* TO 'userA'@'localhost'
  IDENTIFIED BY 'password' WITH GRANT OPTION;
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.