finish the first part of rewrite function, add a member variable db_name, it is used to connect to MySQL Server