Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Upset because there is no help from the related answer I found here. The version of mysql on my host is 5.6.14-1.

The error occured when I start the server as below. Sorry for I can't show the hostname because it's owned by company.

sudo /etc/init.d/mysql start
Starting MySQL..The server quit without updating PID file ([FAILED]/mysql/<<hostname>>.pid).

And the error message from /var/lib/mysql/<<\hostname>>.err

131213 16:36:05 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2013-12-13 16:36:05 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2013-12-13 16:36:05 18974 [ERROR] Fatal error: Can't change to run as user 'mysql' ;  Please check that the user exists!

2013-12-13 16:36:05 18974 [ERROR] Aborting

2013-12-13 16:36:05 18974 [Note] Binlog end
2013-12-13 16:36:05 18974 [Note] /usr/sbin/mysqld: Shutdown complete

131213 16:36:05 mysqld_safe mysqld from pid file /var/lib/mysql/<<hostname>>.pid ended

I haven't had a user name 'mysql', actually I just have only one user 'root'. I don't have a good knowledge about mySql. Could anyone help with it? Thanks in advance.

share|improve this question

migrated from stackoverflow.com Dec 14 '13 at 11:13

This question came from our site for professional and enthusiast programmers.

2 Answers 2

Check /etc/passwd, is there a MySQL user? If not, re-install MySQL from your package manager.

share|improve this answer
    
No. There is no mysql user... –  jjs Dec 13 '13 at 16:54
    
This answer should be a comment –  Jim Garrison Dec 13 '13 at 17:11
    
@jjs did you reinstall MySQL server? does it help? –  Howard Guo Dec 13 '13 at 19:23
up vote 0 down vote accepted

Eventually I find the answer from the following link which is good to me. http://yuanhsh.iteye.com/blog/1303801

The only thing which I have done is adding the following line into the /usr/my.cnf

user = root

I'm doubt that I never specified one user before however it worked well, why now I have to specify the user equals the only user root ? But it's not important, it works.

Thanks for the comments from everyone.

share|improve this answer
    
Be careful running mysql as root - when there is a security hole with MySQL server, your system could be endangered. –  Howard Guo Dec 14 '13 at 7:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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