How do I connect to a MySQL Database in Python?

后端 未结 25 1523
眼角桃花
眼角桃花 2020-11-21 07:43

How do I connect to a MySQL database using a python program?

25条回答
  •  不知归路
    2020-11-21 08:06

    Just a modification in above answer. Simply run this command to install mysql for python

    sudo yum install MySQL-python
    sudo apt-get install MySQL-python
    

    remember! It is case sensitive.

提交回复
热议问题