replace mysql connection process.