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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting to MySQL using MyODBC

Status
Not open for further replies.

Bobriver7

Programmer
Mar 27, 2010
8
JO

Hi all

I am trying to connect to a remote Mysql Database using MyODBC , but it seems to fail to connect, any body has suggestions or better experience in connecting to web based MySQL Databases.

Thank you

Bob
 
Bob,

More details needed. Are you using a connection string or a DBC-based connection object? If a connection string, what is its contents?

Have you tried only from VFP, or from other platforms as well?

And have you tried posting your problem in the ODBC or MySQL forums?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Hi Mike

No, I just started to create the Data Source Name (DSN.
during the DSN configuration, I filled the server name,database name, username and password.

It should be that easy, but when you test the connection using a push button on that same configuration form, it fails with the message as follows:

connection failed [HY000][MySQL][ODBC 5.1 Driver],can't connect to MySQL Server (servername.com) (10060)

usually I used to create the DSN for sql servers on my pc or on the lan that easy.but this time it is MySQL and it is on the web.

I hope you can help me with this

thank you.
 
If, as you say, "It should be that easy, but when you test the connection using a push button on that same configuration form, it fails" then your problem is failing to set up a successfully working DSN at the Windows level and has nothing to do with Visual Foxpro.

You might also try posting your question on one of the many MySQL forums.

Once you get the DSN working and get a successful non-VFP test of the connection, then we can begin to help you use the connection.

To test the validity of a DSN without VFP you can create a UDL file
Creating and Configuring Universal Data Link (.udl) Files

Good Luck,
JRB-Bldr
 
Thank you

I could finally get the DSN connection to successfully connect to the remote MySQL server using the hostname, username and password.. it succeeded.

But, in VFP, creating a remote view requires the connection to connect to a database. when I use the database name in the DSN configuration or in the VFP connection builder it fails to connect the username to the database. although the entries are all correct and I tried to create different users for that database.

the connection succeeded with all the users, it fails only when you input the database name even though they are all users of that specific database.

I would very much appreciate your help coz I have an urgent need to update a live website using a VFP application.

thanks to all
Bob River


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top