chdir Maildir failed / mysqld cannot start

Discussion in 'Server Operation' started by pineapple, Oct 6, 2010.

  1. pineapple

    pineapple New Member

    Hello

    I have two problems which might or might not be related. After my VPS ran out of memory last night I had to ask my provider to restart it for me. When it came back up I then had SSH and FTP access but I noticed that I was getting mail errors:

    "Sending of password did not succeed. Mail server responded: chdir Maildir failed"

    After going through the forums here I saw that one of the recommendations was to check the ISPConfig (I'm running v2) to make sure that the maildir option was checked. It was then that I noticed mysql was not running as I couldn't access the ISPConfig webpage.

    I checked the syslog and saw:

    Code:
    Oct  6 08:33:11 first mysqld_safe[3154]: started
    Oct  6 08:33:12 first mysqld[3157]: 101006  8:33:12  InnoDB: Started; log sequence number 0 43705
    Oct  6 08:33:12 first mysqld[3157]: 101006  8:33:12 [ERROR] Can't start server : Bind on unix socket: Permission denied
    Oct  6 08:33:12 first mysqld[3157]: 101006  8:33:12 [ERROR] Do you already have another mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
    Oct  6 08:33:12 first mysqld[3157]: 101006  8:33:12 [ERROR] Aborting
    Oct  6 08:33:12 first mysqld[3157]: 
    Oct  6 08:33:12 first mysqld[3157]: 101006  8:33:12  InnoDB: Starting shutdown...
    Oct  6 08:33:14 first mysqld[3157]: 101006  8:33:14  InnoDB: Shutdown completed; log sequence number 0 43705
    Oct  6 08:33:14 first mysqld[3157]: 101006  8:33:14 [Note] /usr/sbin/mysqld: Shutdown complete
    Oct  6 08:33:14 first mysqld[3157]: 
    Oct  6 08:33:14 first mysqld_safe[3185]: ended
    Oct  6 08:33:26 first /etc/init.d/mysql[3304]: 0 processes alive and '/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping' resulted in
    Oct  6 08:33:26 first /etc/init.d/mysql[3304]: #007/usr/bin/mysqladmin: connect to server at 'localhost' failed
    Oct  6 08:33:26 first /etc/init.d/mysql[3304]: error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
    Oct  6 08:33:26 first /etc/init.d/mysql[3304]: Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!
    Oct  6 08:33:26 first /etc/init.d/mysql[3304]:
    Again, looking through the forums here I did the following:

    ran updatedb
    ran locate mysqld.sock - but it came up blank
    shutdown mysql and renamed my.cnf but mysql would not then start.

    So I backed up my data files and removed mysql and then reinstalled but it must have kept the config files as it didn't ask me to set a password during the install and I had the same error when I tried to start it. So repeated the process with apt-get --purge remove but still had the same issue (again didn't ask me to set a password as it does in a clean install).

    I shutdown the server and did an offline recovery through HyperVM to retrieve the mysqld.sock file but now the server is not responding and I have had to send a support request to ask for another hard reset.

    So now I am stumped - does anyone have any ideas? If I can get mysql running then I will be able to check my ISPConfig setup (although I know that I had the maildir option checked as it's been running fine for months).

    By the way its Debian Lenny and I used the Perfect Server guide to setup apache, courier, proftpd etc.

    regards and many thanks if you've got this far,

    Andrew
     
  2. pineapple

    pineapple New Member

    Solved

    After many dead-ends, it turned out to be a file permissions issue where, among other things, mysql was not the owner of /var/run/mysqld/.

    Hope this helps someone else.

    regards

    Andrew
     

Share This Page