resolve mysqlhost to ip in main thread
fix compiler warning in sql_db.cpp