-1

I am trying use this guys code: https://github.com/daveismynamecom/loginregister in a xampp enviroment. My first error was a connection error. It was easy to solve and just had to cahnge the connection PDO in the config file. Now I get a

SQLSTATE[HY000] [1045] Access denied for user 'database username'@'localhost' (using password: YES)

error. I have looked at every stack q&a and have not found an answer. I didnt change the code from this guys website other than the PDO. any help would be great. Also this was my first time install xampp and I didnt have msql or php before this

[edit] I have never used mysql so how would you set up root permissions and setup a root user. I can log in to the root user from the mysql console by leaving the password blank but I don't know if that is it

[edit v2] I needed to add the user :). Did not know that. but now I am getting a error code 1044 but that is a question for another time

  • root user permissions set up? right password? –  Jan 15 '16 at 01:03
  • if You don't remember the root password please check this answer on how to set new one: http://stackoverflow.com/questions/24566453/resetting-mysql-root-password-with-xampp-on-localhost – Michal Przybylowicz Jan 15 '16 at 01:06

1 Answers1

0

It's not about the code itself - that error comes directly from your MySQL server. Check whether your credentials (user/pass) are correct.

[edited]

I have never used mysql so how would you set up root permissions and setup a root user. I can log in to the root user from the mysql console by leaving the password blank but I don't know if that is it

So did you set a blank password in the config file as well?

Martinus
  • 16
  • 4
  • I would not know is there a command I could run or something? – Casey Honaker Jan 15 '16 at 03:43
  • Depends on what you want to do. If you want to set a new password, see Michał's reply above. If you want to connect to mysql using current credentials (I guess that you have a blank password), then you can do it by setting blank password in config file. – Martinus Jan 15 '16 at 22:29