Click here to Skip to main content
15,847,903 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have WordPress site with MQSQL as data base. I write One C# (WPF) Program and I need connect to my database site for some send and receive data between them. I do not want Use rest API. I want Connect Directly to MySQL. (Honestly I do not understand how REST API Work)
So how connect C# to MySQL directly?

What I have tried:

First I tried Use rest API and I cannot work with that. So how connect C# to MySQL directly?
Updated 18-Nov-20 7:48am
PIEBALDconsult 18-Nov-20 20:17pm    
Get the MySQL .net Provider and use , done.

1 solution

Here is a video that shows how to connect to a local MySQL database:
Connecting to a Database C# - WPF and MySql - YouTube[^]
To connect to a remote server you will have to have access via an URL, then use this URL instead of localhost, something like shown in this video:
[C# WPF tutorial] C# - Connect To Cpanel MySql Database Remotely In C# - YouTube[^]
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900