I find that we need to set the SQL_HOST in openserctl. Or write
SQL_HOST=db in /usr/local/etc/openser/.openserctlrc.
----------------
After setting it up, I am facing the other problem.
I am confused for the below functions in the register method.
if (!www_authorize("","subscriber")) {
www_challenge("","0");
return;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
return;
};
If openser and mysql are installed in the same machine, above
statement will work. However, if they are installed in different
machine, about statements will failed. for example.
openser installed in
openser.example.com (10.0.0.1)
mysql installed in
mysql.example.com (10.0.0.2)
In subscriber table, we have some accounts and the value of domain
field is
openser.example.com
What should be filled in the functions
www_authorize("[input]","subscriber")) and
www_challenge("[input]","0") for the above case? If I fill with
openser.example.com, the above functions will still failed.
On 1/21/06, unplug <maillisting(a)gmail.com> wrote:
How does openser connect to mysql which is not in the
same machine
(say openser is in 10.0.0.1 and mysql is in 10.0.0.2)? I have
configured all mysql statement in the configuration file as
"mysql://openser:openserrw@10.0.0.2/openser" but openser failed to
start. Below is the error message from the log.
Jan 21 14:25:51 owthkems01 /usr/local/sbin/openser[12298]:
new_connection: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
Jan 21 14:25:51 owthkems01 /usr/local/sbin/openser[12298]:
ERROR:domain_db_init: cannot initialize database connection
Jan 21 14:25:51 owthkems01 /usr/local/sbin/openser[12298]: ERROR:
domain:child_init(): Unable to connect to the database
Jan 21 14:25:51 owthkems01 /usr/local/sbin/openser[12298]:
ERROR:init_mod_child: Error while initializing module domain, rank 1