Cant log cdr via odbc-mysql

Need help again please. I’m trying to record cdr in mysql via odbc connector.
I’m getting error message like this

[Aug 5 06:06:07] ERROR[21701][C-0000001e]: cdr_odbc.c:148 odbc_log: Unable to retrieve database handle. CDR failed.

I don’t know what am doing wrong. Any help will be nice.
This is my setting.


Driver from the mysql-connector-odbc64 package

Setup from the unixODBC64-libs package

Description = ODBC for MySQL (64 bit)
#Driver = /usr/lib/
#Setup = /usr/lib/
Driver64 = /usr/lib64/
Setup64 = /usr/lib64/
FileUsage = 1

Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
Database = asterisk
Server = localhost
Port = 3306
Socket = /var/lib/mysql/mysql.sock

enabled => yes
dsn => asterisk-connector
username => asteriskuser
password => asteriskpass
pooling => no
limit => 1
pre-connect => yes