LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-30-2023, 01:21 PM   #1
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Rep: Reputation: 34
[mysql] [ODBC 8.2(w) Driver]Wrong or unknown protocol


Hello

I have a problem connecting to my MySQL database using unixODBC.

When I test the connection, I get :
Code:
[root@ig0 admin]# echo "select 1" | isql -v my-connector
[S1000][unixODBC][MySQL][ODBC 8.2(w) Driver]Wrong or unknown protocol
[ISQL]ERROR: Could not SQLConnect
I'm new to this.
I don not find many help on Google for this "Driver]Wrong or unknown protocol", except a MySQL bug.

all the system info :

Code:
[root@ig0 admin]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
Code:
[root@ig0 admin]# mysql --version
mysql  Ver 14.14 Distrib 5.6.51, for Linux (x86_64) using  EditLine wrapper
Code:
[root@ig0 admin]# odbcinst -j
unixODBC 2.3.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
Code:
[root@ig0 admin]# cat /etc/odbcinst.ini 
[PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/usr/lib/psqlodbcw.so
Setup=/usr/lib/libodbcpsqlS.so
Driver64=/usr/lib64/psqlodbcw.so
Setup64=/usr/lib64/libodbcpsqlS.so
FileUsage=1

[MySQL]
Description=ODBC for MySQL
DRIVER=/usr/lib64/libmyodbc8w.so
UsageCount=1

[MySQL ODBC 8.2 Unicode Driver]
DRIVER=/usr/lib64/libmyodbc8w.so
UsageCount=1

[MySQL ODBC 8.2 ANSI Driver]
DRIVER=/usr/lib64/libmyodbc8a.so
UsageCount=1
Code:
[root@ig0 admin]# cat /etc/odbc.ini 
[my-connector]
Description           = MySQL connection to database
Driver                = MySQL
Database              = db01
Server                = 11.22.33.44
UserName              = user
Password              = pwd
Port                  = 3306
Socket                = /var/lib/mysql/mysql.sock
 
Old 12-01-2023, 04:02 AM   #2
jonaskellens
Member
 
Registered: Jul 2008
Location: Ghent, Belgium
Distribution: Fedora, CentOS
Posts: 690

Original Poster
Rep: Reputation: 34
Seems I had an old configuration example.

Here is the correct config for ODBC 8.2 : https://dev.mysql.com/doc/connector-...-dsn-unix.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubuntu Server: MySql ODBC Driver and string johnty01 Linux - Server 0 08-01-2008 06:53 PM
MySQL ODBC Driver problem (with MS Windows) gd2shoe Linux - Software 4 11-14-2005 01:50 PM
MySQL ODBC driver fails when trying to add a DSN to MySQL banjoman Linux - Software 0 01-24-2005 09:59 AM
ODBC driver for MySql baburaj General 1 06-29-2002 10:52 AM
nstalling ODBC provider for MYSQL in Linux saravanan1979 Programming 0 06-03-2002 01:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration