Python 3.4.0 with MySQL database

前端 未结 11 2580
孤城傲影
孤城傲影 2020-11-27 14:56

I have installed Python version 3.4.0 and I would like to do a project with MySQL database. I downloaded and tried installing MySQL

11条回答
  •  孤街浪徒
    2020-11-27 15:32

    Maybe you can use a work around and try something like:

    import datetime
    #import mysql
    import MySQLdb
    conn = MySQLdb.connect(host = '127.0.0.1',user = 'someUser', passwd = 'foobar',db = 'foobardb')
    cursor = conn.cursor()
    

提交回复
热议问题