Correct mysqld setup and control status.

Also add WIP connection hook.
Merge pull request #1887 from pmorie/dev/v2_mysql

Correct mysqld setup and control status.