LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-17-2009, 04:14 AM   #1
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Rep: Reputation: 22
ODBC MySQL on x86_64 FC11


Folks, I have MySQL installed correctly and can connect to it on the command line. It reports Server version: 5.1.40. I have unixODBC installed. I have downloaded the MySQL ODBC drivers and put them in the correct directory. I have edited odbcinst.ini and odbc.ini in the default directory /usr/local/etc and even symlinked these into /etc to be sure. However, isql cannot connect:
Code:
[doug@cardraeh ~]$ isql MySQL-test test -v
[08S01][unixODBC][MySQL][ODBC 5.1 Driver]Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
[ISQL]ERROR: Could not SQLConnect
This is my odbcinst.ini:
Code:
[MySQL]
Description     = MySQL driver for Linux
Driver          = /usr/lib64/libmyodbc5-5.1.6.so
Setup           = /usr/lib64/libmyodbc3S-5.1.6.so
FileUsage       = 1
And this is odbc.ini:
Code:
[MySQL-test]
Description     = MySQL test database
Trace       = Off
TraceFile   = stderr
Driver      = MySQL
SERVER      = localhost
USER        = test
PASSWORD    =
PORT        = 3306
DATABASE    = test
I downloaded the pre-built drivers from the MySQL downloads page, but wonder whether it would be worth downloading the source and compiling locally. Anyone have any experience of using the pre-built drivers?
 
Old 12-17-2009, 04:30 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
That is because it is trying to connect to the wrong socket, the socket is in /var/lib/mysql/mysql.sock
 
1 members found this post helpful.
Old 12-17-2009, 04:32 AM   #3
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Original Poster
Rep: Reputation: 22
Stupid me. I do not have a /tmp/mysql.sock, which is why isql cannot connect to it. My question now is "Why don't I have a /tmp/mysql.sock?"
 
Old 12-17-2009, 04:35 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
You do not have a /tmp/mysql.sock because the fedora packagers think /var/lib/mysql/mysql.sock is a better place for the socket, you need to configure your client to use that socket
 
1 members found this post helpful.
Old 12-17-2009, 04:42 AM   #5
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Original Poster
Rep: Reputation: 22
Thanks datopdog. Yep - you are right, there it is. Now, how do I get that location to be recognised by ODBC? Is there a setting I need to add to odbc.ini or odbcinst.ini?
 
Old 12-17-2009, 05:27 AM   #6
Doug Hutcheson
Member
 
Registered: Jun 2009
Location: Philippines
Distribution: Fedora 36; Homebrew desktop with Ryzen 5600G and 32Gb. Using Red Hat since 1998
Posts: 304

Original Poster
Rep: Reputation: 22
Solved: Added the following line to odbc.ini:
SOCKET = /var/lib/mysql/mysql.sock

Thanks to datopdog for insightful help.
 
  


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
Need Atheros driver for vmlinux-2.6.29.4-167.fc11.x86_64- lgrening Linux - Wireless Networking 1 11-19-2009 08:54 AM
root account in FC11 x86_64 masterofNanako Linux - Distributions 4 08-11-2009 11:24 AM
FC11 X86_64 occasional instability terry-duell Fedora 1 06-22-2009 07:18 PM
Mysql and odbc Murdock1979 Linux - Server 1 01-09-2008 08:42 AM
MySQL ODBC driver fails when trying to add a DSN to MySQL banjoman Linux - Software 0 01-24-2005 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:29 PM.

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