In our previous post we installed MySQL server and PhpMyAdmin.
Now we gonna add new user and tables to our database using PhpMyAdmin.

  1. Log in to your PhpMyAdmin.
  2. To create a new user select users from top menu:
  3. From there you can select Add user:
  4.  Add usernames and for host select localhost. Now because I need lower level user with less permissions I will select “Create database with same name …”
    from Database for user and doesn’t select anything else. The privileges the user got are only for one database and its that of the user. Now if you want to give user Global privileges you can select them form bottom Global privileges area. It’s good idea to give users only permissions they need. And usually for basic functions you don’t need global privileges.  If you are ready press Go. This will create the user and database named as the user. You can now log in with your new user.
  5. If you need user with even less permissions the log in with your administrator user. Select Users. Behind every username is option “Edit Privileges”. Click this bad boy.

  6. Now if you select “Database” option from top menu you can select and see which database user have permissions over. From top screenshot you can see that “newuser” has “all privileges” over newuser database.
  7. Now we select “Edit Privileges” and now you can see which action “newuser” can perform on the database “newuser”. And this is quick overview how you can
    manage users and user privileges.



*Tutorial on Linux version 4.4.50/ Raspbian v. 8 (jessie) / SQL Server version: 5.5.54-0+deb8u1 – (Raspbian)