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.

/etc/odbcinst.ini

Driver from the mysql-connector-odbc64 package

Setup from the unixODBC64-libs package

[MySQL]
Description = ODBC for MySQL (64 bit)
#Driver = /usr/lib/libmyodbc5.so
#Setup = /usr/lib/libodbcmyS64.so
Driver64 = /usr/lib64/libmyodbc3.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage = 1

/etc/odbc.ini
[asterisk-connector]
Description = MySQL connection to ‘asterisk’ database
Driver = MySQL
Database = asterisk
Server = localhost
Port = 3306
Socket = /var/lib/mysql/mysql.sock

/etc/asterisk/res_odbc.conf
[asterisk]
enabled => yes
dsn => asterisk-connector
username => asteriskuser
password => asteriskpass
pooling => no
limit => 1
pre-connect => yes

/etc/asterisk/cdr_adaptive_odbc.conf
[adaptive_connection]
connection=asterisk
table=cdr