Question

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

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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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