<div><div dir="auto">Thanks for replying guys,</div></div><div dir="auto"><br></div><div dir="auto">Yeah this also happens on K, but in K’s case I get. Prompt to provide a collation...</div><div dir="auto"><br></div><div dir="auto">I’ll try your suggestion, thanks!!</div><div dir="auto"><br></div><div dir="auto">David</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 18 Jun 2019 at 03:39, Liviu Chircu <<a href="mailto:liviu@opensips.org">liviu@opensips.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p><tt>Good spot, that is exactly the problem!  This issue seems to
        be more prevalent with MariaDB,<br>
        where the default database charset is "utf8mb4", and not
        "latin1" as in the MySQL packages.</tt></p>
    <p><tt>This answer[1] also includes some MariaDB server settings
        which should allow the creation<br>
        of keys on VARCHAR(255) columns even if using the utf8mb4
        charset.</tt></p>
    <tt>[1]: <a class="m_-2323252189234906561moz-txt-link-freetext" href="https://stackoverflow.com/a/36405914/2054305" target="_blank">https://stackoverflow.com/a/36405914/2054305</a></tt>
    <pre class="m_-2323252189234906561moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="m_-2323252189234906561moz-txt-link-freetext" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre></div><div bgcolor="#FFFFFF" text="#000000">
    <div class="m_-2323252189234906561moz-cite-prefix">On 18.06.2019 10:31, Callum Guy wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Hi David,<br>
        <div><br>
        </div>
        <div>This seems to be a database collation issue - did you
          create the database manually and do you have the option to
          change the charset?</div>
        <div><br>
        </div>
        <div><a href="https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes" target="_blank">https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes</a><br>
        </div>
        <div><br>
        </div>
        <div>Not sure what the correct options would be for you however
          I am sure you can work that out :)</div>
        <div><br>
        </div>
        <div>Good luck!</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Tue, 18 Jun 2019 at 03:59,
          David Villasmil <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Hello guys,</div>
            <div><br>
            </div>
            <div>When executing `create database` with opensips-cli i'm
              getting:</div>
            <div><br>
            </div>
            <div><span>root@opensip1:~# opensips-cli</span></div>
            <div><span>mysql://opensips:<span style="font-family:"courier new",monospace">password</span>@<a href="http://127.0.0.1" target="_blank">127.0.0.1</a><br>
                Welcome to OpenSIPS Command Line Interface!<br>
                (opensips-cli): database create<br>
                Please provide us the URL of the database:
                mysql://opensips:<span>password</span>@<a href="http://127.0.0.1" target="_blank">127.0.0.1</a><br>
                Create [a]ll tables or just the [c]urrently configured
                ones? (Default value is a): a<br>
                Creating all tables ...<br>
                Running standard-create.sql...<br>
                Running cachedb_sql-create.sql...<br>
                ERROR: Error closing cursor<br>
                Traceback (most recent call last):<br>
                  File "/usr/lib/python3.5/cmd.py", line 214, in onecmd<br>
                    func = getattr(self, 'do_' + cmd)<br>
                AttributeError: 'OpenSIPSCLIShell' object has no
                attribute 'do_database'<br>
                <br>
                During handling of the above exception, another
                exception occurred:<br>
                <br>
                Traceback (most recent call last):<br>
                  File
"/usr/local/lib/python3.5/dist-packages/SQLAlchemy-1.3.3-py3.5-linux-x86_64.egg/sqlalchemy/engine/base.py",
                line 1333, in _safe_close_cursor<br>
                    cursor.close()<br>
                  File
                "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py",
                line 86, in close<br>
                    while self.nextset():<br>
                  File
                "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py",
                line 136, in nextset<br>
                    nr = db.next_result()<br>
                MySQLdb._exceptions.OperationalError: (1071, 'Specified
                key was too long; max key length is 767 bytes')</span></div>
          </div>
        </blockquote>
      </div>
    </blockquote>
  </div><div bgcolor="#FFFFFF" text="#000000"></div>

_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>