I have got the same error. Can some help pls.I have tried installing other version 5.1.422.256 SP2, still the same problem. I have even tried the installation by skipping the database creating step.
I am using windows 2003 server SP1 with SQL server 2005 workgroup edition.
I have managed to solve the problem by doing offine install. Instructions: http://world.episerver.com/Documentation/Items/Tech-Notes/EPiServer-CMS-SP2/EPiServer-CMS-5-SP2-Installation-Instructions/
I was trying to the online install on my server since I had internet access, but the server was not allowing the .sql file to download due to security reasons(unknown to me). Hence I created a offline package locally, uploaded and installed via offline installation on the server and it works like a charm !