Report this

What is the reason for this report?

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

Posted on July 21, 2021

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.



This textbox defaults to using Markdown to format your 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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.