Fix a bug in switching database.
Check ip when invoke from catshome.