User starting the MySQL server

I have installed Percona MySQL server as mysqld user. I want only this user to start/shutdown the instance/server.

What should be input to the parameter in my.cnf file?

[mysqld]
user=???

Thanks!

Starting/stopping MySQL is done via systemctl which typically requires root privileges.

[mysqld]
user=mysql

The above configuration is the user that mysqld will “drop” down to after being started by root. You probably need to use visudo to give your mysqld OS user privileges to run specific systemctl commands for starting/stopping.

1 Like