Reputation: 1046
I'm working on a Google Cloud SQL server and I granted all privileges to a user named admin that I created, but the user is unable to create to create other users.
This is the SQL I ran and I got no errors and I was able to connect, but when I log into PHPMyAdmin, the user is not shown the "Users" tab like the root user is shown in every PHPMyAdmin I have used. I installed the latest version. Is there another SQL command I need to run to make it work?
GRANT ALL PRIVILEGES ON mydb.* TO 'admin'@'localhost' WITH GRANT OPTION;
Upvotes: 1
Views: 3545
Reputation: 9721
Cloud SQL does not allow the SUPER
privilege. The widest set of privileges you can set is*:
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER, CREATE TABLESPACE ON mydb.* TO 'admin'@'%' WITH GRANT OPTION
You probably also don't want to specify 'localhost' as you will be connecting to Cloud SQL from remote hosts.
* Search "Grant the following permissions" on https://cloud.google.com/sql/docs/error-messages to see this list.
Upvotes: 2
Reputation: 9695
It's not the case any longer. GRANT ALL
works for Cloud SQL - MySql.
With the root user I was given at Cloud SQL instance creation time I can run:
CREATE USER 'newuser'@'%' IDENTIFIED BY 'sldfklsdjflksdjfk';
GRANT ALL ON mydb.* TO 'newuser'@'%';
Upvotes: 0