Reputation: 300
I'm trying to configure a my ubuntu 14.04 server to run my web application that I created awhile ago. It was on a different server than and now I'm migrating it.
So I've put everything in the var/www/html folder
Ran the following in Putty
sudo a2enmod rewrite
sudo service apache2 restart
Once I go to my actual website I get the following error message
SQLSTATE[28000] [1045] Access denied for user 'www-data'@'localhost' (using password: NO)
If I go directly to the .htaccess redirect file I can get to the first page fine, its when I try to do anything with the database it seems to fail.
The user I created has enough access to login or register a new user on the site etc, but this error is stopping me.
Upvotes: 0
Views: 1088
Reputation: 300
Had to modify config.php as it was missing mysql user credentials, hence why it was searching in the www-data group which had no password.
Upvotes: 0
Reputation: 4335
This is an SQL issue. Nothing to do with your .htaccess.
Use "show grants" on my SQL server (assuming it's mysql) to see what users have access to what.
Here are some examples of possible issues:
Your error indicates you didn't pass a password.
Upvotes: 1