I tried changing the $host to 127.0.0.1 and that shows me connecting as localhost.localdomain. If I change $host to localhost it tries to connect as just localhost. Either way I get the same Access denied. I have tried adding a user account in linux for my username as well, but that doesn't help either. I can log into the username in linux and connect mysql using the username and password in my pl script. Do you think this is a permissions problem in linux?