res_config_mysql: Fix several issues related to recent table changes