¿cuanta gente a visto el blog?

Como instalar odbc para Asterist

 ANTES DE INSTALAR ES NECESARIO AUMENTAR EL ESPACIO DE /ROOT  QUE ES DONDE SE INTALARA


sudo dnf install epel-release -y
sudo dnf config-manager --set-enabled crb

sudo dnf update -y




sudo dnf install unixODBC-devel -y


sudo dnf install unixODBC unixODBC-devel mariadb-connector-odbc -y

rpm -qa | grep unixODBC
sudo nano /etc/odbcinst.ini

[MySQL]
Description = ODBC for MariaDB
Driver = /usr/lib64/libmaodbc.so
Setup = /usr/lib64/libodbcmyS.so
FileUsage = 1

sudo nano /etc/odbc.ini

[asterisk-connector]
Description = MariaDB connection for Asterisk
Driver = MySQL
Server = localhost
Database = asterisk
User = root
Password = admin
Port = 3306
isql -v asterisk-connector

sudo dnf install unixODBC unixODBC-devel mariadb-connector-odbc -y


rpm -qa | grep mariadb-connector-odbc

rpm -qa | grep mariadb-connector-odbc
sudo nano /etc/odbcinst.ini


[MySQL]
Description = ODBC for MariaDB
Driver = /usr/lib64/libmaodbc.so

sudo nano /etc/odbc.ini

[asterisk-connector]
Description = MariaDB connection for Asterisk
Driver = MySQL
Server = localhost
Database = asterisk
User = tu_usuario
Password = admin
Port = 3306

mysql -u root -p
CREATE DATABASE ivast;
USE ivast;

CREATE TABLE ultnum (
    id INT AUTO_INCREMENT PRIMARY KEY,
    numero INT NOT NULL
);

INSERT INTO ultnum (numero) VALUES (0);

SHOW DATABASES;
USE ivast;
SHOW TABLES;
SELECT * FROM ultnum;



exit;

sudo nano /etc/odbc.ini

[ivast-connector]
Description = MariaDB connection for ivast
Driver = MySQL
Server = localhost
Database = ivast
User = root
Password = admin
Port = 3306

isql -v ivast-connector

SELECT * FROM ultnum;

INSERT INTO ultnum (numero) VALUES (42);

UPDATE ultnum SET numero = 100 WHERE id = 1;


No hay comentarios.:

Publicar un comentario