In my my.cnf
file there is a user defined under section mysqld
called mysql
as below:
[mysqld]
user = mysql
I read that this is the user under which mysqld
service runs. My questions are:
- From security point of view do I need to change this user to some other user?
- What is the password of this user
mysql
? Or this is something internally saved by the system and I don't need to worry about it?
I can't be accurate 100% but i think no
Because mysql just runs under another user on purpose and it has /sbin/nologin or /bin/false i think
So you should not care with this account being accesed from another unprivileged account, seems like mysql instalation isolates the mysql server on purpose.
I think its a more dangerous vector trying to access your databases attacking with scripts or via the servers wich are allowed to access your database.
However if you use ps you can see wich user is running mysql, so i dont think its really useful to change that...
Hope it helps
"From security point of view do I need to change this user to some other user?"
The answer is NO,there is no need to change it.
"What is the password of this user mysql? Or this is something internally saved by the system and I don't need to worry about it?"
The MySQL root password is set at MySQL installation or after;
If you access MySQL server without password then it either means that the root password is not set or it has been set in .my.cnf in /root like this: