Error message as follows:
Error when connecting to server: Your password has expired. To log in you must change it using a client that supports expired passwords.

Log into MySQL, set a new password, and configure it to never expire:
mysql -uroot -p
SET PASSWORD = PASSWORD('root123456');
ALTER USER 'root'@'localhost' PASSWORD EXPIRE NEVER;
As shown below:
