I'm looking more and more about answer for my question.
When I open mysql query browser first time, there is place that we can create new mysql connection. I want to create connection like this.

In the 4 computers connected to a LAN network. I name these computers A,B,C,D for easy identiting on this example.
Think A is the only mysql installed computer and database server.
For other computers I installed program wich I made with vb.net 2012.
From that B,C,D computers When I entering data, I want to save those data to sql installed computer.
I have 2 question on this senario :
Q-1 : How would I write connection string ?
Previously I tried with this connection string :

 con.ConnectionString = "User Id=root;server=192.168.8.101;password=mysql;database=moneycs"

(I dont sure this connection string)
**Q-2 : **How Could I make new mysql connection on server pc. (note : PC-A IP : 192.168.8.101)
making new connection page has these values and what would I put those values...
Connection :
Username:
Password:
Hostname
port:
schema:

So help me guys ! :)

Dani AI

Generated

— the two parts to solve are (A) the ADO.NET connection string your VB.NET app should use, and (B) how to create a GUI connection entry so you can test/manage the server from a client. is right that the exact string format depends on the .NET driver; below are practical, safe steps and examples you can apply immediately.

A typical pattern for Connector/NET (MySql.Data) in VB.NET — replace the placeholders with your server name/IP, database name, and an application user (do not use the server admin account in an app):

Imports MySql.Data.MySqlClient

Dim cs As String = "Server=MY_DB_SERVER;Port=3306;Database=MY_DATABASE;Uid=app_user;Pwd=StrongPassword!;SslMode=None;Charset=utf8;"
Using cn As New MySqlConnection(cs)
    Try
        cn.Open()
        ' run commands using MySqlCommand / parameters
    Catch ex As MySqlException
        ' handle connection errors (auth, network, etc.)
    End Try
End Using

GUI connection (Query Browser / Workbench): create a new connection entry with a friendly name, choose Standard TCP/IP, put the server LAN host (or DNS) in Hostname, the MySQL port in Port, and the application username/password. The Default Schema (sometimes called database) is optional — it just opens that database immediately after connecting. Note: MySQL Query Browser is legacy; MySQL Workbench is the modern tool to create/manage connections.

Server-side checklist and security/troubleshooting:

  • Ensure MySQL accepts remote TCP connections (check my.cnf/my.ini: no skip-networking, and bind-address set appropriately — e.g. 0.0.0.0 to listen on all interfaces). Restart the service after changes.
  • Open the MySQL port on the server firewall (usually 3306).
  • Create a dedicated DB user and grant only needed privileges. Example:
    CREATE USER 'app_user'@'192.168.%' IDENTIFIED BY 'StrongPassword!';
    GRANT SELECT,INSERT,UPDATE,DELETE ON my_database.* TO 'app_user'@'192.168.%';
    FLUSH PRIVILEGES;
  • Never embed root/admin credentials in the app; consider SSL/TLS and secure config storage for production.

These steps cover connection format, GUI fields, and the common server-side blockers that prevent remote clients from saving data.

The connection string depends on the driver you're using. Which probably is NET Connector, so it should probably be:

Server=192.168.8.101;Port=3306;Database=moneycs;Uid=root;
Pwd=mysql;

If you are using any other driver to connect to mysql check out the connection strings here: https://www.connectionstrings.com/mysql/

To connect from the server it self use localhost. If you're using mysql workbench the port should already be filled with the defautl 3306, just change it if you're setup is diferently.

And a free tip: you shouldn't be using root to connect from the application. You should create an user account for the moneycs database with the required permissions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.