[OpenSIPS-Users] Add db_mysql module

brianpocock briankeithjames at googlemail.com
Thu Mar 25 13:03:08 CET 2010


Right, I realised I was missing these parameters from the config: 

modparam("auth_db", "db_url","mysql://root:password@localhost/opensips")
modparam("auth_db", "load_credentials", "")

So I've added those and all the auth_db parameters are:
modparam("auth_db", "calculate_ha1", yes)  
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url","mysql://root:brian129@localhost/opensips")
modparam("auth_db", "load_credentials", "")

The guide on the OpenSIPS website tells me to uncomment these lines:
if (is_method("REGISTER"))
	{
		# authenticate the REGISTER requests (uncomment to enable auth)
		if (!www_authorize("", "subscriber"))
		{
			www_challenge("", "0");
			exit;
		}
	}

Which I have done and now when starting it there is this error in
/var/log/messages:
ERROR:db_mysql:db_mysql_connect: driver error(1045): Access denied for user
'opensips'@'localhost' (using password: YES) 

which I think is whats probably causing it.   I have set the username and
password in the opensipsctlrc file, content of this file minus the comments
is shown below:
SIP_DOMAIN=192.168.1.2
DBENGINE=MYSQL
DBHOST=localhost
DBNAME=opensips
DBRWUSER=root
DBRWPW="password"
DBROUSER=root
DBROPW=password
DBROOTUSER="root"
USERCOL="username"
INSTALL_EXTRA_TABLES=ask
INSTALL_PRESENCE_TABLES=ask
ALIASES_TYPE="DB"
CTLENGINE="FIFO"
OSIPS_FIFO="/tmp/opensips_fifo"
PID_FILE=/var/run/opensips.pid
(passwords have been changed)

Where is it getting user 'opensips'@'localhost' (using password: YES) from?
or am i going completely wrong here?

Thanks for all the help!

-- 
View this message in context: http://n2.nabble.com/Add-db-mysql-module-tp4791554p4797163.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.



More information about the Users mailing list