连接数据库时,出现以下提示,不能使用【utf-8】
后来发现是不能使用【utf-8】 而应该是【utf8】
对应的版本 python 2.7,mysql-5.7.21-winx64
mysql://root:password@127.0.0.1:3306/flaskdb?charset=utf8
sqlalchemy.exc.OperationalError: (_mysql_exceptions.OperationalError) (2019, "Can't initialize character set utf-8 (path: C:\\mysql\\\\share\\charsets\\)") (Background on this error at: http://sqlalche.me/e/e3q8)
本文介绍了一种常见的MySQL字符集配置错误,即使用【utf-8】而非【utf8】导致连接失败的问题,并提供了相应的解决方案。
2213

被折叠的 条评论
为什么被折叠?



