[OpenSIPS-Users] Add db_mysql module

Bogdan-Andrei Iancu bogdan at voice-system.ro
Thu Mar 25 14:27:28 CET 2010


maybe there is another module that uses the default db_url -> check all 
the module you are using to see if they have a db_url param; if so, set 
it according to your DB setup.

(hint: in the logs, after the access error, you may get some following 
logs about the module that failed to init).

Regards,
Bogdan

brianpocock wrote:
> 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!
>
>   


-- 
Bogdan-Andrei Iancu
www.voice-system.ro




More information about the Users mailing list