From ed135d79df12a2466b52dae1a82326941211dcc9 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 12 十月 2023 17:00:18 +0800
Subject: [PATCH] 修改了连接远程数据库的方式

---
 py_spider.py |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/hello.py b/py_spider.py
similarity index 95%
rename from hello.py
rename to py_spider.py
index 907f9f9..fed11c5 100644
--- a/hello.py
+++ b/py_spider.py
@@ -109,7 +109,7 @@
         # print('\n')
         after_address.append(a)
 
-    engine = create_engine("mysql+mysqlconnector://root:1234@localhost:3306/fume?charset=utf8")
+    engine = create_engine("mysql+pymysql://fumeRemote:feiyu2023@114.215.109.124:3306/fume?charset=utf8")
     con_read = engine.connect()
 
     df = pd.read_sql('SELECT  b.DI_Name,a.MV_Stat_Code,a.MV_Data_Time,a.MV_Isduplication FROM fd_t_minutevalue AS a JOIN ea_t_device_info AS b ON a.MV_Stat_Code = b.DI_Code',con=con_read)  
@@ -119,8 +119,6 @@
 
     existing_data = df.values.tolist()  #DateFrame鎸夌収琛岃浆鎴恖ist绫诲瀷锛宺es瀛樻斁鐨勬槸璁惧淇℃伅琛ㄤ腑鐨勬暟鎹�
 
-    # print('宸插鐞嗭細',after_address)
-    # print('宸插瓨鍦�',existing_data)
 
     # 淇濆瓨閲嶅鍊�
     duplicate_data=[]
@@ -157,4 +155,4 @@
         return False,max
 
 
-app.run(debug=True,port=8089)
\ No newline at end of file
+app.run(debug=False,host='0.0.0.0',port=8089)
\ No newline at end of file

--
Gitblit v1.9.3