Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

mysql starts fine, everything is working as expected, but there is no pid file where my.cnf says it should be, the .sock is there

this is the relevant section of my.cnf

[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock

but

/var/run/mysqld# ls
mysqld.sock

ps aux...

ps aux | grep mysql
mysql    23990  0.1  4.4 887340 75904 ?        Ssl  17:25   0:01 /usr/sbin/mysqld

Again, everything works, but i need the pid so that God can monitor it

share|improve this question

1 Answer 1

up vote 1 down vote accepted
  • Old bug from 2008 where someone got the PID created after another restart or stop+start: http://bugs.mysql.com/bug.php?id=41067

  • Normally I see an error when that file is not there ...

  • But a possible solution (1st shutdown mysql)...

    cd /var/run/mysqld/
    sudo touch mysqld.pid
    sudo chown mysql:mysql mysqld.pid
    

    Unless you want actually have it created by the deamon (but I would consider it a bug).

share|improve this answer
    
-.- yup that did it, restarted twice and it did update the file, thanks –  geermc4 Apr 23 '13 at 18:05
    
oh so the 1st one worked? Weiiiiiiiiird :D –  Rinzwind Apr 23 '13 at 18:06
    
no creating the file for it worked, didn't even need to stop it, just restarted and it used the file (i've restarted before the file and no change, so for some reason it couldn't create it) –  geermc4 Apr 23 '13 at 18:08
    
noup, something's up, gone again, maybe even my god config –  geermc4 Apr 23 '13 at 18:10
    
Check your mysql script. is there anything special in it? Like "su mysql -c "exec /usr/local/mysql/libexec/mysqld" &"? –  Rinzwind Apr 23 '13 at 18:20

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.