Why has my root password changed after I updated MySQL from 5.7 to 8.0?
MYSQL changed the default
If you chosen

Use Strong Password Encryption for Authentication (RECOMMENDED)

mysql 8.x uses the new authentication based on improved, stronger SHA256-based password methods.
https://dev.mysql.com/doc/mysql-installer/en/server-authentication-method.html
when you and your apps don't support it, you have to choose the legacy mode
But you can use user with the old authentficationwhen you use
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '&lt;password&gt;';

You have to add native password to all your  roo
'root'@'::1'   refers ipv6 localhost
'root'@'127.0.0.1'
And
'root'@'localhost'  zto ip V4
As you connect via 1pv6 change this apsword as well but use 'root'@'::1'`
localhoszt and 127.0.0.1 only work on a computer itself not over a network
how you can bind  the server to ipv4 or ipv6 is described here https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html
And as last poit see upgrade instructions in mysql, you can't only exchange the exe https://dev.mysql.com/doc/refman/8.0/en/upgrading.html