user2296414
user2296414

Reputation: 1

MySQL database connection through PowerShell, old style password

I am attempting to connect to a MySQL server through powershell. However, my password doesn't seem to work because "Authentication with old password no longer supported, use 4.1 style passwords." I am using the MySQL ADO.NET driver to connect and everything has returned no error up to this point.

# Connection Variables 
$user = 'cantshowusernamehere' 
$pass = 'PretendRealPassword' 
$database = 'PretendDatabaseHere' 
$MySQLHost = 'something.something.ca' 

# Connect to MySQL Database 
$conn = Connect-MySQL $user $pass $MySQLHost $database

will return me

Exception calling "Open" with "0" argument(s): "Authentication with old password no longer supported, use 4.1 style passwords."

Anyone know how I can change to a new style password through PowerShell? Thanks, I have been searching for a couple hours now, and the only solutions out there are for people utilizing other programs such as PHP for their SQL work.

Upvotes: 0

Views: 1190

Answers (1)

Signal15
Signal15

Reputation: 587

I had to down-grade the version of MySQL .NET Connector I was using (latest: 6.9.7, fell back to 6.5.7). I realize this goes against the common wisdom of "fix your database server", however it's internal and there are far too many resources using this to weigh the risk of setting old_passwords=0 and resetting all of the (known) passwords to update their hashes (just to find out we've broke some buried tool somewhere)

Upvotes: 1

Related Questions