Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ローカルホストのデータベースに接続するために mysqldb を使用しました。
動作しますが、プログラムの実行中にデータベースのテーブルにデータを追加すると、追加されたことが示されますが、ローカルホストからテーブルを確認すると、更新されていません。
テーブルで innodb エンジンを使用している場合はconnection.commit()、 everyを呼び出す必要がありますcursor.execute()。
connection.commit()
cursor.execute()