Forums

connect mobile app with PA MySql

I want connect my Android app with PA mysql. Currently I connect to external database in aws mysql via api. If I want to use PA mysql, what can I do. Don't mind using paid account as long as it is a simple move and less changes.

So if this is an android app people download and use, you can't really put your mysql credentials in it (otherwise anyone who downloads your app can take your credentials and add/delete stuff themselves).

In addition, for security, it's considered best practice to disallow direct access of database over the internet.

You may have to say create a simple flask app on PythonAnywhere. That would act as an endpoint which your mobile app can hit, and would do whatever authentication/validation there, before you put stuff into the database.

I am coming to this also last time. I decided to use aws at last. This is because I worried if the traffic is high, PA will unable to handle it, At least with AWS, it is easier to scale. By I still use my code in PA to scrape some website and send data over. Just my experience. Another reason I do not know web2py,flask of things

@Conrad, are you meaning create and API? Will PA able to handle like 300,000 query for very small text data daily( 1000 data rows per table, one time query maximum 20 rows, normally one row) per day? I am worried although it is suppose very small bandwidth but frequent query will work. Flask able to handle fast query? speed and easy to learn is important. Thanks

We definitely host sites with much higher traffic (order of magnitude larger)- but of course it depends on how you write your code- how efficient it is, and how computationally intensive it is.

Flask should be easy to learn and pretty light weight.

You can scale up with us by increasing the number of web workers (you can tweak it when you customise your plan).

Look into creating a web app for Android. PA should be able to handle the back end and web app books and tutorials are readily available.

Check out 'Single Page App' on Google.