Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using PhpMyAdmin on XAMPP, I want to add a super user that has the same privileges as 'root'@'localhost'.

This is because I want to create a MySQL instance that my local machine will serve as a remote database server.

share|improve this question
    
Are you talking about a system user or a MySQL user? That's two unrelated things. –  mauro.stettler Aug 19 '13 at 10:07
    
Yes a user to connec to MySQL. thru phpmyadmin panel –  user185296 Aug 19 '13 at 10:10
1  
A more pertinent question would be why you need a root-level user with non-localhost access? What specific things do you need this user to do? Super-user access is locked to localhost for a very good reason. –  Craig Watson Aug 19 '13 at 10:18

1 Answer 1

You can see the grants of root by executing "show grants for 'root'@'localhost';". This command will give you some output similar to this:

+----------------------------------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost                                                                                                              |
+----------------------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD 'mypassword' WITH GRANT OPTION |
+----------------------------------------------------------------------------------------------------------------------------------------+

Then you can simply replace the username/password/host out of the shown grant query, for example like this:

GRANT ALL PRIVILEGES ON *.* TO 'anotheruser'@'%' IDENTIFIED BY PASSWORD 'anotherpassword' WITH GRANT OPTION;

This should create a user 'anotheruser'@'%' with the specified password, and give it the same rights as 'root'@'localhost' has.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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