VMware 虚拟机下ubuntu系统 pycharm python3.5 连接mysql
ubuntu系统下安装mysql-connector
pip install mysql-connector
或者pycharm中seting project interpreter 如下图红框内 + 加号搜索也可下载
如图所示
1搜索
2.点击
3.安装
然后终端测试是否安装成功,如图没有报错安装成功
(py_3.5) ming@ubuntu:~$ python
Python 3.5.2 (default, Oct 7 2020, 17:19:02)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mysql.connector
>>> exit()