Api controller with mysql_connect