To add an extra “root” capable MySQL user start by logging in to the server on SSH and connect to MySQL CLI using an existing “root” level account. Next add the new user account:
1 |
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'somepass'; |
Next grant permissions:
1 |
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'localhost' WITH GRANT OPTION; |
Now flush the privileges cache:
1 |
FLUSH PRIVILEGES; |
You might want to double check the results with:
1 |
SHOW GRANTS FOR 'myuser'@'localhost'; |