<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Husnain,<br>
<br>
Try the following change:<br>
<br>
diff --git a/modules/db_mysql/my_con.c b/modules/db_mysql/my_con.c<br>
index 8fa7840..7bedbaf 100644<br>
--- a/modules/db_mysql/my_con.c<br>
+++ b/modules/db_mysql/my_con.c<br>
@@ -30,6 +30,7 @@<br>
<br>
int db_mysql_connect(struct my_con* ptr)<br>
{<br>
+ my_bool secure_auth = 0;<br>
/* if connection already in use, close it first*/<br>
if (ptr->init)<br>
mysql_close(ptr->con);<br>
@@ -41,6 +42,7 @@ int db_mysql_connect(struct my_con* ptr)<br>
mysql_options(ptr->con, MYSQL_OPT_CONNECT_TIMEOUT,
&db_mysql_timeout_interval);<br>
mysql_options(ptr->con, MYSQL_OPT_READ_TIMEOUT,
&db_mysql_timeout_interval);<br>
mysql_options(ptr->con, MYSQL_OPT_WRITE_TIMEOUT,
&db_mysql_timeout_interval);<br>
+ mysql_options(ptr->con, MYSQL_SECURE_AUTH,
&secure_auth);<br>
<br>
if (ptr->id->port) {<br>
LM_DBG("opening connection:
mysql://xxxx:xxxx@%s:%d/%s\n",<br>
<br>
<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
<div class="moz-cite-prefix">On 28.12.2015 13:04, Husnain Taseer
wrote:<br>
</div>
<blockquote
cite="mid:CALkA4hK45-LkSu1oeZ0StOgboCBvF9vMYJH8iFOauEGSUVd5rQ@mail.gmail.com"
type="cite">
<div dir="ltr">Dear Users,
<div>We have opensips deployed in production environment on a
Centos machine.Version of MySQL installed on that machine is
old so the authentication plugin which is being used on that
mysql server is mysql_old_password. The db user supports old
(pre-4.1) Hashing method and we don't want to upgrade it to
newer version because we have too many users which are using
that database. Now when I try to connect opensips with the db
using mysql module it gives me this error:<br>
<i><br>
</i>
<div><i> ERROR:db_mysql:db_mysql_connect: driver error(2049):
Connection using old (pre-4.1.1) authentication protocol
refused (client option 'secure_auth' enabled)</i></div>
<div><i>Dec 28 13:21:40 AppServerI ../../sbin/opensips[5211]:
ERROR:db_mysql:db_mysql_new_connection: initial connect
failed</i></div>
<div><i>Dec 28 13:21:40 AppServerI ../../sbin/opensips[5211]:
ERROR:core:db_do_init: could not add connection to the
pool</i></div>
<div><i>Dec 28 13:21:40 AppServerI ../../sbin/opensips[5211]:
ERROR:uri:mod_init: Could not connect to database</i></div>
<div><i>Dec 28 13:21:40 AppServerI ../../sbin/opensips[5211]:
ERROR:core:init_mod: failed to initialize module uri</i></div>
<div><i>Dec 28 13:21:40 AppServerI ../../sbin/opensips[5211]:
ERROR:core:main: error while initializing modules</i></div>
</div>
<div><i><br>
</i></div>
<div>Is there any way to disable secure_auth in mysql_db module
of opensips ? like from shell mysql client we can use
--skip-secure-auth to disable it.</div>
<div><br>
Regards,</div>
<div>Husnain Taseer</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>