pymysql.err.OperationalError: (1044, “Access denied for user ‘rw_customer_center’@‘%’ to database ‘customer_center’”)
class ReadConfig():
def init(self):
configDir = Path.cwd().joinpath(“config.ini”) # 配置文件地址
self.cfg = configparser.RawConfigParser() #注意这里的RawConfigParse(),如果用的ConfigParse可能就会不识别%
self.cfg.read(configDir) # cfg.get()默认返回str