I got this error while configuring
SharePoint 2010. After installation when I started configuration, I got this error when I gave the database server name as local. The full error message was: "Cannot connect to database master at SQL Server at local. The database might not exist, or the current user does not have permission to connect to it."