python鏈接mysql數據庫

python鏈接mysql數據庫 準備工做: 安裝mysql 安裝pymysql 命令以下:python window:pip install pymysql Ubuntu:pip3 install pymysql 鏈接mysql數據庫代碼 import pymysql # 建立數據庫鏈接,localhost爲IP,root爲數據庫用戶名,123456爲數據庫密碼,user爲數據庫名稱,後面的參數
相關文章
相關標籤/搜索