我嘗試使用下面的代碼:扭曲adbapi.ConnectionPool沒有做任何事情
from twisted.enterprise import adbapi
dbpool = adbapi.ConnectionPool(
"MySQLdb",
db='test_db',
port='3306',
user='tester',
passwd='some_pass',
host='localhost',
cp_reconnect=True
)
dbpool.runQuery("INSERT INTO `htp_test` VALUES(NULL, 25, 'test')")
但數據不能在MySQL中插入,也沒有顯示任何錯誤。數據連接很好。
您是否需要啓動反應堆? – SingleNegationElimination
爲什麼我需要啓動它? – Sever