嗯,这是一个不肯用Navicat而偏要使用命令行操作的倔强er。
本文是关于Python连接Mysql中踩到的坑,还提供了出坑的梯子~
1、准备工作:Mysql的安装、Python的安装,本文使用的是Python3.6和Mysql5.7 for Windows
关于Python的数据库包,我用的是pymysql,pycharm可以只在settints->interpreter里安装库,对于不熟悉pip操作的童鞋很友好。
点击右侧的加号

找到想要的库,点击下方的Install package,等待安装完成,点击上图的OK,就完成啦。

网友评论