old_passwords · go-sql-driver/mysql Wiki · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

old_passwords

Julien Schmidt edited this page Sep 29, 2017 · 10 revisions

What is old_passwords?

With MySQL version 4.1 (published in 2004!) came a protocol change, which introduced more secure password authentication. The variable old_password was added, which enables legacy support for the old password authentication but disables the new, more secure one. The old password authentication uses very weak hashing which is why it is considered insecure. You should not use it, if you don't need legacy support!

Since it is insecure and deprecated, Go-MySQL-Driver does not enable this old password authentication by default. If you depend on it, you can enable it explicitly by adding allowOldPasswords=true to your DSN.

How to disable it?

Set old_passwords to false in your my.cnf (my.ini on Windows), MySQL's configuration file. On Linux you will find this file at /etc/my.cnf.

The var old_passwords belongs to the mysqld section, if you can't find it there, just add it:

[mysqld]
old_passwords = 0

You may also need to regenerate your passwords. See http://code.openark.org/blog/mysql/upgrading-passwords-from-old_passwords-to-new-passwords for a full manual on how to upgrade.

Clone this wiki locally

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.