1
I’m a beginner in database and I have a simple C# application and I want to use the Mysql database to store the data.
I have Mysql Server installed and usually use the "command-line client" where I already have a test table created "Account" containing the columns: id, user, and password. db = "test".
*I have already assigned the "Mysql.Data.Mysqlclient" reference to the class where I will be performing operations with the databank.
Questions:
- How can I set up the Connection string correctly?
- After the string has been configured and the connection has been established, how can I integrate the database to the final C# project to be able to distribute it normally "executable" or even move the locality project without having problems with the Mysql address of the developer machine?
- Following question 2, there is a way to keep the database within the C#project, where, I can modify it gradually in different locations without having any problem regarding the change of address in the string?
- As for modifying and updating the tables in a future update in the project created, how can I modify it in my sql server (update the file keeping the connection string)?
Dude, put in here what you tried and the mistake you found. If you haven’t tried, a simple read in the documentation or a practical example you find in the first Google result for "mysql c#" answers most of your questions.
– Vinícius Gobbo A. de Oliveira