yes, you need to edit the existing localhost connection file to connect to the remote database.
changing the connection details will mean you cannot test the files on your local testing server any more.
one trick i use for this is to set up the connection for the remote database, then set the permissions for the connection file on the remote server to be read only. Then edit the connection file again to change it back to the local connection details.
this way the connection file uploaded to the remote server has the correct details to connect to the remote server. the connection file on your local server has the correct details to connect to the local server.