Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How to access a MySQL database on an internet server?

Posted on 2007-11-26
12
241 Views
Last Modified: 2012-05-05
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
Comment
Question by:rmmarsh
  • 5
  • 5
12 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 20354270
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
 

Author Comment

by:rmmarsh
ID: 20354360
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
 

Author Comment

by:rmmarsh
ID: 20354364
s/b Visual Web Developer 2005 *Express*
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20354397
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
 

Author Comment

by:rmmarsh
ID: 20354410
Yes, it did... I guess I'll just pick one and see what happens... what do I put in the slot for "provider"?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20354457
in OleDB should be MySQLProv as shown.
0
 

Author Comment

by:rmmarsh
ID: 20354466
OK... how does it know where the database is?  (ie the host name?)

R
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20354530
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
 

Author Comment

by:rmmarsh
ID: 20354561
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
 
LVL 18

Expert Comment

by:vbturbo
ID: 20356136
Hi

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

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

vbturbo
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 20552830
Still waiting for author response...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question