MySQL Forums
Forum List  »  Newbie

Which Linux OS user should manage mysql database ?
Posted by: J. Kraljic Patrick
Date: December 06, 2018 10:28PM

MySQL version: 8
OS version: Oracle Linux 7.6

I am new to MySQL.
I have an OS user named mysql created by the rpm during the installation.
But , I cannot switch to this user as shown below. As you can see , I am trying to switch from oracle user to mysql .
As shown in the /etc/passwd, mysql user is created with /bin/false , so it cannot switch user.
Since this is installation's default, I am not changing it.
In MySQL world, which OS user should be managing mysql database ? Any best practice on this ?

Not sure why mySQL forum doesn't have code formatting. Hope the below output is easily readable to you guys.

[oracle@depsy238 ~]$ whoami
oracle
[oracle@depsy238 ~]$ id mysql
uid=27(mysql) gid=27(mysql) groups=27(mysql)
[oracle@depsy238 ~]$
[oracle@depsy238 ~]$
[oracle@depsy238 ~]$ su - mysql
Password:
Last login: Thu Dec 6 17:54:05 +08 2018 on pts/2
[oracle@depsy238 ~]$
[oracle@depsy238 ~]$ whoami
oracle
[oracle@depsy238 ~]$
[root@depsy238 ~]# grep mysql /etc/passwd
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/false

[oracle@depsy238 ~]$
[oracle@depsy238 ~]$ cat /etc/oracle-release
Oracle Linux Server release 7.6

Options: ReplyQuote


Subject
Written By
Posted
Which Linux OS user should manage mysql database ?
December 06, 2018 10:28PM


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.