### Description
If in kamailio.cfg I write IPv6 address for Database URL like this: ``` #!ifndef DBURL #!define DBURL "mysql://kamailio:kamailiorw@[2001:5c8:4e00:11:a213:ba2d:579a:3e3d]/kamailio" #!endif ``` Then kamailio can't connect to database.
#### Reproduction
Just try to use database server with IPv6-address in kamailio.cfg
#### Log Messages
``` Sep 8 14:35:40 c7-01 /sbin/kamailio[10680]: ERROR: db_mysql [km_my_con.c:139]: db_mysql_new_connection(): driver error: Unknown MySQL server host '[2001' (2) Sep 8 14:35:40 c7-01 /sbin/kamailio[10680]: ERROR: <core> [db.c:319]: db_do_init2(): could not add connection to the pool Sep 8 14:35:40 c7-01 /sbin/kamailio[10680]: ERROR: usrloc [dlist.c:646]: register_udomain(): failed to open database connection ```
### Possible Solutions
Correct parsing of config file.
### Additional Information
``` version: kamailio 5.3.0-dev7 (x86_64/linux) flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB poll method support: poll, epoll_lt, epoll_et, sigio_rt, select. ```
* **Operating System**:
CentOS 7
``` Linux sip.aaa.de 3.10.0-957.27.2.el7.x86_64 #1 SMP Mon Jul 29 17:46:05 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux ```
Thanks for the report. GH #2061 has been merged into git master. I also backported it into 5.2 branch. It don't apply cleanly to 5.1 branch due to some code changes.
Closed #2060.