Jump to content

Remote connection string not working in VB.net


donnolic

Recommended Posts

Hi, I have been trying to change my server to heliohost but having permission issues

 

My connection is server=67.19.141.67; port=3306; database=dbname; uid=username; pwd=password;

 

I got this error

Authentication to '65.19.141.67' for user 'username' using method 'mysql_native_password' failed with message: access denied for user 'username'@'197.210.76.111 (using password:yes)

Link to comment
Share on other sites

You can allow from any IP by simply adding % (a single percent sign) as an allowed IP address.

 

For what it's worth though, any application that is running on end user computers and using direct DB access is a security disaster waiting to happen. Allowing clients to connect directly to the DB server means there has to be a username and password hiding somewhere in the client application that can be extracted and subsequently used to dump your database.

 

The proper way to build this is to code an API that runs on the server, and give each client a unique API key. The API code running on the server ensures that the key can only access the data it's supposed to, and a key can be revoked if its compromised without breaking every single installed client (it'd only break the clients using that key).

Link to comment
Share on other sites

Thanks. I understand the risk and I have taken measures to protect my db account and the software itself by encrypting the software from being decompiled. So with this my codes wouldn't be visible if decompiled with any decompiling software. But I will still try research on how to use API.

Link to comment
Share on other sites

Database connections are not secure in and of themselves. Many (most) such connections are clear text, so you can just sniff traffic to get the password.

 

Besides, even with TLS, odds are good you would be able to extract the password without decompiling the code by setting up a man-in-the-middle proxy on yourself and logging the traffic through the proxy while you start the program.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...