質問編集履歴
4
脱字改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,17 +32,187 @@
|
|
32
32
|
|
33
33
|
|
34
34
|
|
35
|
-
2.コマンドでlist_appのデータベース
|
35
|
+
2.コマンドでlist_appのデータベースを作成
|
36
|
-
|
37
|
-
|
38
|
-
|
36
|
+
|
39
|
-
|
37
|
+
```
|
40
|
-
|
38
|
+
|
41
|
-
CREATE DATABASE list_app;
|
39
|
+
mysql> CREATE DATABASE list_app;
|
40
|
+
|
42
|
-
|
41
|
+
Query OK, 1 row affected (0.00 sec)
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
mysql> USE list_app];
|
46
|
+
|
47
|
+
ERROR 1049 (42000): Unknown database 'list_app]'
|
48
|
+
|
49
|
+
mysql> use list_app;
|
50
|
+
|
43
|
-
|
51
|
+
Database changed
|
52
|
+
|
44
|
-
|
53
|
+
mysql> SHOW tables;
|
54
|
+
|
55
|
+
Empty set (0.00 sec)
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
mysql> CREATE TABLE users (id INT AUTO_INCREMENT, name TEXT, PRIMARY KEY (id)) DEFAULT CHARSET=utf8;
|
60
|
+
|
61
|
+
Query OK, 0 rows affected (0.01 sec)
|
62
|
+
|
63
|
+
|
64
|
+
|
65
|
+
mysql> SHOW tables;
|
66
|
+
|
67
|
+
+--------------------+
|
68
|
+
|
69
|
+
| Tables_in_list_app |
|
70
|
+
|
71
|
+
+--------------------+
|
72
|
+
|
73
|
+
| users |
|
74
|
+
|
75
|
+
+--------------------+
|
76
|
+
|
77
|
+
1 row in set (0.00 sec)
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
mysql> DESCRIBE users;
|
82
|
+
|
83
|
+
+-------+---------+------+-----+---------+----------------+
|
84
|
+
|
85
|
+
| Field | Type | Null | Key | Default | Extra |
|
86
|
+
|
87
|
+
+-------+---------+------+-----+---------+----------------+
|
88
|
+
|
89
|
+
| id | int(11) | NO | PRI | NULL | auto_increment |
|
90
|
+
|
45
|
-
|
91
|
+
| name | text | YES | | NULL | |
|
92
|
+
|
93
|
+
+-------+---------+------+-----+---------+----------------+
|
94
|
+
|
95
|
+
2 rows in set (0.00 sec)
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
mysql> SELECT * FROM users;
|
100
|
+
|
101
|
+
Empty set (0.00 sec)
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
mysql> INSERT INTO users(name) VALUES ('ninjawanko');
|
106
|
+
|
107
|
+
Query OK, 1 row affected (0.00 sec)
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
mysql> SELECT * FROM users;
|
112
|
+
|
113
|
+
+----+------------+
|
114
|
+
|
115
|
+
| id | name |
|
116
|
+
|
117
|
+
+----+------------+
|
118
|
+
|
119
|
+
| 1 | ninjawanko |
|
120
|
+
|
121
|
+
+----+------------+
|
122
|
+
|
123
|
+
1 row in set (0.00 sec)
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
mysql> show databases;
|
128
|
+
|
129
|
+
+--------------------+
|
130
|
+
|
131
|
+
| Database |
|
132
|
+
|
133
|
+
+--------------------+
|
134
|
+
|
135
|
+
| information_schema |
|
136
|
+
|
137
|
+
| list_app |
|
138
|
+
|
139
|
+
| mysql |
|
140
|
+
|
141
|
+
| performance_schema |
|
142
|
+
|
143
|
+
| sakila |
|
144
|
+
|
145
|
+
| sys |
|
146
|
+
|
147
|
+
| test |
|
148
|
+
|
149
|
+
| world |
|
150
|
+
|
151
|
+
+--------------------+
|
152
|
+
|
153
|
+
8 rows in set (0.00 sec)
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
mysql> use list_app;
|
158
|
+
|
159
|
+
Database changed
|
160
|
+
|
161
|
+
mysql> show tables;
|
162
|
+
|
163
|
+
+--------------------+
|
164
|
+
|
165
|
+
| Tables_in_list_app |
|
166
|
+
|
167
|
+
+--------------------+
|
168
|
+
|
169
|
+
| users |
|
170
|
+
|
171
|
+
+--------------------+
|
172
|
+
|
173
|
+
1 row in set (0.00 sec)
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
mysql> show databases;
|
178
|
+
|
179
|
+
+--------------------+
|
180
|
+
|
181
|
+
| Database |
|
182
|
+
|
183
|
+
+--------------------+
|
184
|
+
|
185
|
+
| information_schema |
|
186
|
+
|
187
|
+
| list_app |
|
188
|
+
|
189
|
+
| mysql |
|
190
|
+
|
191
|
+
| performance_schema |
|
192
|
+
|
193
|
+
| sakila |
|
194
|
+
|
195
|
+
| sys |
|
196
|
+
|
197
|
+
| test |
|
198
|
+
|
199
|
+
| world |
|
200
|
+
|
201
|
+
+--------------------+
|
202
|
+
|
203
|
+
8 rows in set (0.00 sec)
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
mysql> mysql> CREATE DATABASE list_app;
|
208
|
+
|
209
|
+
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql> CREATE DATABASE list_app' at line 1
|
210
|
+
|
211
|
+
mysql> Query OK, 1 row affected (0.00 sec)
|
212
|
+
|
213
|
+
```
|
214
|
+
|
215
|
+
|
46
216
|
|
47
217
|
|
48
218
|
|
3
誤字、
test
CHANGED
File without changes
|
test
CHANGED
@@ -74,7 +74,7 @@
|
|
74
74
|
|
75
75
|
user: 'root',
|
76
76
|
|
77
|
-
password: '[
|
77
|
+
password: '[*****]',
|
78
78
|
|
79
79
|
database: 'list_app'
|
80
80
|
|
2
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -174,7 +174,7 @@
|
|
174
174
|
|
175
175
|
|
176
176
|
|
177
|
-
web開発のNode.jsの最後の部分なので
|
177
|
+
web開発パスのNode.jsの最後の部分なので
|
178
178
|
|
179
179
|
これができたら本当に幸いです。
|
180
180
|
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -11,34 +11,6 @@
|
|
11
11
|
実際このように表示したいのですが、エラーで表示できなくなっています。
|
12
12
|
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
C:\Users\genge>node app.js
|
18
|
-
|
19
|
-
internal/modules/cjs/loader.js:968
|
20
|
-
|
21
|
-
throw err;
|
22
|
-
|
23
|
-
^
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
Error: Cannot find module 'C:\Users\genge\app.js'
|
28
|
-
|
29
|
-
[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)[39m
|
30
|
-
|
31
|
-
[90m at Function.Module._load (internal/modules/cjs/loader.js:841:27)[39m
|
32
|
-
|
33
|
-
[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)[39m
|
34
|
-
|
35
|
-
[90m at internal/main/run_main_module.js:17:47[39m {
|
36
|
-
|
37
|
-
code: [32m'MODULE_NOT_FOUND'[39m,
|
38
|
-
|
39
|
-
requireStack: []
|
40
|
-
|
41
|
-
}
|
42
14
|
|
43
15
|
|
44
16
|
|