본문 바로가기

MySQL4

[MySQL] mysql cli syntax highlighter mycli 기존 mycli install $ brew update && brew install mycli # Only on macOS 사용법 $ mycli -u user -p db_name $ mycli -u user -h host_name -p db_name MySQL command line tool 에서 syntax highlighting 과 자동완성을 사용할 수 있다. 참고 : https://github.com/dbcli/mycli https://www.cyberciti.biz/open-source/command-line-hacks/mycli-awesome-mysqlmariadbpercona-mysql-client-with-auto-completion-and-syntax-highlighting/ 2022. 9. 1.
[MySQL] MySQL 서버 실행 확인, 데이터베이스 생성 (+ MySQL Unknown database 해결) mysql database 실행 확인 netstat -an | grep 3306 mysql 서버 실행 mysql 접속 database 목록 확인 show databases; 데이터베이스 생성 create database test_db; 참고 : https://jerryjerryjerry.tistory.com/121 2022. 8. 31.
[MySQL] MySQL user 목록, 추가 user 목록 확인 mysql 서버 실행 mysql.server start mysql 접속 mysql -u root -p mysql 기본 스키마인 mysql 사용 use mysql; user 확인 SELECT user, host FROM user; user 추가 user 추가 create user test@localhost identified by '1234'; 권한 부여 grant all privileges on *.* to test@localhost; user 목록 확인 참고 : https://velog.io/@taelee/mysql-user%ED%99%95%EC%9D%B8-%EB%B0%8F-%EC%B6%94%EA%B0%80 https://ssungkang.tistory.com/entry/MySQL-.. 2022. 8. 31.
[MySQL/AWS] MySQL 데이터베이스 엔진을 실행하는 RDS DB 인스턴스에 연결하기 1. MySQL command-line client 에서 연결 1-1) MySQL RDS DB 인스턴스의 데이터베이스에 연결하기 PROMPT> mysql -h -P -u -p 1-2) 위 명령어를 입력하면 Enter password: 가 뜸. 비밀번호 입력 1-3) 데이터베이스 리스트 보기 show databases; 1-4) chloe 데이터베이스 사용하기 use chloe 1-5) 테이블 리스트 보기 show tables; 2. MySQL Workbench에서 연결 2-1) Database > Manage Connections 클릭 2-2) Manage Server Connections 창에서 New 클릭 2-3) Connect to Database 창에서 다음 정보 입력 Connection Name.. 2022. 8. 30.