Report this

What is the reason for this report?

Problem granting permission within mysql at step 6

Posted on August 29, 2020

When I attempt to grant permissions to the example_user, mysql returns an error ‘ERROR 1410 (42000): You are not allowed to create a user with GRANT’

Unfortunately, it has proven difficult to find a reasonable answer as why I’m receiving this error.

Any help from you subject matter experts will be great.

The tutorial I’m accessing is how to install LAMP into Ubuntu 20.04

Again, the issue is within step 6 of the tutorial; after creating the example_user.

Thanks.

Mike



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 @michaelwoosley:

I have successfully granted permissions to the example_user after following the instructions of step 6 in the tutorial How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 20.04

The commands I have entered are the following:

  1. Log in to the MySQL root account:

    1. sudo mysql
  2. Create the example_user account:

    1. CREATE USER 'example_user'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

Of course, the real password is something else rather than password. 3. Grant the permissions to the user:

```custom_prefix(mysql>)
GRANT ALL ON example_database.* TO 'example_user'@'%';
```
  1. Finally, exit MySQL:

    1. exit

Make sure you did not miss any commands above. You can try to grant the permissions to the user again by following the above commands but skip the 2nd command.

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.