0

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:

  1. From security point of view do I need to change this user to some other user?
  2. 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?
0

"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:

[root@server ~]# cat /root/.my.cnf 
[client]
user=root
password="myserver"
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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