[OpenSIPS-Users] OpenSIPS 3 - can't create database

David Villasmil david.villasmil.work at gmail.com
Wed Jun 19 00:24:13 EDT 2019


Ok, so i uninstalled mysql 5.6 and installed 5.7 and all built properly.

Thanks everyone!

Regards,

David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337


On Tue, Jun 18, 2019 at 8:29 AM David Villasmil <
david.villasmil.work at gmail.com> wrote:

> Thanks for replying guys,
>
> Yeah this also happens on K, but in K’s case I get. Prompt to provide a
> collation...
>
> I’ll try your suggestion, thanks!!
>
> David
>
> On Tue, 18 Jun 2019 at 03:39, Liviu Chircu <liviu at opensips.org> wrote:
>
>> Good spot, that is exactly the problem!  This issue seems to be more
>> prevalent with MariaDB,
>> where the default database charset is "utf8mb4", and not "latin1" as in
>> the MySQL packages.
>>
>> This answer[1] also includes some MariaDB server settings which should
>> allow the creation
>> of keys on VARCHAR(255) columns even if using the utf8mb4 charset.
>> [1]: https://stackoverflow.com/a/36405914/2054305
>>
>> Liviu Chircu
>> OpenSIPS Developerhttp://www.opensips-solutions.com
>>
>> On 18.06.2019 10:31, Callum Guy wrote:
>>
>> Hi David,
>>
>> This seems to be a database collation issue - did you create the database
>> manually and do you have the option to change the charset?
>>
>>
>> https://stackoverflow.com/questions/1814532/1071-specified-key-was-too-long-max-key-length-is-767-bytes
>>
>> Not sure what the correct options would be for you however I am sure you
>> can work that out :)
>>
>> Good luck!
>>
>> On Tue, 18 Jun 2019 at 03:59, David Villasmil <
>> david.villasmil.work at gmail.com> wrote:
>>
>>> Hello guys,
>>>
>>> When executing `create database` with opensips-cli i'm getting:
>>>
>>> root at opensip1:~# opensips-cli
>>> mysql://opensips:password@127.0.0.1
>>> Welcome to OpenSIPS Command Line Interface!
>>> (opensips-cli): database create
>>> Please provide us the URL of the database: mysql://opensips:password@
>>> 127.0.0.1
>>> Create [a]ll tables or just the [c]urrently configured ones? (Default
>>> value is a): a
>>> Creating all tables ...
>>> Running standard-create.sql...
>>> Running cachedb_sql-create.sql...
>>> ERROR: Error closing cursor
>>> Traceback (most recent call last):
>>>   File "/usr/lib/python3.5/cmd.py", line 214, in onecmd
>>>     func = getattr(self, 'do_' + cmd)
>>> AttributeError: 'OpenSIPSCLIShell' object has no attribute 'do_database'
>>>
>>> During handling of the above exception, another exception occurred:
>>>
>>> Traceback (most recent call last):
>>>   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
>>>     cursor.close()
>>>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
>>> 86, in close
>>>     while self.nextset():
>>>   File "/usr/local/lib/python3.5/dist-packages/MySQLdb/cursors.py", line
>>> 136, in nextset
>>>     nr = db.next_result()
>>> MySQLdb._exceptions.OperationalError: (1071, 'Specified key was too
>>> long; max key length is 767 bytes')
>>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
> --
> Regards,
>
> David Villasmil
> email: david.villasmil.work at gmail.com
> phone: +34669448337
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190619/b9a478d3/attachment.html>


More information about the Users mailing list