MySQL Forums
Forum List  »  Newbie

Should the mysql user be used to start / stop mysqld
Posted by: Karl Champion
Date: November 20, 2025 03:59AM

Hello,

Complete newbie to MySQL.

So I have installed MySQL 8.0.44 on RHEL 9

a mysql linux account is automatically created but has no shell enabled. So to switch to the mysql linux account I run

su - mysql --shell=/bin/bash

When trying to start mysqld as the mysql user I am prompted for the root password.

uid=27(mysql) gid=27(mysql) groups=27(mysql)
$ systemctl start mysqld
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to start 'mysqld.service'.
Authenticating as: root
Password:

I have been using OS root to stop and start mysqld but I want to move away from using the OS root user.

All mysql files and directories are owned by the mysql linux account.

So my questions are:

1. Should the mysql account have privileges to start/stop mysqld without prompting for root password?

2. What is best practice for the mysql linux account? is it ok for the user to have login permissions?

Many Thanks

Options: ReplyQuote


Subject
Written By
Posted
Should the mysql user be used to start / stop mysqld
November 20, 2025 03:59AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.