Check return code of mysql_init()

Fixes #1908
Merge pull request #1911 from rubenk/check_mysql_init

Check return code of mysql_init()