Sometimes you don’t want to expose your MySQL root user or password to a third party, but do need to give that party access to a super user or administrator account that has full control over the MySQL server instance.

Turns out, to add such a super user account is pretty easy.

First, access your MySQL console with:

mysql -u root -p

Once in, run the following SQL statement:

GRANT ALL PRIVILEGES ON *.* TO myusername@`%` IDENTIFIED BY 'mypassword';

(‘myusername’ and ‘mypassword’ should of course be substituted for your own values. Also, you don’t have to give the account such wide access by exchanging the any host % symbol with a specific IP/host if necessary)

Easy.

child dressed as a powerful superhero, complete with mask and cape