Your connection attempt failed for user 'root' to the MySQL server at localhost:3306: code example
Example: mysqlworkbench Your connection attempt failed for user 'root' from your host to server at 127.0.0.1:3306: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/mysql/lib/plugin/caching_sha2_password.so, 2): image not found
mysql -u root -p -h 127.0.0.1 -P 3306
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';