How To Add A New MySQL User, For Beginner Database Admin And Backend Developer
MySQL database logo Adding new MySQL is not something we usually do on a daily basis as we are just stuck using a single user. I constantly forget how to add users because we don’t need to add users all the time. Maybe this article can help. Here’s how you add a new user to your MySQL database using terminal. 1. Create new user with username newuser, and host localhost, it can be an IP address CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'YourP@ssword123'; 2. Add our new user permission, in this case we use asterisk symbol, mean this new user has root privileges GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost'; 3. Commit or Reload the changes FLUSH PRIVILEGES; Adding a new MySQL user is a very basic command, every database admin or developer must know these commands. It’s much easier to add new user by using some database management tools like MySQL workbench, you don’t need to remember MySQL command, but it is sometimes yo...