인디노트

MYSQL root password change from 8.x 본문

개발 플랫폼 및 언어/DB 기술

MYSQL root password change from 8.x

인디개발자 2020. 8. 24. 16:29

Update: On 8.0.15 (maybe already before that version) the PASSWORD() function does not work You have to do:

  1. Make sure you have Stopped MySQL first (above).
  2. Run the server in safe mode with privilege bypass: sudo mysqld_safe --skip-grant-tables
    mysql -u root
    UPDATE mysql.user SET authentication_string=null WHERE User='root';
    FLUSH PRIVILEGES;
    exit;
    Then
    mysql -u root
    ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'yourpasswd';
반응형
Comments