I'm not following you 100% but it seems your configuration is setup from remote :) Check your configuration files to ensure everything is correct.
Side note, you can import the db easier via ssh if you have it:
(the -pyourpassword is correct! Normally you do -p, but you can do -pyourpassword to pass the password on so you don't have to type it in.)
#mysql -u username -pyourpassword db_name < yourdb_youareinstalling.sql