Problem granting permission within mysql at step 6

Posted August 29, 2020 8.4k views
MySQLUbuntu 20.04

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.



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

    • sudo mysql
  2. Create the example_user account:

    • 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:

    • GRANT ALL ON example_database.* TO 'example_user'@'%';
  4. Finally, exit MySQL:

    • 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.

by Erika Heidi
A “LAMP” stack is a group of open-source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is stored in a MySQL database, and dynamic content is processed by PHP. In this guide, we will install a LAMP stack on an Ubuntu 20.04 server.
  • tomnguyen, thanks for your recommendation. It worked with what you provided. I haven’t had time to go back and look at the tutorial, but my belief is that you provided ‘something’ a little different that allowed me to “Grant” these permissions. I did in fact change my authentication method to 'mysqlnativepassword’ so that may have played a factor with this success… not sure, but happy I made it past that step… Thanks again ;-)