teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

2

2017/05/07 06:16

投稿

enginner
enginner

スコア14

title CHANGED
File without changes
body CHANGED
@@ -3,12 +3,9 @@
3
3
 
4
4
  ###発生している問題・エラーメッセージ
5
5
  ![イメージ説明](87fddb6eac31576a2384613aa26d1937.png)
6
- ```
7
6
 
8
- ###該当のソースコード
9
- ```Python
10
7
 
11
- shoto@raspberrypi:~ $ vi sample.py
8
+ ```python
12
9
  import MySQLdb
13
10
 
14
11
  connection = MySQLdb.connect(host="10.0.2.15",db="bas",user="user",passwd="pass",charset="utf8")
@@ -28,5 +25,8 @@
28
25
 
29
26
 
30
27
 
28
+
29
+
30
+
31
31
  ###補足情報(言語/FW/ツール等のバージョンなど)
32
32
  Raspberry Pi 3

1

1

2017/05/07 06:15

投稿

enginner
enginner

スコア14

title CHANGED
@@ -1,1 +1,1 @@
1
- Raspberry Pi から virtualBoxのMysqlへ接続
1
+ 1Raspberry Pi から virtualBoxのMysqlへ接続
body CHANGED
@@ -14,7 +14,7 @@
14
14
  connection = MySQLdb.connect(host="10.0.2.15",db="bas",user="user",passwd="pass",charset="utf8")
15
15
 
16
16
  cursor = connection.cursor()
17
- # SQL
17
+
18
18
  cursor.execute("select * from bass")
19
19
  result = cursor.fetchall()
20
20