If you want to see how to make Corona SDK talk to PHP/MySQL in the build your own situation, see:
http://omnigeek.robmiracle.com/2012/04/15/using-corona-sdk-with-rest-api-services/
You can use the Google Play Game Services (GPGS) now to do that. There should be a tutorial coming soon on it. While this currently only supports Android, the iOS support is coming soon.
There should be some tutorials already on setting up leaderboards with Apple Game Center. Here is one. It’s a bit dated, and you can skip the Open Feint stuff, but it should be enough to get you started with Apple:
http://www.coronalabs.com/blog/2012/01/17/tutorial-game-center-integration-ios/
Open Feint is no more, and as announced earlier, we are winding down Corona Cloud. There is a service called Scoreid (I think) that several members have used to implement global leaderboards. There may be some community code for this. Others have used Parse’s REST database service for similar and there should be community code for that as well.