Connecting mysql server running on cloud aws on ubuntu
-
wrote on 6 Feb 2017, 20:37 last edited by
Unable to connect the mysql database running on cloud using aws. Please do provide a relevant information.
Thanks in advance
-
Unable to connect the mysql database running on cloud using aws. Please do provide a relevant information.
Thanks in advance
wrote on 6 Feb 2017, 20:43 last edited byWhat did you try to connect?
Basically you can follow the example given here in the detailed description
-
wrote on 7 Feb 2017, 06:17 last edited by
@koahnig : I tried using the step mentioned in the link.
It works for me when i try to connect mysql database locally.
But comes with the message like " unable to connect to database" when i try to connect to remote database as mentioned running on AWS. -
@koahnig : I tried using the step mentioned in the link.
It works for me when i try to connect mysql database locally.
But comes with the message like " unable to connect to database" when i try to connect to remote database as mentioned running on AWS.@Kira maybe you should be more precise: how exactly did you try to connect?
You should post your code where you try to connect. -
@koahnig : I tried using the step mentioned in the link.
It works for me when i try to connect mysql database locally.
But comes with the message like " unable to connect to database" when i try to connect to remote database as mentioned running on AWS.wrote on 7 Feb 2017, 09:38 last edited by koahnig 2 Jul 2017, 09:39Well, when you can do the same locally to a MySql database, there is no (Qt) reason, why you can't to an external DB. It does work the very same way in your application as far as I know. Assuming that all other credentials are the same you need only to change the host address.
As @jsulm notes your question was/is completely ambiguous. The six lines basically describe the required Qt source lines. Further down the descriptions are referring also to lastError() which is determining what the actual problem is.
In your case it might be your local firewall and/or the AWS firewall. You need to check if the AWS allows a connection for the port you are using as well you may have to open it for your ip address.
-
wrote on 8 Feb 2017, 09:17 last edited by Kira 2 Aug 2017, 09:19
@jsulm and @koahnig : Thanks for your reply.
You were correct it was not issue related to qt.
Still would like to answer for any other user doing the
same.
Qt connects to any external database if it does with the local.
Here in case of aws there was issue in access rights of the database which does not
allowed any other application remotely to connect, so in that case we have to allow that users to allow external application to connect to the database.
1/6