How to Create a New User and Grant Permissions in MySQL
by JakeMakes in Circuits > Raspberry Pi
884 Views, 10 Favorites, 0 Comments
How to Create a New User and Grant Permissions in MySQL
Log in to your PhpMyAdmin.
Select SQL from top menu:
To create a new user select users from top menu:
From there you can select Add user:
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. 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. 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.
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.
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.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 canmanage users and user privileges.
For more tutorials check jakemakes.eu