How to execute SQL queries from the Joomla Administration backend easily

Published in Joomla

Let me guess, you want a clean way to execute SQL queries from the Joomla Administration backend? Probably you want someone other than yourself to be able to run a query on the database using SQL but don’t want to have them playing about in PHPmyAdmin, or to have to bother with passwords or database names etc. The answer is simples.


The best way I found is to add a Joomla component for running SQL queries. I originally looked at ways I could wright a php file to execute the SQL and then link to it from the Joomla Administrator backed. Too hard. Then I had the epiphany to look for a Joomla extension that could execute SQL code. Boom problem solved.

I’ll show you the Joomla components I tried for executing SQL from within Joomla, but also consider doing a search for “JED SQL”.  This should help you find an up to date component for running SQL queries from within Joomla for versions newer than Joomla 1.5, 2.5 and 3.

I used this SQL code executing component Art-adminer (no registration required):

*although it’s not built for Joomla 1.5 I can confirm it does work for Joomla 1.5 (use the non Joomla 3 version)

Another free alternative is this one here (although I didn’t get it to work perfectly, it does look simple and may suit your purposes better) MijoSQL - Run Query (note requires registration):
You can also do a google seach for "JED SQL" if you want to find an up to date Joomla extension which will allow you to execute simple SQL queries from the Joomla adminstrator backend which works with Joomla version other then 1.5, 2.5 or 3.x