How to Create a New User and Grant Permissions in MySQL

Introduction: How to Create a New User and Grant Permissions in MySQL

Log in to your PhpMyAdmin.

Select SQL from top menu:

Step 1:

To create a new user select users from top menu:

Step 2:

From there you can select Add user:

Step 3:

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.

Step 4:

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.

Step 5:

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

Be the First to Share

    Recommendations

    • The 1000th Contest

      The 1000th Contest
    • Battery Powered Contest

      Battery Powered Contest
    • Hand Tools Only Challenge

      Hand Tools Only Challenge

    2 Discussions

    0
    JoeR202
    JoeR202

    Question 2 years ago on Introduction

    I'm trying to create new User the 2018 version on a Raspberry Pi 3 screen does not have USERS Tab??? Attached JPG. How do I create new User???

    PHPMyAdmin.jpg
    0
    Swansong
    Swansong

    3 years ago

    Thanks for sharing :)