DB/RDBMS
mysql8.0 install in ubuntu 18.04
void
2020. 1. 6. 10:00
설치
$ wget -c https://repo.mysql.com//mysql-apt-config_0.8.13-1_all.deb
$ sudo dpkg -i mysql-apt-config_0.8.13-1_all.deb
$ sudo apt update
$ sudo apt-get install mysql-server
$ sudo mysql_secure_installation
$ mysql -u root -p
출처 :https://www.tecmint.com/install-mysql-8-in-ubuntu/
security는 아래의 글을 참고하였음.
root는 원격접속 불가하게 하기위해서 n으로 설정
출처 : https://whitepaek.tistory.com/16
계정 추가
$ create user '사용자'@'localhost' identified by '비밀번호';
# 특정 계정 테이블 권한 부여
$ grant all privileges on DB이름.* to '사용자'@'localhost';
출처 : https://cjh5414.github.io/mysql-create-user/
Mysql 사용자 추가, 제거 및 권한 부여
Jihun's Development Blog
cjh5414.github.io
참고
# 계정 권한 확인
$ show grants for '사용자'@'localhost';
출처 : https://sleepyeyes.tistory.com/32
아래와 같이 나왔다.
GRANT USAGE ON *.* TO `node`@`localhost` => 권한없음을 뜻한다.
출처 ; https://stackoverflow.com/questions/2126225/why-is-a-grant-usage-created-the-first-time-i-grant-a-user-privileges