Technoracle
    Facebook Twitter Instagram
    • Sitemap
    • Privacy Policy
    • Disclaimer
    • Term of Services
    Facebook Twitter Instagram Pinterest Vimeo
    TechnoracleTechnoracle
    • Tutorials
      • Amazon Cloud
      • Google Cloud
    • How To
    • Blog
    • About
    Subscribe
    Technoracle
    Home»How To»How to Create MySQL Users and Grant Permission
    How To

    How to Create MySQL Users and Grant Permission

    Rajesh ShivamBy Rajesh ShivamMarch 16, 2022Updated:March 16, 2022No Comments2 Mins Read
    Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
    MySQL Users and Grant Permission
    Share
    Facebook Twitter LinkedIn Pinterest Email
    MySQL Users and Grant Permission

    To make everything is secure, you should create a separate user account for every single database. This will tighten the security of your database server. In this article, I will share how to create MySQL users and grant permission.

    Page Contents

    • How to Create MySQL Users and Grant Permission
      • Step 1: New User Create in MySQL
      • Step 2: Create Remote MySQL users and Grant Permissions.
      • Conclusion
      • Read More

    How to Create MySQL Users and Grant Permission

    Step 1: New User Create in MySQL

    Login to the MySQL server with root user and create an user, let’s call the new user is “technoracle”

    To login to MySQL server, use following command.

    $ mysql -u root -p[Your_MySQL_Password]

    MySQL user creation.

    mysql> CREATE USER 'technoracle'@'localhost' IDENTIFIED BY 'password';

    Now we will assign user with database with full privileges. Let’s take an example database name ‘newDb’.

    mysql> GRANT ALL ON newDb.* TO 'technoracle'@'localhost';

    after this step, run following command

    mysql> FLUSH PRIVILEGES;

    Step 2: Create Remote MySQL users and Grant Permissions.

    To connect database server remotely, you can create remote user or can allow any host. You will need remote machine IP to create remote MySQL users.

    mysql> CREATE USER 'technoracle'@'IP Address' IDENTIFIED BY 'password';
    mysql> CREATE USER 'technoracle'@'%' IDENTIFIED BY 'password';
    mysql> FLUSH PRIVILEGES;

    Conclusion

    In this article, you have learned how to create MySQL user, and how to give them permission. If you like this article, please share it on social media.

    Read More

    • How to install LAMP on Ubuntu 20.04

    ubuntu tips
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous Article5 Best Freelance Websites for Web Developers in 2022
    Next Article Migrate WordPress to AWS Lightsail Instance Quickly
    Rajesh Shivam

    Hello, everyone, I am Rajesh Shivam, I am a full-time freelancer with more than seven years plus experience in different freelancing platforms, in this blog, I am going to provide complete freelancing tips and tricks.

    Related Posts

    How To

    How to Install Microsoft Teams on Ubuntu 22.04 Easily

    February 22, 2023
    Read More
    How To

    What is Elastic IP and Its Pricing in AWS

    February 22, 2023
    Read More
    How To

    How to Convert PEM to PPK file [Step by Step Guide]

    February 22, 2023
    Read More
    Add A Comment

    Leave A Reply Cancel Reply

    Facebook Twitter Instagram Pinterest
    © 2023 Technoracle

    Type above and press Enter to search. Press Esc to cancel.

    Go to mobile version