Not sure I understand it completely

but which SQL file would you like to get executed? If you have a large dump and phpmyadmin just halts, it is much better to use mysqldump via ssh and direct its output to a file. Such as:
/usr/local/bin/mysqldump --all-databases --user=NAME --password=PASS > my-dump.sql
You can simply import this dump.sql (which is full of queries) into mysql later again using /usr/local/bin/mysql utility.
I hope this will help
