I want to create read only user in MySQL without any intervention of root user.

CREATE USER ‘$user‘@’′ IDENTIFIED BY ‘$password‘;

Works for me only If I am a root user. But I want it to happen from a non root user. Can this be done?

2 Answers 2


From the manual

To use this statement, you must have the global CREATE USER privilege or the INSERT privilege for the mysql database.

So first you must have the root account grant you access to CREATE USER. Then your account will be able to create other users.


You can read the manual http://dev.mysql.com/doc/refman/5.1/en/create-user.html

First you have to create a user and then assign permission to it.

CREATE USER 'test'@'%' IDENTIFIED BY 'test';

and later execute this query to grant global SELECT privilege.

GRANT SELECT ON *.* TO 'test'@'%';

  • You've missed the key part of the question which requires the user to create another user with CREATE USER privilege, who in turn can create users with SELECT privileges Commented May 12, 2014 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.