Assign Existing User to MySQL Database in PHPMyAdmin

Stackoverflow lists a great example that can be done by simply using the Console feature of PHPMyAdmin.

Use the grant permissions command.

If your database was call “newDatabase” and your user was name “newUser” the command to grant all privileges on all the tables contained within would be:

GRANT ALL PRIVILEGES ON `newDatabase`.* TO 'newUser'@'localhost';

This would restrict the user from access the database only from the localhost, to enable access from all host change localhost to ‘%’

You then need to refresh the privileges with the following command:



To grant privileges to every database on the mysql server use the following command (notice the *.*):

GRANT ALL PRIVILEGES ON *.* TO 'newUser'@'localhost';