How to add mysql option "secure_auth" to red bean connection setup?

436 views
Skip to first unread message

Mountain high Ocean deep

unread,
Dec 27, 2013, 1:08:05 AM12/27/13
to redbe...@googlegroups.com
I have some constraint that the current version of my MySQL cannot be upgraded at this moment. The current version need to set "secure_auth = off" when we use remote connection to MySQL sever. The reference of this constant is http://bugs.mysql.com/bug.php?id=69027

I try to find a solution to set mysql option to RedBean setup but the error cannot be fixed.

An error message show by RedBean
"Fatal error: Uncaught exception 'PDOException' with message 'Could not connect to database"

An error message  show by mysql client when we don't use "secure_auth=off"
ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol refused (client option 'secure_auth' enabled)

Thank you very much for your advice.  I cannot fine any documentation for solving this problem,

gabor

unread,
Dec 27, 2013, 4:44:08 AM12/27/13
to redbe...@googlegroups.com


Hi,

From the bug report discussion you referenced:

"
The workaround ("solution", really) to this is to change the password for the affected user to a post-4.1 hash. 
"

If that does not work and you need to set some sort of option, just create a PDO instance yourself, configured it the way you like it and pass this PDO object to R::setup(),
RedBeanPHP will accept the PDO object as its connection.

Let us know if this works.

Cheers,
Gabor
Reply all
Reply to author
Forward
0 new messages