[OpenSIPS-Users] opensips-cli database create crashes if username is not opensips
john.quick at smartvox.co.uk
Wed May 5 14:16:56 EST 2021
I am new to v3 and just started learning how to use opensips-cli.
With the old v2.4 opensipsdbctl utility it was possible to change the
username before creating the database and the dbctl utility would create a
new user in MySQL with the specified name and password, giving them
appropriate privileges for r/w access to the data in the tables.
When I try to do the equivalent in opensips-cli, it creates a new database
called opensips (with no tables), then crashes:
(osipscli-local): database create
Password for admin MySQL user (root):
Traceback (most recent call last):
File "/usr/lib/python3.7/cmd.py", line 214, in onecmd
func = getattr(self, 'do_' + cmd)
AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
I've experimented and confirmed that the 'database create' command works
fine as long as the username is left as default "opensips".
i.e. if this line is present in the opensips-cli.cfg file then it will crash
when I create the database:
..but if it looks like this instead then it works okay:
I tried it with and without the following line, but it made no difference:
I'm using the Debian buster binaries from Nick Altmann's repository. V3.1.1
# opensips-cli -v
OpenSIPS CLI 0.1.0
More information about the Users