MySQL 8 - You must reset your password using ALTER USER statement before executing this statement
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2025
MySQL 8 - You must reset your password using ALTER USER statement before executing this statement
При первом запуске MySQL 8 сервера генерируется случайный root пароль в логах:
# tail -n1000 /var/log/mysql/error.log | grep "temporary password" 2023-04-19T13:51:34.587702Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: pass111
Входим под ним и меняем пароль для root mysql:
# mysql -u root -p mysql> show databases; ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'your_new_password';