Question

Default user of mysql database has no priviliages to grant privilages to other users

Posted July 21, 2021 180 views
MySQLPythonDjangoDigitalOcean App Platform

The default user provided when the database is created doadmin has no privileges. When trying to run this command:

GRANT ALL PRIVILEGES ON database_name.* TO 'new_user'@'%';

I get this error:

ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operation

and I get a similar error when trying to give doadmin user privileges.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @mahdyhamad45Ray,

I Assume you are using MySQL managed database.
Are you running GRANT ALL with ‘doadmin’ user? If not suggest you execute using 'doadmin’ user account.

The Below documentation can guide you:

https://docs.digitalocean.com/products/databases/mysql/how-to/modify-user-privileges/#granting-privileges

https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql

I hope this helps!

Regards,
Rajkishore

by Etel Sverdlov
MySQL is a powerful database management system used for organizing and retrieving data. This tutorial explains how to to create new MySQL users and how to grant them the appropriate permissions.
  • I am using a database cluster.
    Are you running GRANT ALL with ‘doadmin’ user? Yes

    The problem is that doadmin user does not have the permissions to do what the documentation says

    @Rajkishore appreciate your help