Yep, thats the way the system was designed actualy, check it out, the mysql_connect() function takes a host name as a parameter, even it's it's just "localhost", so all you do is just change that one simple setting and bam, you're on you way 🙂
Oh, just don't forget to password the mysql database else you'll open yourself up for a beating.