@gilbert
You can create users in MySQL database by following these steps:
- Open MySQL Command Line Client or any other MySQL client tool.
- Connect to the MySQL server using the command:
mysql -u root -p
- Enter your root password when prompted.
- To create a new user, use the following SQL command:
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
Replace 'username' with the desired username and 'password' with the desired password.
- Grant permissions to the user by using the following command:
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
This command grants all privileges on all databases to the user. You can modify the permissions according to your requirements.
- To apply the changes and refresh the privileges, use the command:
FLUSH PRIVILEGES;
- Exit the MySQL client by typing:
exit
Your new user should now be created in the MySQL database.