Tramp kicks in if the value of the variable default-directory
(which if set becomes buffer-local) is in Tramp format. You can do something like this to ensure it gets reset to point to your local home directory wherever you need to run mysql:
(defadvice sql-mysql (around sql-mysql-around activate)
"Reset to local home, then connect"
(let ((default-directory "/home/me"))
ad-do-it))
The code assumes you you use sql-mode
to launch mysql.