Added read_sql, which reads mysql and save train data.