Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to grant priviliges to a "no-root-user" to start and/stop/restart the mysql server on a suse machine?

The goal is to make it for a developer possible to tune a mysql server/database and track some error down, which occure while an application corresponds with the mysql server. The server is on a SUSE machine.

At the moment the user is in the group mysql which grants him access to the logfile in /var/log/mysqld.log. But after tweaking the my.cnf he was not able to restart the server. So it seams, that he needs more rights then only beeing in the group mysql.

Thanks for any suggestions in advance!

Additional question: Are there more priviliges that should be granted to him to garanty his workflow, while working and administrating the mysql server?

share|improve this question
up vote 8 down vote accepted
  • Change the setuid bit of mysqld executable and the ownership of the executable file to mysql account, besides adding the required user in the group mysql for making him have access to the files on the filesystem.

  • Use visudo -f /etc/sudoers and grant him permission to execute the /etc/rc.d/init.d/mysql start and /etc/rc.d/init.d/mysql stop as two seperate commands in the COMMAND list and in the execution part, grant the user to execute both the commands as user (mysql). For more information on sudoers, refer to the sudoers man page. man sudoers.

  • Apart from that, from mysqld perspective, he may need additional grants on the Database server/databases to guarantee his workflow requirements like tuning the tables, create & drop database, tables, and perform some monitoring related activities with in mysql session etc.,.

share|improve this answer
How do you expect add the acction into the sudoers without being a root?. – paul Feb 4 at 14:42

This isn't possible. I don't know of any way to grant a user rights to start and stop daemons; I don't think there is one. For working with the mysql server, you can create a user for him with all rights to the mysql db

share|improve this answer
Incorrect: See the above answer re: sudo – Shadur Jan 3 '12 at 19:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.