secure auth error connecting to SQL server from RMySQL
Asked Answered
M

1

7

I m trying to connect to a MySQL server on a VM from RMySQL, here are the commands i executed

c<-dbConnect(MySQL(), user="root", password="passw0rd", dbname="leopard", host="one-1368")

It is showing the following error

RS-DBI driver: (Failed to connect to database: Error: Connection using old 
(pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)

I m using MySQL client 5.6 on my system and the VM shows that it is running 5.5. I think it might be an issue on the server version.

Any help would be appreciated. Thank You

Mozellamozelle answered 18/6, 2013 at 6:24 Comment(0)
S
0

You may have an old my.cnf configuration on your local machine. You can override the client option secure_auth in my.cnf or in a specific config file you pass to dbConnect()

dbConnect(MySQL(), default.file="your-file.cnf"

The info on the setting is here:

https://dev.mysql.com/doc/refman/5.6/en/mysql-command-options.html#option_mysql_secure-auth

As an aside, you should really not be using 4.1-style password hashing :)

Shutdown answered 24/6, 2014 at 14:7 Comment(2)
Thanks, but i fixed the issue by using a compatible version of MySQL client. I m a little bit hazy on the details because it was more than an year ago. But thanks for the help. :)Mozellamozelle
It would be great to update this with your answer and accept your own solution!Shutdown

© 2022 - 2024 — McMap. All rights reserved.