I'm trying to run a Perl script that updates a MySQL database from a third party remote server. Everything works fine on my home PC however I've just moved my setup onto AWS and I'm now getting an error from this line:
$dbh = DBI->connect("DBI:mysql:oncourt:127.0.0.1","root","root",{ RaiseError => 1, AutoCommit => 0 }) || die $DBI::errstr;
The error is:
DBI connect('oncourt:127.0.0.1','root',...) failed: Authentication plugin 'caching_sha2_password' cannot be loaded: The specified module could not be found.
I have had this error before when I moved machines and I solved it by adding a .mylogin.cnf
file to C:\Users\<username>\AppData\Roaming\MySQL
. However, this isn't working for me now - could it be anything to do with the fact that I'm now logged in as Administrator
rather than a standard user?
Any ideas on how to solve this?