Skip to content
On this page

2020-12-17

Title
2020-12-17
Category
2020
Tags
Aliases
2020-12-17
Created
3 years ago
Updated
last year

MySQL 데이터베이스 생성

sql
CREATE DATABASE mydb;
--- 아이디 및 패스워드 설정
CREATE USER 'myuserid'@'%' IDENTIFIED BY 'mypassword';
GRANT ALL ON mydb.* TO 'myuserid'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE mydb;
--- 아이디 및 패스워드 설정
CREATE USER 'myuserid'@'%' IDENTIFIED BY 'mypassword';
GRANT ALL ON mydb.* TO 'myuserid'@'%';
FLUSH PRIVILEGES;

mydb: 데이터베이스 이름

myuserid: 사용자 id

mypassword: 사용자 패스워드

사용자 패스워드가 생각나지 않을 때

루트 사용자로 로그인 후 일반 사용자 패스워드는 쉽게 변경 가능

sql
SET PASSWORD FOR 'myuserid'@'%'='new_password';
FLUSH PRIVILEGES;
SET PASSWORD FOR 'myuserid'@'%'='new_password';
FLUSH PRIVILEGES;

데이터베이스 설계

https://medium.com/@Mareks_082/auto-increment-keys-vs-uuid-a74d81f7476a

https://tomharrisonjr.com/uuid-or-guid-as-primary-keys-be-careful-7b2aa3dcb439

https://www.percona.com/blog/2019/11/22/uuids-are-popular-but-bad-for-performance-lets-discuss/

https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/

https://medium.com/aha-official/아하-rest-api-서버-개발-6-43568d94878a

Node + Express

https://github.com/goldbergyoni/nodebestpractices#2-error-handling-practices

TypeScript + Sequelize

https://github.com/maximegris/typescript-express-sequelize/blob/master/src/sqlz/config/config.json

https://sequelize.org/v5/manual/migrations.html

Sequelize + Crypto

https://medium.com/@benjaminpwagner/using-sequelize-hooks-and-crypto-to-encrypt-user-passwords-5cf1a27513d9

https://medium.com/aha-official/아하-rest-api-서버-개발-7-712e0588579f

Jest did not exit one second after the test run has completed using express

https://stackoverflow.com/a/63299022/12983614

Wrap Async

https://medium.com/@changjoopark/express-라우트에서-async-await를-사용하려면-7e8ffe0fcc84

Released under the MIT License.