ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded

When I try to connect to a MySQL 8 server, I get the following error root@ok:~# mysql -u serverok -p’PW_HERE’ -h db-mysqlserverok.in -P 3306 ERROR 1045 (28000): Plugin caching_sha2_password could not be loaded: /usr/lib/x86_64-linux-gnu/mariadb19/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory root@ok:~# This is because of MySQL 8 use more secure authentication. … Read more

You must reset your password using ALTER USER

On MySQL 8, when you start MySQL, it generate a temporary root password, that you can find with command grep ‘temporary password’ /var/log/mysqld.log When i try run some SQL commands after login with this temporary password, i get error ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. … Read more