ec2 리눅스 ubuntu mysql 설치법

u·2021년 9월 25일
0

Aws & Server

목록 보기
4/18
  1. ssh 접속

  2. sudo apt-get install mysql-server

  3. /etc/mysql

  4. mysql -uroot -p (초기 비밀번호 : 엔터)

  5. 비밀번호 설정해주기 (version 8.0 기준)

1.use mysql;
2.select host, user, authentication_string from user;
( 여기서 현재 mysql에서 사용가능한 계정 목록을 볼 수 있다)
3.update user set authentication_string = '비밀번호' where user = 'root';

-> 이 방법을 사용하면 우분투에서 실행 시 디비에 접속할 수 없다는 오류가 난다.

그래서 아래 방법을 이용하는 절차를 밟아보도록 하자.

alter user 'root'@'localhost' identified with mysql_native_password by 'new_password_you_want';

mysql 삭제

https://wglee87.github.io/2020/07/24/MySQL-Ubuntu%EC%97%90%EC%84%9C-MySQL-%EC%99%84%EC%A0%84-%EC%82%AD%EC%A0%9C%ED%95%98%EA%B8%B0/

0개의 댓글