Saturday, March 01, 2008

Adding mysql admin user

Needed to add an admin to the mysql db and couldn't remember how:
Log in with admin credentials from a root login
sudo -s
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
Then:
mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;

No comments: