接下來要講python連接資料庫
前面有說過MySQL install,接下來我們要
important MySQL套件
"host": "127.0.0.1",
"port": 3306,
"user": "root",
"password": "資料庫管理員密碼",
"db": "viewpoint",
"charset": "utf8"
建立Connection物件
1.
2. try:
3. conn = pymysql.connect(**db_settings)
4.
5. except Exception as ex:
6. print(ex)