The bug was that the script tried to start mysqld while there was already a running mysqld server. Fixed by killing the running one.