-
[Mysql] Mac,linux 터미널로 설치시 root 애러카테고리 없음 2019. 8. 15. 17:37
맥 , 리눅스 터미털로 mysql, Maria DB 설치시 root 계정 관련 오류를 뿜는다.
Error 1698 (28000): Access denied for user 'root'@'localhost'
해결법
mysql 8.0 이하 버전 ,
$ mysql.server start $ mysql mysql [none] -> $ use mysql mysql [none] -> $ UPDATE user SET password=PASSWORD(새로운 비밀번호) WHERE user='root';
만약 안되면 ?
mysql [none] -> $ UPDATE user set authentication_string=password('새로운 비밀번호') where user='root';
으로 해보도록 하자 .
MySql 8.0 이상 버전,
$ mysql.server start $ mysql mysql [none] -> $ use mysql mysql [none] -> $ alter user 'root'@'localhost' identified with mysql_native_password by 'root'
이유는 mysql , Maria DB가 2016년 이전 버전과 이후 버전에서 password를 저장하는 정책이 변경되서 그렇다고 한다 .