You usually start stuff by running the script in /etc/init.d
If you want the apache and mysql to automatically start when you boot, use the update-rc.d command to automatically create the relevant runlevel links.
Code:
update-rc.d apache defaults
Instead of apache, use the name of the script in /etc/init.d . This might be "apache2" if you installed apache version 2.0 and not apache version 1.1
Regarding the PHP command line, try
Also take a look a the man page for php. Lots of good info there.
About connecting to MYSQL from a remote location, where remote is "not localhost" - this is disabled by default in mysql's configuration file. Edit it, and reenable it (see the comments in the file /etc/mysql/my.cnf ). Try again after that.