[TIPS] Error Create Database OpenSIPS Dengan “opensipsdbctl create”

Baru iseng-iseng nguprek OpenSIPS, pada saat create database dengan tool opensipsdbctl create, saya mendapatkan error berikut:

error: RROR 1101 (42000) at line 2: BLOB, TEXT, GEOMETRY or JSON column 'extra_hdrs' can't have a default value ERROR: Failed to create presence tables!

Setelah baca sana sini, ada petunjuk bahwa sql-mode di server memiliki setting STRICT_TRANS_TABLE (ndak tau juga ini apa, mau browse kok malah nanti repotnya jadi distraksi ke mana mana). Yang kemudian saya lakukan adalah masuk ke console mysql dan menjalankan perintah berikut:

go to site mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> SET @@GLOBAL.sql_mode =''; Query OK, 0 rows affected, 1 warning (0.00 sec)

Sebagai catatan saja, sebelum saya kosongkan isi dari GLOBAL.sql_mode adalah:

mysql> SELECT @@GLOBAL.sql_mode; +-------------------------------------------------------------------------------------------------------------------------------------------+ | @@GLOBAL.sql_mode | +-------------------------------------------------------------------------------------------------------------------------------------------+ | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | +-------------------------------------------------------------------------------------------------------------------------------------------+ 1 row in set (0.00 sec)

Dan setelah dikosongkan:

+-------------------+ | @@GLOBAL.sql_mode | +-------------------+ | | +-------------------+ 1 row in set (0.00 sec)

Berikutnya dicoba lagi menjalakan perintah opensipsdbctl create :

root# opensipsdbctl create MySQL password for root: INFO: test server charset INFO: creating database opensips ... INFO: Using table engine InnoDB. INFO: Core OpenSIPS tables successfully created. Install presence related tables? (y/n): y INFO: creating presence tables into opensips ... INFO: Presence tables successfully created. Install tables for imc cpl siptrace domainpolicy carrierroute userblacklist b2b cachedb_sql registrant call_center fraud_detection emergency? (y/n): y INFO: creating extra tables into opensips ... INFO: Extra tables successfully created.

Done.

Link:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>