I can do this:
ssh hostname "cd projects" but it exits after it changes directory. How can I do that, but leave the ssh shell open so now I am in projects? I also might want to open a mysql shell afterwords.
$ ssh -t hostname "cd projects; exec bash"
you can use other shells instead of bash
You can create ~/.ssh/rc (on the remote host) with commands you want run each time the user logs in. It will be executed prior to invocation of the shell.
See the sshd man page, section SSHRC, for more information (note especially the comments regarding necessity for setup of xauth if this file is deployed.)
Use expect to actually login and run the commands.
I don't understand well what you need, but maybe screen can help you.