![](https://cdn-ak-scissors.b.st-hatena.com/image/square/cbb40f2afb9e8f610a4797d75c336e8788a11878/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-1150d8b18a7c15795b701a55ae908f94.png%3Fixlib%3Drb-1.2.2%26w%3D1200%26mark%3Dhttps%253A%252F%252Fqiita-user-contents.imgix.net%252F~text%253Fixlib%253Drb-1.2.2%2526w%253D840%2526h%253D380%2526txt%253DPython%2525E3%252581%25258B%2525E3%252582%252589MySQL%2525E3%252582%252592%2525E4%2525BD%2525BF%2525E3%252581%252586%2526txt-color%253D%252523333%2526txt-font%253DAvenir-Black%2526txt-size%253D54%2526txt-clip%253Dellipsis%2526txt-align%253Dcenter%25252Cmiddle%2526s%253D7b9fb0e8ecc7f33fb61fd9ffe0f7a5fc%26mark-align%3Dcenter%252Cmiddle%26blend%3Dhttps%253A%252F%252Fqiita-user-contents.imgix.net%252F~text%253Fixlib%253Drb-1.2.2%2526w%253D840%2526h%253D500%2526txt%253D%252540mas9612%2526txt-color%253D%252523333%2526txt-font%253DAvenir-Black%2526txt-size%253D45%2526txt-align%253Dright%25252Cbottom%2526s%253Dbac44eda6029ab89fb04a797882b0888%26blend-align%3Dcenter%252Cmiddle%26blend-mode%3Dnormal%26s%3D7d397551ca115e86dea57ac359e435c0)
エントリーの編集
![loading...](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/common/loading@2x.gif)
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
![アプリのスクリーンショット](https://b.st-hatena.com/bdefb8944296a0957e54cebcfefc25c4dcff9f5f/images/v4/public/entry/app-screenshot.png)
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
PythonからMySQLを使う - Qiita
# coding: utf-8 import MySQLdb def main(): conn = MySQLdb.connect( user='testuser', passwd='testu... # coding: utf-8 import MySQLdb def main(): conn = MySQLdb.connect( user='testuser', passwd='testuser', host='192.168.33.3', db='testdb' ) c = conn.cursor() # テーブルの作成 sql = 'create table test (id int, content varchar(32))' c.execute(sql) print('* testテーブルを作成\n') # テーブル一覧の取得 sql = 'show tables' c.execute(sql) print('===== テーブル一覧 =====') print(c.fetchone()) # レコードの登録 sql = 'insert into test values (%