Python Connectivity


#1

Can I connect my MySQL Database on phpmyadmin with a python script? If no, is there any other alternative which I can use to connect to the online database? Thank You.


#2

Hi @rajas

Can you say how you gonna connect? If it is remote mysql, it’s not possible to connect to your database.


#3

As @Supun wrote: Remote sql connections is not possible.

The best alternative, using 000webhost, is to write an API in php that displays the results in XML/JSON/other formats, then you use Python (or other languages) to send requests to the API page.

A good, modern way to do this, is to make (or use an existing) REST API
Wikipedia article:

How to: