Your connection attempt failed for user 'root' to the MySQL server at localhost:3306: Access denied for user 'root'@'localhost' (using password: YES) code example
Example: mysql access denied for user 'root'@'localhost'
sudo mysql
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';