# Virtual host and MySQL problem



## Matsaki (May 2, 2008)

I have my PHP/MySQL site running locally on my computer for testing and development. Now I have a new computer and made a fresh install and every thing from the beginning. 

I started Apache, PHP and MySQL and I can connect fine to my local MySQL databases. But when I try to open my site I get the following error:



> Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mats'@'localhost' (using password: YES) in /Users/matsaki/Sites/ayianapa.nu/includes/dbopen.php on line 26



But I know the username and password is correct. So what's going wrong here?


----------



## ElDiabloConCaca (May 3, 2008)

When you added the "mats" user to the new mySQL installation, did you set him up for all zones?

Does the root account work the same way?


----------



## Matsaki (May 3, 2008)

Thanks I found the problem


----------



## ElDiabloConCaca (May 4, 2008)

Can you post the solution so that others browsing the forum with similar problems can have troubleshooting steps?


----------

