The subject issue may occur in VPS such as OpenVZ and Xen. The reason is vary but lots of case are happened in OpenVZ and Xen.
In my case, it happened in OpenVZ environment. One day I saw my blog the error said “cannot access to the database.” and nothing display. I thought mysqld dead so I logged in VPS.
PTY allocation request failed on channel 0
Just the error above showed and it’s horrible, I couldn’t do anything. In my case, seems like happened in CentOS update.
Although I found a solution by referring to URL below, http://www.asteriosk.gr/blog/2009/02/20/pty-allocation-request-failed-on-channel-0/
I could not establish ssh access, I contacted the customer support from hosting admin screen. I use NYNOC hosting provider. It has admin screen called “HyperVM”. I was instructed to use “Fix Centos Dev” execution button. On using the button, the access problem was resolved. I was beginning to feel that, perhaps the button was integrated into the admin screen because the problem frequently occurs. Anyhow I re-gain the ssh connection and tried to restart mysqld but it didn’t work.
I checked the log and it seems permission problem.
It showed that the file owner in /var/lib/mysql did not match /var/run/mysqld permission.
I really have no idea why but since I started using NYNOC, I have come across many unknown problems….:(