MYDAC MYSQL Database Connection Error using Mobile Network

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Shane1968
Posts: 5
Joined: Wed 03 Jun 2020 08:27

MYDAC MYSQL Database Connection Error using Mobile Network

Post by Shane1968 » Wed 03 Jun 2020 08:35

Hi,

I have just purchased MYDAC to use with mobile development with Delphi Rio.

I am having a problem connecting using data. Everything connects successfully when connected to WIFI but when turning WIFI off I receive a connection error.

Error # 28000 Access denied for user "username@ip_address" (using password: YES)

Can someone please tell me why I can connect when using WIFI to a database on a remote server, and FAILS with the same settings when using mobile data? Hostgator.com hosts the database I am trying to connect to.

Thanks

Shane

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by ViktorV » Thu 04 Jun 2020 05:44

The 'Access denied for user 'YourUserName'@'YourComputerName'' message is a server response to an authentication fail. This message means that no user with the 'YourUserName' name exists or you have entered an invalid password, or a user with the 'YourUserName' name has no server access rights from the 'YourComputerName' PC.
To solve the problem, you should add the necessary rights to the YourUserName account or create a user with the necessary rights. The needed information can be found in the MySQL reference manual (e.g.: http://dev.mysql.com/doc/refman/5.5/en/grant.html).

Shane1968
Posts: 5
Joined: Wed 03 Jun 2020 08:27

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by Shane1968 » Thu 04 Jun 2020 06:22

Hi,

Thank you for your reply.

Can you explain why it works when using WIFI and only has the error when WIFI is turned of and the mobile network is being used?

The user must still have to have the correct rights to connect through a WIFI connection I presume?

So if it was a user permissions problem then I should receive the same error message when connecting via WIFI. Server is still remote.

So you answer does not really make sense and is not logical to me and looks like you sending me away to spend another 2 days on the same issue.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by ViktorV » Fri 05 Jun 2020 14:31

If the server allows connections for your user only from specified IP addresses, and your IP address is not on that list, then this scenario is possible.

Shane1968
Posts: 5
Joined: Wed 03 Jun 2020 08:27

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by Shane1968 » Tue 09 Jun 2020 13:04

I had to use a wildcard % on my cPanel allowed hosts on the Remote SQL area.

Allowed host can take an IP address or a wildcard. '%' lets anyone access the database and is probably not that secure.

Maybe the Devart Team should take note of this, so they know how to answer the questions on this forum. My problem had nothing to do with grants and wasted numerous hours.

How does everyone handle the security with this direct database access method?

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by ViktorV » Thu 11 Jun 2020 16:10

This behavior is related to MySQL server specifics and settings rather than MyDAC behavior or settings, therefore you need to contact your MySQL server administrator for help.

jimmy25
Posts: 1
Joined: Sat 27 Jun 2020 07:40

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by jimmy25 » Sat 27 Jun 2020 07:45

I had to use a wildcard % on my c Panel allowed hosts on the Remote SQL area.

Allowed host can take an IP address or a wildcard. '%' lets anyone access the database and is probably not that secure.

Maybe the Depart Team should take note of this, so they know how to answer the questions on this forum. My problem had nothing to do with grants and wasted numerous hours.

How does everyone handle the security with this direct database access method?

Regards:'
Jimmy,,,,,,,,,,

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by ViktorV » Tue 30 Jun 2020 13:18

As we wrote earlier, this behavior is related to MySQL server specifics and settings rather than MyDAC behavior or settings, therefore you need to contact your MySQL server administrator for help.

Shane1968
Posts: 5
Joined: Wed 03 Jun 2020 08:27

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by Shane1968 » Thu 09 Jul 2020 09:11

Hi,

You are selling MYDAC MYSQL components. We need to know how to use them securely.

You need to to have better documentation about setting up our servers and MYSQL database's so that our mobile apps or remote apps are secure.

I just spent lots of money so that I could access my MYSQL database's securely.

On the Delphi Developer forum I read that you should never access your database directly.

How do we secure the access to our databases.

Where is a working example of how to use the components correctly and securely??

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by ViktorV » Thu 09 Jul 2020 17:53

MyDAC is intended for use with a MySQL server, which should be installed and properly configured.
Our products for MySQL allow connecting the client to a properly configured MySQL server, but they are not intended for configuring a MySQL server itself.
As we wrote earlier, your question is related to MySQL server configuration rather than our components. Please refer to the MySQL documentation, the technical support of your server, or ask your question on specialized forums to get the needed information. We support both the SSL protocol and SSL tunneling on a properly configured MySQL server.

tiagodgy
Posts: 1
Joined: Sat 25 Jun 2022 22:48

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by tiagodgy » Sat 25 Jun 2022 22:52

Hi,

I'm having the same issue, did you find a solution?

Was there any documentation created after this post?

Thanks.

pavelpd
Devart Team
Posts: 109
Joined: Thu 06 Jan 2022 14:16

Re: MYDAC MYSQL Database Connection Error using Mobile Network

Post by pavelpd » Mon 04 Jul 2022 11:58

Hi,
Thanks for contacting us!

Could you please describe your issue in more detail?
What kind of errors occur and what actions cause them?

Please create and send us the screenshots demonstrating the issue.

Post Reply