Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 9 doesn't connect to MySQL on Win Server 2012 R2 64 bit through ODBC 8.0 32 bit version

Status
Not open for further replies.

Rajesh Karunakaran

Programmer
Sep 29, 2016
549
MU
Hi Team,

I have already searched many threads here concerning MySql connection and tried the suggestions also but I am not getting my connection through. So, apologies for creating this, one more thread on same subject.

1. MySql is installed as a part of installation of a Finger Print machine's Web UI. This is in Windows Server 2012 R2 in Azure. My interface is running and data also is updated from devices at remote locations in MySql smoothly.

2. When I check MySql from command line (after running MySql -h localhost -u root), I can query database names, tables of a database etc.

3. I have installed MySql ODBC 8.0 32 bit version downloaded from MySql website in the same machine.
(Had installed the 64 bit version earlier but when I had this connection problem, installed the 32 bit version)

4. Now, from the same machine, I am trying to connect to MySql from VFP9 using
Code:
hnd = SQLSTRINGCONNECT("driver={MySQL ODBC 8.0 Driver};server=localhost;uid=root;database=adms_db;")
But, it gives me -1 in hnd and the AERROR() shows, "[Microsoft][ODBC Driver Manager]Data Source name not found and no default driver specified"

My checking with 127.0.0.1 also failed. There is no password for user 'root'.

So, what I am missing or wrong I am doing?
I don't think MySql need to be configured for Remote access. Otherwise also, I have read that by default MySql allows remotes.

Could you guide me, please ?
Thanks in advance,
Rajesh
 
Dear all,

The problem in the Azure server is solved for local connection!

I checked with installation of ODBC 8.0 both 64 & 32 bit versions. But it was not working. Then I uninstalled everything and installed the ODBC 5.1.13 (it shows as 5.1) 32 bit version and the following connection string did the job.

Code:
SQLSTRINGCONNECT('Driver={MySQL ODBC 5.1 Driver};Server=127.0.0.1;User=root;Database=adms_db;Port=83306;')

However, I am not able to access it from my system (ie connect remotely) using the same method, it doesn't work!

Any clue/suggestions?

Thanks
Rajesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top