Question

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

Was it helpful?

Solution

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 :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top