Pymysql使用基本流程

一、要求 1、要有數據庫 2、要有Python 3、要有pymysql 操作流程 1、創建數據庫鏈接 2、創建遊標 3、執行命令 4、關閉鏈接 import pymysql #pymysql.install_as_MySQLdb() #兼容性命令 #創建數據庫鏈接 db = pymysql.connect( host = "localhost", #主機ip user = "r
相關文章
相關標籤/搜索