[OpenSIPS-Users] opensips-cli issue with DB creation

Miha miha at softnet.si
Mon May 3 10:00:24 EST 2021


Pasting also log:

  database create
DEBUG: running command 'create' '[]'
DEBUG: db_name: 'opensips'
Password for admin MySQL user (root):
DEBUG: read password: 'xxx'
DEBUG: admin DB URL: 'mysql://root:xxx@localhost'
DEBUG: connecting to mysql://root:xxx@localhost
DEBUG: check database URL 'mysql://root:xxx@localhost/opensips'
DEBUG: DB does not exist
DEBUG: Create Database 'opensips' for dialect 'mysql' ...
DEBUG: success
DEBUG: DB URL: 'mysql://opensips:opensipsrw@localhost'
DEBUG: connecting to mysql://opensips:opensipsrw@localhost/opensips
INFO: creating access user for opensips ...
/usr/local/lib/python3.7/dist-packages/SQLAlchemy-1.3.3-py3.7-linux-x86_64.egg/sqlalchemy/engine/default.py:552: 
Warning: (3163, "Authorization ID 'opensips'@'%' already exists.")
   cursor.execute(statement, parameters)
INFO: created user 'opensips'
INFO: set password 'o********w' for 'opensips' (MySQL)
INFO: granted access to user 'opensips' on DB 'opensips'
INFO: flushed privileges
DEBUG: connecting to mysql://opensips:opensipsrw@localhost/opensips
ERROR: failed to connect to DB as opensips, please provide or fix the 
'database_url'

Miha via Users je 5/3/2021 ob 10:50 AM napisal:
> Hello
>
> I have config for opensips-cli like this in /etc/opensips-cli.cfg
>
> database_modules: ALL
>
> log_level: WARNING
> prompt_name: opensips-cli
> prompt_intro: Welcome to OpenSIPS at SECUREVOIP
> prompt_emptyline_repeat_cmd: False
> history_file: ~/.opensips-cli.history
> history_file_size: 1000
> output_type: pretty-print
> communication_type: fifo
> fifo_file: /tmp/opensips_fifo
> database_path: /tmp/opensips-3.1/scripts
> database_name: opensips
> database_admin_url: mysql://root:xxxx@localhost:3306/opensips
> database_url: mysql://opensips:opensipsrw@localhost:3306/opensips
>
> When i run in opensips-cli shell "database create" i get:
>
> ERROR: failed to connect to DB as opensips, please provide or fix the 
> 'database_url'
>
> I can see data DB opensips was created and also opensips user was created.
>
>
> thank you
> miha
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210503/39ba4454/attachment.html>


More information about the Users mailing list