Ubuntu 12.04: Unable to add or delete a user named 'mysql'
- by Afaque H
I am trying to install MySql on Ubuntu 12.04 but the installation is failing with the error: "Can't change to run as user 'mysql'. Check if the user 'mysql' exits."
So I go ahead type in the command :
'cat /etc/passwd | grep mysql'
and result is null.
I try to add a user 'mysql' by issuing the command
'useradd mysql'/. But it fails with the message:
'useradd: user 'mysql' already exists'.
When I try to delete the user 'mysql' using the command
'userdel mysql' it also fails with the message
"userdel: cannot remove entry 'mysql' from /etc/passwd."
Can anyone explain me what's going on and suggest a solution.