Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //part of the res_odbc.conf at /etc/asterisk
- [asterisk]
- ;
- ; Permit disabling sections without needing to comment them out.
- ; If not specified, it is assumed the section is enabled.
- enabled => yes
- ;
- ; This value should match an entry in /etc/odbc.ini
- ; (or /usr/local/etc/odbc.ini, on FreeBSD and similar systems).
- dsn => asterisk-connector
- ;
- ; Username for connecting to the database. The default user is "root".
- username => asterisk
- ;
- ; Password for authenticating the user to the database. The default
- ; password is blank.
- password => asteriskmysql
- ;
- ; Build a connection at startup?
- pre-connect => yes
- //cat /etc/unixODBC/odbc.ini
- [asterisk-connector]
- Description = MySQL connection to 'asterisk' database
- Driver = MySQL
- Database = asterisk
- Server = localhost
- ;UserName = asterisk
- USER = asterisk
- Password = asteriskmysql
- Port = 3306
- ;location varies
- ;Socket = /var/lib/mysql/mysql.sock
- Socket=/var/run/mysql/mysql.sock
- //cat /etc/unixODBC/odbcinst.ini
- [PSQL]
- Description = PostgreSQL
- Driver = /usr/lib/psqlodbcw.so
- UsageCount = 1
- [MySQL]
- Description = ODBC for MySQL
- ;Driver = /usr/lib/odbc/libmyodbc.so
- Driver=/usr/lib/libmyodbc5.so
- ;Setup = /usr/lib/odbc/libodbcmyS.so
- FileUsage = 1
- //odbc shows nothing!!
- oquisuse*CLI> odbc show
- ODBC DSN Settings
- -----------------
- //asterisk is running under username asterisk with the right password
- mysql -u asterisk -p
- Enter password:
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 1
- Server version: 5.5.25-log Source distribution
- Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
- Oracle is a registered trademark of Oracle Corporation and/or its
- affiliates. Other names may be trademarks of their respective
- owners.
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- mysql>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement