Make an Android ASyncTask. This will accept the command and try to connect with your Database and on successful connection with MySQL assign a String variable with the table data . And now run your application. On Pressing on the “Fetch Data” button it will fetch Data from MySQL Database table.18 Mar 2018