Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

starting mysql as root user on linux

Status
Not open for further replies.

grimwyre

MIS
Jan 31, 2002
68
GB
I have installed mysql 4.02 on redhat linux.
I have created a user called mysql to administer the mysql installation.

I can run mysqld_safe as the mysql user without any problems, however, when I try to run it as the root user with --user=mysql the process does not start and the following error message appears in the error log.

040706 17:03:06 mysqld started
Fatal error: Can't change to run as user 'mysql' ; Please check that the user exists!
040706 17:03:06 Aborting

The user does exist, does anyone have any ideas what I am doing wrong?
 
normally under redhat, the foillowing command should work correctly:
% service mysql restart

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
running service mysql restart produces a message mysql: unrecognized service.

I came across this problem as I had copied the mysql.server script into the /etc/init.d directory to get mysql to start up and close down with the server.

This runs as root but I believe it uses the --user=mysql parameter to start it as the mysql user. Is that correct?
 
hmm was it service mysqld stat|stop|restart ....

______________________________________________________________________
There's no present like the time, they say. - Henry's Cat.
 
I get the same error;

mysqld: unrecognized service
 
I have just tried starting it specifying the uid rather than the username and it appears to have started ok.
./mysqld_safe --user=503 &
[1] 19967
[root@rhtest2 bin]# Starting mysqld daemon with databases from /data
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top