sudo

Setup sudo access to mysql user

Here is how to give dba user sudo access as mysql user.

visudo and add:

dbauser ALL=(mysql) ALL

Basically, it defines that user "dbauser" can run all commands as "mysql" user.

For the dbauser to get mysql shell, run:

$ sudo -u mysql -i

Comment