How do I create a user to administer a MySQL database?
Author: Deron Eriksson
Description: This tutorial describes creating a user to administer a MySQL database.
Tutorial created using: Windows XP || MySQL 5.0.27
After creating a databaseW in MySQLW, an easy way to create a user and give that user administrative privileges to that database is to perform a 'GRANT ALL ON' the database that was created, where the user, host, and password are specified for the user. This statement creates the user and grants the user all privileges to that database.
The GRANT statement is shown below.
GRANT ALL ON testdatabase.* TO 'testuser'@'localhost' IDENTIFIED BY 'testpassword';
(Continued on page 2)