Up to this time I have never put my local test sites in /Users/myname/Sites, but always in /Library/WebServer/Documents – I can't remember exactly what advice I was following when I did this (something to do with TYPO3, I think!) But I do have Web Sharing "On" anyway. My localhost sites are visitable on urls in the form http://localhost/sitename/htdocs(or public_html or whatever)/, and they work with the installation of PHP and MySQL which came with OS X 10.5 - don't ask how I achieved that! I never heard about MAMP until looking at WordPress and it seemed easier to go that way. I had forgotten that I had set the existing MySQL to start up on start-up and it had not occurred to me to stop it before trying this MAMP/WordPress stuff. I have done that now, but I don't think it makes any difference, because the whole MAMP thing really does seem to be separate and self-contained, but I'll keep watching that anyway
After reading the last part of the tutorial which songdogtech mentioned here, which says: "1. Can I use MAMP to host my web site for other people to see? – Yes, but not really. MAMP is more like a testing ground to run server scripts on your local computer. … " I decided to start again and install exactly as per the default description, that is, the WordPress files in /Applications/MAMP/htdocs/wordpress and configuring 'DB_HOST' as 'localhost:8889' (instead of just 'localhost' - but this doesn't make any difference), so I could simply concentrate on learning how to work with WordPress. Everything works out as described except that where the tutorial ends saying " … Everything you run in MAMP should start http://localhost:8888/ this is sort of like www, then you’ll add the name of the folder you are trying to access in the htdocs folder. So it will be http://localhost:8888/wordpress. Everything you add after that will take you to a different file in the wordpress folder.", what happens for me is:
http://localhost:8888/wordpress/ = should go to the WP blog page, but gets a 404 "Not Found"
http://localhost:8888/ = successfully gets the WP blog page
http://localhost/wordpress/ = gets "Error connecting to database" - this was my original problem and is happening I guess, because it's trying look at my other MySQL instance
When I've sorted out what I want do WordPress-wise locally, it'll be a whole different ball-game getting the real site instances working, wherever they are, so I wont start worrying about that now until I get to that. Meanwhile, thanks again for your help - if I'm ever able to return the favour, I'll be only too happy to