https://dev.mysql.com/downloads/mysql/
설치 단계별 가이드는 블로그 참고
Workbench(GUI프로그램)
https://www.mysql.com/products/workbench/
homebrew install
다른 velog 참고
다운로드 : https://www.postgresql.org/
설치 가이드 블로그
Mac OS에는 설치를 따로 안 해도 이미 설치되어 있다..!
터미널에서 sqlite3 를 입력해보자.
윈도우는 모르겠다. 여기서 다운받으면 될 듯.
https://www.sqlite.org/download.html
영상을 참고해서 터미널에 작성해봤다.
Last login: Mon Jan 8 10:46:12 on ttys004
robin@imhuiyeon-ui-MacBookPro ~ % sqlite3
SQLite version 3.39.5 2022-10-14 20:58:05
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> show databases;
Parse error: near "show": syntax error
show databases;
^--- error here
sqlite> .databases
main: "" r/w
sqlite> my.db
...> create table tb1(one text, two int)
...> insert into tb1 values("hello", 10);
Parse error: near "my": syntax error
my.db create table tb1(one text, two int) insert into tb1 values("hello", 10);
^--- error here
sqlite> create table tb1(one text, two int);
sqlite> insert into tb1 values("hello", 10);
sqlite> select * from tb1
...> ;
hello|10
sqlite>
<입력 & 엔터>
1. sqlite3 (실행)
2. .databases (데이터베이스 보여줘)
3. my.db (내 데이터베이스)
4. create table tb1(one text, two int); (테이블 추가할게 (이렇게))
5. insert into tb1 values("hello", 10); (테이블 값 이거 넣을게)
6. select * from tb1 (테이블의 aspects를 선택)
7. ; (전체)
4에서 ;을 입력 안 해서 오류가 났었음.
위 순대로 입력하면,
hello|10
위 테이블 한 행이 생성된 걸 보여준다.