1

I am just trying out Google Cloud SQL. Created a SQL server and white-listed one of my IPs to connect to it.

I am able to connect as root@'%' there and do everything I wish, other than granting privileges to users.

I created a user using the following command :

CREATE USER 'something'@'Fixed_IP' identified by 'some_pass';
SUCCESS

GRANT ALL PRIVILEGES ON *.* TO 'something'@'Fixed_IP' ;
ERROR 1045 (28000): Access denied for user 'root'@'%' (using password: YES)

Why I am facing this when I am logged in as 'root'@'%' ?

Some more details about my mysql user_base as of now :-

mysql> select user, host from mysql.user;
+---------+-----------------+
| user    | host            |
+---------+-----------------+
| root    | %               |
| new_db  | Fixed_IP        |
| new_sv1 | Fixed_IP        |
| test    | Fixed_IP        |
| root    | 127.0.0.1       |
| root    | ::1             |
|         | localhost       |
| root    | localhost       |
+---------+-----------------+
8 rows in set (0.06 sec)

  mysql> show GRANTS for 'root'@'%';
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@%                                                                                                                                                                                                                                                                                                                                                                                                                    |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, SHUTDOWN, PROCESS, FILE, 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 *.* TO 'root'@'%' IDENTIFIED BY PASSWORD '*3481764187236481732qhuwieduqwedqwe789732' WITH GRANT OPTION |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.06 sec)
1

SO, Google answers it as :-

Google Cloud SQL does not support SUPER privileges which means that GRANT ALL PRIVILEGES statements will not work. As an alternative, you can use GRANT ALL ON %.*.

They have mentioned it here

Thanks for helping anyways :)

1
  • Don't forget to mark your own answer as correct (no points though :-( ) - it might help others who have the same problem. Feb 1 '15 at 14:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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