How to run queries on-demand instance.. we can't install phpmyadmin or phpminiadmin.php , is there any front end can be installed and use?

Need to run SQL queries. What is best way?