tags:

views:

197

answers:

3

Hi, I am creating and testing a mysql join query but each time so far it causes the database tables to lockup and the site hangs. I have to then call the host and they kill the locked queries. Is this something I can do from phpmyadmin so not to bother them while I tweak the script to work? Thanks for any reply.

A: 

I don't know about phpMyAdmin but the free "mysql tools" package contains an application called MySql Adminstrator that lets you do just this. It shows you currently running queries and provides a kill thread button (this is in the server health tab I believe).

Mysql GUI Tools/ Mysql Workbench are far superior to phpMyAdmin anyway. If you're running the database locally, or have ssh access, there's really no reason to use phpMyAdmin.

Koobz
Great advice thanks. I will install that locally and try testing there first.
jcure
A: 

I don't recall a way to do it from phpmyadmin. You might try testing your query on a local test copy database rather than live so that you get better throughput, until it no longer locks up.

Dire
+1  A: 

This can be done from the front page of phpMyAdmin. Look for the "Processes" link.

You can also run the command SHOW PROCESSLIST (or SHOW FULL PROCESSLIST). This will show you all the queries that you are able to manipulate (i.e. your own). Along with each query will be an identifier. You can issue the KILL command to any of those identifiers to kill the query.

Also, you should consider testing your query with EXPLAIN.

Charles
Thank you, that will do the trick.
jcure