mysqlcheck: Got error: 1045: 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 when trying to connect code example

Example: MySQL said: Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(/usr/local/lib/plugin/caching_sha2_password.so, 2): image not found

ALTER USER 'username'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

restert mysql 
sudo mysql.server restart

Tags:

Sql Example