Tuesday, November 5, 2013

Re: Cannot GRANT any access to new users for some reason

You managed to hit a bug (the fix should hit production later this week). A workaround is to connect to the instance and run the following:

UPDATE mysql.user SET Grant_priv='Y' WHERE host = '%';
FLUSH PRIVILEGES;

After that, disconnect and connect again. The GRANT should work properly now.

-- Razvan ME


On Tue, Nov 5, 2013 at 6:55 PM, Ray Pitm <ray.pitmon@agosto.com> wrote:
Hi,

I'm connecting as root to my DB from a GCE instance.  I've added a user.  However, it won't let me GRANT that user any privileges.  I keep getting Error 1044 Access Denied.

You can see that I have a 'testuser'@'%':

mysql> SELECT User, Host, Password FROM mysql.user;
+----------+-----------+-------------------------------------------+
| User     | Host      | Password                                  |
+----------+-----------+-------------------------------------------+
| root     | localhost |                                           |
| root     | 127.0.0.1 |                                           |
| root     | ::1       |                                           |
|          | localhost |                                           |
| root     | %         | * LSKDFLKJDFSLKJSDFLJKLKSJFDJKLJKLFSDLJKF |
| testuser | %         | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 |
+----------+-----------+-------------------------------------------+

Here are some of the things I've tried:

mysql> GRANT ALL ON drupal.* TO  'testuser'@'%';
ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'drupal'

mysql> GRANT ALL ON `%`.* TO  'testuser'@'%';
ERROR 1044 (42000): Access denied for user 'root'@'%' to database '%'

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP ON drupal.* TO 'testuser'@'%';
ERROR 1044 (42000): Access denied for user 'root'@'%' to database 'drupal'


Note that I was able to create the drupal db and add tables to it (as root).  Any ideas?

Thanks!



CONFIDENTIALITY
The information transmitted herein is intended only for the addressee and may contain confidential, proprietary and/or privileged material. Any unauthorized review, distribution or other use of or the taking of any action in reliance upon this information is prohibited. If you receive this email in error, please contact the sender and delete or destroy this message and all copies.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/ffa77c9e-01c2-421f-ba12-92c8d624620d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CA%2BUvTg02F1HCD59-kyokL5cBwNFkH%3DTtxJAWjV65RXW%2BrHYkwQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment