Praveen Prasannan
Praveen Prasannan

Reputation: 7133

MYSQL ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled)

when I tried to restore all database dump which is in 5.0 version to 5.6 version, it got restored and after that when I tried to reconnect, am getting the following error

ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled)..

I have tried adding the following lines in My.ini and restarted the service,but the issue persist till.

skip-grant-tables

The following link says its a bug in MYSQL.

https://github.com/santisaez/powerstack/blob/master/packages/mysql/mysql-powerstack-secure_auth.patch

Do anyone have any fixes for this solution?

Upvotes: 9

Views: 35853

Answers (8)

ShaunOReilly
ShaunOReilly

Reputation: 2206

On the command line, use something like the following, if you have no choice...

mysql -uTheUseerNAme -pThePassword DbName -h HostName --skip-secure-auth

Hope this helps someone, as this was my problem connecting from a Linux box

Upvotes: 13

Dmgx
Dmgx

Reputation: 1

I had similar issue, but using MAC Terminal connecting remote MySQL db.

Solution: I create a new user with less special characters, that problem disappeared.

Upvotes: 0

nobjta_9x_tq
nobjta_9x_tq

Reputation: 1241

Using the way like rayVenues but you should change your password connection, it will work fine :)

Upvotes: 0

Digant
Digant

Reputation: 398

Fixed as of MySQL Workbench 6.0.7, and here's the changelog entry:

A new option was added in the connection settings "Advanced" tab for disabling the secure_auth (useLegacyAuth) option, to optionally connect to legacy systems.

enter image description here

Upvotes: 2

Alex
Alex

Reputation: 1295

I've got same problem in Centos 7 with MySQL. If i try to connect by mysql client:

ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)

Bu in my case if I specify:

--skip-secure-auth

it cause error message:

ERROR 1275 (HY000): Server is running in --secure-auth mode, but 'root'@'localhost' has a password in the old format; please change the password to the new format

It work only when i specify:

in /etc/my.cnf

[mysqld]
...
secure_auth=false

and then restart mysqld

Upvotes: 1

PeterVermont
PeterVermont

Reputation: 2002

For MySQL Workbench 6.08 in the Manage Server Connections, Connection tab, Advanced sub-tab you must check the box 'Use the old authentication protocol.'

Upvotes: 1

Thermech
Thermech

Reputation: 4451

Best thing to do is to reset your user password to the new hashing algorithm

With workbench: http://blogs.technicise.com/change-root-password-in-mysql-workbench/

Command line: http://www.cyberciti.biz/faq/mysql-change-root-password/

Upvotes: 3

rayVenues
rayVenues

Reputation: 364

Use this workaround for MySQLWorkBench 6.0 at the Manage Server Connections Dialog Box:

Add useLegacyAuth=1 in the Advanced options box in the connection settings dialog.

Upvotes: 25

Related Questions