<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <font face="Calibri Light">hello<br>
      <br>
      i changed config to like this and now it works:<br>
      <br>
      [default]<br>
      #database_modules: acc clusterer dialog dialplan dispatcher domain
      rtpproxy usrloc<br>
      database_modules: ALL<br>
      <br>
      <br>
      log_level: WARNING<br>
      #prompt_name: opensips-cli<br>
      #prompt_intro: Welcome to OpenSIPS<br>
      #prompt_emptyline_repeat_cmd: False<br>
      #history_file: ~/.opensips-cli.history<br>
      #history_file_size: 1000<br>
      #output_type: pretty-print<br>
      communication_type: fifo<br>
      fifo_file: /tmp/opensips_fifo<br>
      #[mysql]<br>
      database_path: /tmp/opensips-3.1/scripts<br>
      database_name: opensips<br>
      database_admin_url: mysql://root:xxx@localhost<br>
      database_url: mysql://opensips:</font><font face="Calibri Light"><font
        face="Calibri Light">opensipsrw</font>@localhost<br>
      database_schema_path: /tmp/opensips-3.1/scripts<br>
    </font><br>
    <div class="moz-cite-prefix">Miha via Users je 5/3/2021 ob 12:00
      PM napisal:<br>
    </div>
    <blockquote type="cite"
      cite="mid:2be27039-4e75-6986-74df-564049413fc5@softnet.si">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <font face="Calibri Light">Pasting also log:<br>
        <br>
         database create<br>
        DEBUG: running command 'create' '[]'<br>
        DEBUG: db_name: 'opensips'<br>
        Password for admin MySQL user (root): <br>
        DEBUG: read password: 'xxx'<br>
        DEBUG: admin DB URL: 'mysql://root:xxx@localhost'<br>
        DEBUG: connecting to mysql://root:xxx@localhost<br>
        DEBUG: check database URL 'mysql://root:xxx@localhost/opensips'<br>
        DEBUG: DB does not exist<br>
        DEBUG: Create Database 'opensips' for dialect 'mysql' ...<br>
        DEBUG: success<br>
        DEBUG: DB URL: 'mysql://opensips:opensipsrw@localhost'<br>
        DEBUG: connecting to
        mysql://opensips:opensipsrw@localhost/opensips<br>
        INFO: creating access user for opensips ...<br>
/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.")<br>
          cursor.execute(statement, parameters)<br>
        INFO: created user 'opensips'<br>
        INFO: set password 'o********w' for 'opensips' (MySQL)<br>
        INFO: granted access to user 'opensips' on DB 'opensips'<br>
        INFO: flushed privileges<br>
        DEBUG: connecting to
        mysql://opensips:opensipsrw@localhost/opensips<br>
        ERROR: failed to connect to DB as opensips, please provide or
        fix the 'database_url'<br>
      </font><br>
      <div class="moz-cite-prefix">Miha via Users je 5/3/2021 ob 10:50
        AM napisal:<br>
      </div>
      <blockquote type="cite"
        cite="mid:09920984-9b76-ba3b-970e-24c82f2637db@softnet.si">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <font face="Calibri Light">Hello<br>
          <br>
          I have config for opensips-cli like this in
          /etc/opensips-cli.cfg<br>
          <br>
          database_modules: ALL<br>
          <br>
          log_level: WARNING<br>
          prompt_name: opensips-cli<br>
          prompt_intro: Welcome to OpenSIPS at SECUREVOIP<br>
          prompt_emptyline_repeat_cmd: False<br>
          history_file: ~/.opensips-cli.history<br>
          history_file_size: 1000<br>
          output_type: pretty-print<br>
          communication_type: fifo<br>
          fifo_file: /tmp/opensips_fifo<br>
          database_path: /tmp/opensips-3.1/scripts<br>
          database_name: opensips<br>
          database_admin_url: mysql://root:xxxx@localhost:3306/opensips<br>
          database_url:
          mysql://opensips:opensipsrw@localhost:3306/opensips<br>
          <br>
          When i run in opensips-cli shell "database create" i get:<br>
          <br>
          ERROR: failed to connect to DB as opensips, please provide or
          fix the 'database_url'<br>
          <br>
          I can see data DB opensips was created and also opensips user
          was created.<br>
          <br>
          <br>
          thank you<br>
          miha<br>
        </font> <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org" moz-do-not-send="true">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" moz-do-not-send="true">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>