$ sudo apt-get update $ sudo apt-get install mysql-server // 방화벽 설정 $ sudo ufw allow mysql $ sudo systemctl start mysql $ sudo systemctl enable mysql 'mysql' 명령어가 아닌 '/usr/bin/mysql' 로 접속하면 접속이 가능하다 $ sudo /usr/bin/mysql -u root -p 패스워드 입력은 공백에 엔터 누르면 접속 된다. 이후 패스워드 설정은 mysql 상태에서 mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '바꿀비번'; https://nuggy875.tistory.com/..
Error: Expression #41 of SELECT list is not in GROUP BY clause and contains nonaggregated column '{___}->{___}.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 위와 같은 에러가 떴을 때, only_full_group_by 를 해제해줘야한다. 우선 mysql 접속하여 설정 되어있는지 확인해보자 mysql> select @@sql_mode; 위와 같이 ONLY_FULL_GROUP_BY 가 포함되어있다면, 이를 없애주자. SET GLOBAL sql_m..
MySQL DB 백업 $ mysqldump -u [MySQL username] -p [백업할 DB 스키마 이름] > [생성할 백업파일 명].sql $ password : [패스워드 입력] 예시 ) $ mysqldump -u root -p service_db > service_db_1.sql $ password : 123123 MySQL DB 복원 $ mysql -u [MySQL username] -p [복원할 DB 스키마 이름] < [복원할 백업파일 명].sql 예시 ) $ mysql -u root -p service_db < service_db_1.sql $ password : 123123 --all-databases 모든 데이터베이스에 대해서 --default-character-set=euckr 한글..
서비스 개발을 진행하다보면, 서비스 도중 데이터 구조를 수정한다거나 Column을 추가하거나 삭제하거나 하는 경우가 종종 있다. MySQL 에서 데이터 Migration 을 Sequelize 명령어를 통해 간단히 진행 가능하다. migrations/ 폴더에 Migration 파일 생성 $ npx sequelize migration:create --name "[마이그레이션 생성 파일 이름]" 생성된 js파일에 수정할 내용 작성 Migration 실행 // up에 있는 코드를 실행 $ npx sequelize-cli db:migrate // down에 있는 코드를 실행하여 되돌리기 $ npx sequelize-cli db:migrate:undo:all
스키마(데이터베이스) > 테이블(Table) > 컬럼(Column) 스키마 (데이터베이스) 보기 mysql> show databases; 스키마 생성 mysql> CREATE SCHEMA `nodejs` DEFAULT CHARACTER SET utf8; 스키마 사용 mysql> use nodejs; 테이블 확인 (테이블이 뭐뭐 있는지) mysql> SHOW TABLES; 테이블 생성 (복붙을 위해 ->는 생략) 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, c..
- Total
- Today
- Yesterday
- git
- Object Detection
- SSH
- Python
- MySQL
- Novel View Synthesis
- 우분투
- ubuntu
- GPU
- MacOS
- nvidia
- 3Dvision
- java
- vscode
- Computer Vision
- pytorch
- Android
- Neural Radiance Field
- error
- numpy
- nerf
- CUDA
- GaussianSplatting
- 2-stage Detector
- Machine Learning
- Macbook
- Deep Learning
- Anaconda
- Docker
- nginx
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |