Connect Winforms client to mysql on linux server
I have developed a .net 4.0 Windows forms application that is supposed to execute on the client side (all client desktops are windows based with .net 4 framework installed). On the other hand, the server is a Linux server that has a MYSQL database. I need to know what I need to do in order for my winforms application (on client desktops) to gather/write data from/to the MYSQL database on the server. Do I need to do some server side programming/scripting in order for the winforms to communicate with the server. I am new to this, kindly excuse if something sounds 'stupid'.
I am not .net proficient, but most 2 or 3 tiered applications work the same:
In your application, you should have access to a DB driver - like ODBC - which handles the connection with the DB server, sends it all the queries, and receives the results. All you have to do is specify the connection parameters:
- DB server address
- DB server port
- DB user name
- DB user password
On the server side, you need to configure the server to accept incoming connections from the client:
- setup the DB service: install the DB server and configure it
- configure user and database: create the schema, create the user account, populate the tables
- setup the network: create the firewall rules to let the DB port open to your client connections
And that should be it. Since you will probably have to download the MySQL odbc connector, I suggest that you also consult its documentation, which provides tutorials and walk-throughs.