abahler Posted January 27, 2014 Share Posted January 27, 2014 I am going through chapter 9, "CMS with OOP", and I have encountered an error when I finally visited the site (after building a few files first). I reviewed my syntax thoroughly, then downloaded the files from this site just to see if my code was wrong, but the home page (index.php) still displays the following error: SQLSTATE[28000] [1045] Access denied for user 'username'@'localhost' (using password: YES)[/size] The "pages" table in the "cms" database does indeed have rows inside it, I am using the correct username and password for my database (checked in the mysql command line), and I ran a php_info( ) to verify that PDO is enabled. Can anyone offer a suggestion as to the issue? I reviewed the forums but saw no question pertaining to this; if this is a duplicate, I apologize. EDIT: My search engine of choice is telling me it's some sort of permissions issue, but I haven't found any fixes. Still looking. Now that that's the issue, I'm not sure if this question is still within the scope that the community can answer it since this is a PHP and not a MySQL book. If so, help would be much appreciated! 1 Link to comment Share on other sites More sharing options...
abahler Posted January 28, 2014 Author Share Posted January 28, 2014 I did some more research and just decided to uninstall and reinstall MAMP. Everything works fine now as far as the database is concerned. Link to comment Share on other sites More sharing options...
Larry Posted January 29, 2014 Share Posted January 29, 2014 Okay, you shouldn't have to do that but I'm glad it's working now for you and thanks for letting us know. Link to comment Share on other sites More sharing options...
Recommended Posts