сервис_odbc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
сервис_odbc [2018/01/12 08:09]
val [Настройка подключения]
сервис_odbc [2025/01/28 07:28] (current)
val
Line 11: Line 11:
 ===== Установка коннектора MySQL ===== ===== Установка коннектора MySQL =====
  
-==== Debian ​====+==== Debian ​11 ====
  
-  * [[https://​dev.mysql.com/​downloads/​connector/​odbc/​5.3.html|Download Connector/​ODBC]] 
-  ​ 
 <​code>​ <​code>​
-wget http://​val.bmstu.ru/​unix/​sql/​mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz +apt install ​odbc-mariadb
- +
-# tar -xvf mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit.tar.gz +
- +
-# cp mysql-connector-odbc-5.3.9-linux-debian9-x86-32bit/​lib/​libmyodbc5* /​usr/​lib/​i386-linux-gnu/​odbc/​ +
-</​code>​ +
- +
-==== Debian/​Ubuntu ==== +
- +
-<​code>​ +
-# apt install libmyodbc+
 </​code>​ </​code>​
  
 ===== Настройка подключения ===== ===== Настройка подключения =====
  
-  * [[http://www.kaffeetalk.de/how-to-setup-and-configure-mysql-with-unixodbc-under-ubuntu-14-04/​|How to setup and configure MySQL with unixODBC under Ubuntu 14.04]]+  * [[https://askubuntu.com/​questions/621442/odbc-error-connecting-to-mysql|How to setup and configure MySQL with unixODBC under Ubuntu 14.04]]
  
 <​code>​ <​code>​
-cat /​etc/​odbcinst.ini +!!! Ничего не нужно менять !!! 
-</​code><​code>​ + 
-[myodbc_mysql] +debian11less /​etc/​odbcinst.ini
-Description=ODBC for MySQL +
-Driver=/​usr/​lib/​i386-linux-gnu/​odbc/​libmyodbc5a.so +
-Setup=/​usr/​lib/​i386-linux-gnu/​odbc/​libmyodbc5S.so +
-UsageCount=2+
 </​code><​code>​ </​code><​code>​
 # cat /​etc/​odbc.ini # cat /​etc/​odbc.ini
 </​code><​code>​ </​code><​code>​
-[asterisk_dsn+[asterisk
-Description=description of your DSN +Description=DSN ​to asterisk mysql DB 
-Driver=myodbc_mysql + 
-Server=localhost +Driver=MariaDB Unicode 
-Port=3306+ 
 +###Server=localhost 
 +###Port=3306
 Socket=/​var/​run/​mysqld/​mysqld.sock Socket=/​var/​run/​mysqld/​mysqld.sock
-#Debug=1+
 USER=asterisk USER=asterisk
 Password=asterisk Password=asterisk
 Database=asterisk Database=asterisk
-Option=3+
 ReadOnly=No ReadOnly=No
 Charset=utf8 Charset=utf8
-</​code><​code>​ +</​code>​ 
-# isql -v asterisk_dsn+===== Проверка подключения ===== 
 +<​code>​ 
 +# isql -v asterisk
 </​code><​code>​ </​code><​code>​
 SQL> show tables; SQL> show tables;
сервис_odbc.1515733763.txt.gz · Last modified: 2018/01/12 08:09 by val