MySQL Forums
Forum List  »  Newbie

Re: connecting to MySQL remotely with C# code
Posted by: Phillip Ward
Date: July 30, 2025 02:29AM

Quote

... does it change if the code changes, instead of "Server" I put "Datasource" or it is the same thing?

From ConnectionStrings.com, I cannot see any version of a MySQL connection string that accepts "DataSource" as an argument.
https://www.connectionstrings.com/mysql-connector-net-mysqlconnection

Quote

... I want to implement so that database can be accessed from any PC for "INSERT" and "SELECT" statements.

I thought I gave you that in my previous reply ...

If your MySQL Server is running an a computer called "Svr123456", then your connection string should be:

MySqlConnection connection = new MySqlConnection("Server=Svr123456;port=3306;username=MyUserName;password=MyPassword");

Regards, Phill W.

Options: ReplyQuote




Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.