Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 268
  • Last Modified:

How to access a MySQL database on an internet server?

I have a C# program (desktop) that I want to access a web service.  That web service (also written in C#) needs to access a MySQL database sitting on the hosting server (a Windows server).  I imagine that connection string would have the site name(?) and database name, but haven't a clue how to put it together.

Can someone please give me a pointer to a doc or something?  
0
rmmarsh
Asked:
rmmarsh
  • 5
  • 5
1 Solution
 
Jaime OlivaresSoftware ArchitectCommented:
That's depend on the library you have choosen to access the MySql server. Have a look to:
http://www.connectionstrings.com/?carrier=mysql
0
 
rmmarshAuthor Commented:
If I'm using the Visual Web Developer 2005, what choices do I have for a library?  I see the connection string is almost a no brainer, but still don't know what to use for the connection: ODBC?
0
 
rmmarshAuthor Commented:
s/b Visual Web Developer 2005 *Express*
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
Jaime OlivaresSoftware ArchitectCommented:
I mean, the mysql connection type: ODBC, OleDB, which have you selected?
The link I have posted give you connection string for all possibilities.
0
 
rmmarshAuthor Commented:
Yes, it did... I guess I'll just pick one and see what happens... what do I put in the slot for "provider"?
0
 
Jaime OlivaresSoftware ArchitectCommented:
in OleDB should be MySQLProv as shown.
0
 
rmmarshAuthor Commented:
OK... how does it know where the database is?  (ie the host name?)

R
0
 
Jaime OlivaresSoftware ArchitectCommented:
if you are using OleDB (I have this not clear until now), you define a connection in the Windows Control Panel, specifying URL, servername, port, etc.
This connection has a name, this is the name you use in the DataSource field.
0
 
rmmarshAuthor Commented:
I'm using ODBC... give me a few days to figure this out (have to work the remainder of the week, so only work on this in my spare time)...

Thanks for your help so far...

R
0
 
vbturboCommented:
Hi

I you work alot with mysql then this would might be worth to consider

http://www.crlab.com/mysqlnet/

vbturbo
0
 
Jaime OlivaresSoftware ArchitectCommented:
Still waiting for author response...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now