donnolic Posted April 25, 2021 Posted April 25, 2021 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 errorAuthentication 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)
wolstech Posted April 25, 2021 Posted April 25, 2021 67.19.141.67;You have a typo in the IP address. That should be 65.19.141.67 if you're on Johnny. Also, make sure you enabled remote mysql in cpanel for IP 197.210.76.111.
donnolic Posted April 26, 2021 Author Posted April 26, 2021 Thanks. But enabling 197.210.76.111 means that only a system with that ip can access my db. The application i'm working on will be installed in client systems in all part of the world and access information from this server.
wolstech Posted April 26, 2021 Posted April 26, 2021 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).
donnolic Posted April 27, 2021 Author Posted April 27, 2021 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.
wolstech Posted April 27, 2021 Posted April 27, 2021 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.
donnolic Posted April 27, 2021 Author Posted April 27, 2021 Thanks so much. Is there any general used API for that or must I build it on my own. Any any please help me with link
donnolic Posted April 28, 2021 Author Posted April 28, 2021 I have been able to connect and retrieve from my db on this server but my problem now is that my IP address changes on each query or login. Please how can I stop this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now