ssh 접속
sudo apt-get install mysql-server
/etc/mysql
mysql -uroot -p (초기 비밀번호 : 엔터)
비밀번호 설정해주기 (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';