์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- remote : Invalid username or password
- ์์ด๋ฒ๋ฆฐ๊ดํธ
- algorith
- create UI
- SourceTree
- ์์คํธ๋ฆฌ
- ํ๋ฆฌํ์คํธ
- Listing Data on IOS
- Python
- git
- nodejs
- ํธ์ฌ์ค๋ฅ
- ์๊ณ ๋ฆฌ์ฆ
- Nodejs ๊ต๊ณผ์
- ํ์ด์ฌ
- BOJ
- APP
- mysql
- functinon
- ๊น
- ๋ฐฑ์ค
- Github
- SWIFT
- udemy
- commit
- REST
- Push
- Mac
- IOS
- HTTP
- Today
- Total
YoonC
[Nodejs] MySQL ๋๋ฒ๐จ ๋ณธ๋ฌธ
๐ฉWorkbench ์ค์น ๋ฌธ์ ๋ฐ์
8.0.22์ ๋ฌธ์ ๋ฐ์!!! ์ธ๊ตญ ์ฌ์ดํธ ๊ตฌ๊ธ๋งํ์ฌ ๋ฌธ์ ํด๊ฒฐ
==> brew remove workbench๋ก ์ญ์ ํ ๋ ๋ฎ์ ๋จ๊ณ์ ์ํฌ๋ฒค์น ์ค์นํด๋ด (8.0.18) ํด๊ฒฐ
๐ฉ ํ ์ด๋ธ ์์ฑ์ ERROR
mysql> CREATE TABLE nodejs.users(
-> id INT NOT NULL AUTO_INCREMENT,
-> name VARCHAR(20) NOT NULL,
-> age INT UNSIGNED NOT NULL,
-> married TINYINT NOT NULL,
-> comment TEXT NULL,
-> created_at DATETIME NOT NULL DEFAULT now(),
-> PRIMARY KEY(id),
-> UNIQUE INDEX name_UNIQUE (name ASC))
-> COMMENT = '์ฌ์ฉ์ ์ ๋ณด'
-> DEFAULT CHARACTER SET =utf8
-> ;
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> DESC users;
ERROR 1046 (3D000): No database selected
๐๐ป ์ถ์ ์ด์ : USE [๋ฐ์ดํฐ๋ฒ ์ด์ค๋ช ] ์ ๋ ฅ์ ์ํด์ค์ (๋ง์ ๋ฐ์ ์ ๋ ฅํด์ฃผ๋ ์คํ๋จ)
mysql> use nodejs (ํด๊ฒฐ)
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> DESC users;
+------------+--------------+------+-----+-------------------+-------------------+
| Field | Type | Null | Key | Default | Extra |
+------------+--------------+------+-----+-------------------+-------------------+
| id | int | NO | PRI | NULL | auto_increment |
| name | varchar(20) | NO | UNI | NULL | |
| age | int unsigned | NO | | NULL | |
| married | tinyint | NO | | NULL | |
| comment | text | YES | | NULL | |
| created_at | datetime | NO | | CURRENT_TIMESTAMP | DEFAULT_GENERATED |
+------------+--------------+------+-----+-------------------+-------------------+
๐ฉ319p npm start ์๋ฌ
~~@~~-MacBookPro chapter7 % npm start
npm ERR! missing script: start
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/yundabin/.npm/_logs/2021-01-27T02_40_55_647Z-debug.log
๐๐ป ํด๊ฒฐ cd learn-sequelize ํด์ฃผ๋๊น ๋๋น
: npm script์ start๋ ๊ทธ ํด๋น๋๋ ํ์ผ ์์ json์์ start๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด๋ผ์
ํ๋ก๊ทธ๋จ์ ์คํ์ํฌ ํ์ผ๋ก ์ฎ๊ฒจ์ค ํ์ npm ๋ช ๋ น์ด๋ฅผ ์คํ์์ผ์ฃผ์ด์ผ ํ๋ค. ๋ฐ๋ณด์ผ!!
% npm start
> learn-sequelize@0.0.1 start
> nodemon app
[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node app.js`
3001 ๋ฒ ํฌํธ์์ ๋๊ธฐ ์ค
'Develop > Node.js' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
REST? RESTful API?? (0) | 2021.03.26 |
---|---|
[Nodejs ๊ต๊ณผ์] ๋ชฝ๊ณ ๋๋น (3) | 2021.03.18 |
[Nodejs ๊ต๊ณผ์] ์ํ๋ผ์ด์ฆ (0) | 2021.03.18 |
[Nodejs ๊ต๊ณผ์] MySQL (0) | 2021.03.17 |
[Nodejs ๊ต๊ณผ์] Http ๋ชจ๋ (0) | 2021.03.05 |