DataBase/MySQL
[MySQL] root 패스워트 초기화 방법
S0PH1A
2019. 6. 11. 01:42
반응형
[MySQL] root 패스워트 초기화 방법
- macox (brew)
- mysql 8.0.10.X
$ mysqld_safe --skip-grant-tables &
$ mysql -uroot
> UPDATE mysql.user SET authentication_string=null WHERE User='root';
> FLUSH PRIVILEGES;
> exit;
$ kill -9 [pid]
$ mysql.server start
$ mysql -uroot
> ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpasswd';
반응형