I am trying to set up a PHP/MySQL application given to me from a third party. Everything is installed on my server, but when I hit the site with a browser, I get a regular database login error. I'm very new to MySQL administration so this is likely a newbie issue. However, I have a lot of experience administering SQL Server so I'm not completely cluless.
I can reproduce the login error at the command line (actual login is changed for privacy):
Running:
Code:
mysql --user=webuser --password=samplepw
Results in:
Code:
ERROR 1045: Access denied for user: 'webuser@localhost' (Using password: YES)
I do a select * from user and get:
Code:
+-----------+------------+------------------+
| Host | User | Password |
+-----------+------------+------------------+
| localhost | root | XXXXXXXXXXXXXXXX |
| % | root | |
| localhost | | |
| % | | |
| localhost | sa | XXXXXXXXXXXXXXXX |
| % | webuser | XXXXXXXXXXXXXXXX |
+-----------+------------+------------------+
I've set the password using several variations of the same command:
Code:
SET PASSWORD FOR 'webuser'@'%' = PASSWORD('samplepw');
SET PASSWORD FOR 'webuser' = PASSWORD('samplepw');
SET PASSWORD FOR webuser = PASSWORD('samplepw');
These all return the suspicious message:
Code:
Query OK, 0 rows affected (0.00 sec)
Why 0 rows affected? That sounds suspicious. However, I can see the encrypted password change in the user table if I try different or blank passwords. Also, if I try an invalid user name, I get an actual error and not the "0 rows affected" message.
None of the above helps and I can still never log in.
The third party that sold us this software specifically designated versions of PHP/MySQL to use instead of the latest.
MySQL version - 3.23.49
PHP version - 4.3.1
(I'm using a Windows 2K server box with all the latest patches and IIS)
My plan is to stick with their version recomendations for now. And eventually, when everything is running smoothly, upgrade to the latest versions.