Possible bug with mysql-ctl


Hi there!

I’d like to talk about a problem I had with mysql-ctl on a PHP project and how “solved” it, so maybe it can help Cloud9 team improve it, or someone with the same problem.

After a restoring from hibernation, I tried restarting mysql service with mysql-ctl start or mysql-ctl restart. Those commands always informed that Mysql started successfully, but all mysql-ctl status thereafter returned that mysql is stopped. I also tried kill mysql processes, restarting my workspace, issue commands with sudo, but nothing helped.

Digging into mysql-ctl code, I realized that it looks for the file /home/ubuntu/lib/mysql/pid/mysqld.pid to tell if the service is running or not. Later i noticed that the file that is in fact created is /home/ubuntu/lib/mysql/pid/mysql.pid - not mysqld .pid as expected.

To quickly solve this issue I created mysqld.pid as a symbolic link to mysql.pid:

ln -s mysql.pid mysqld.pid

I hope this post may help somebody in some way!


This is really awesome! We are in the middle of open sourcing our workspaces which allow you to open PRs on this. You can find the PHP workspace here https://github.com/c9/templates/tree/master/ws-php (though mysql-ctl actually will live in a different repo) and over the next days the missing pieces will be added as well. Also, I notified the platform team about this. Thanks so much! Happy coding :slight_smile: