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.
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.
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.