18) No Permissions, no Privileges for login to phpmyadmin MySQL on Raspberry Pi

<-- Previous    Next –>

This page describes the issue of no privileges when trying to create a new database in the MySQL web interface phpmyadmin.

After you have installed MySQL, and you login to the web interface phpmyadmin with the root username and password, you may find that when you try to create a new database, you are presented with red error message saying ‘No Privileges’.

To overcome this, log into mysql with:

$ sudo mysql –user=root
[sudo] password for webserveruser: **********

gives the MariaDB prompt to show that you have logged in.

Then create a new user, in this case I have called it dbsuperuser. Use your own password where I have put *

MariaDB [(none)]> CREATE USER ‘dbsuperuser’@’%’ IDENTIFIED BY ‘***********’;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON *.* TO ‘dbsuperuser’@’%’ WITH GRANT OPTION;
MariaDB [(none)]> FLUSH PRIVILEGES;

Now if you login to the phpmyadmin web interface using the user and password you have just created, you will have the privileges to create databases.

<-- Previous    Next –>