MySQL create user with root privileges

To create a user with “root” privileges, you need to find what privileges root have, this can be done with command

You can use following commands to create new user

Replace USER_NAME with your desired MySQL username. PASSWORD_HERE with password you need.

localhost is to allow only connection from localhost, you can replace it with remote server hostname or IP. If you want to allow connection from any IP, use %

MySQL root