enter image description here Fatal error: SQLSTATE[HY000] [1045] Access denied for user 'antoniy274'@'localhost' (using password: YES) in /home/ubuntu/workspace/pset7/vendor/library50-php-5/CS50/CS50.php on line 313

line 313 on CS50.php // trigger (big, orange) errorenter image description here

I just need to go to work with databases. I'm using the autumn 2016 course. my e-mail [email protected]

  • More context please. Like offline or online IDE? You're on pset7, but which course? Current courses since CS50 fall 2016/CS50x 2017 use Python rather than PHP for your code, but for example the phpliteadmin still is PHP.
    – Blauelf
    Jan 28, 2018 at 18:01
  • I just need to go to work with databases. I'm using the autumn 2016 course. my e-mail [email protected]
    – Antoniy274
    Jan 28, 2018 at 20:01
  • Weird. docs.cs50.net/2016/fall/psets/7/pset7.html mentions "Python" rather than "PHP". Haven't done PHP myself, I won't be able to help you.
    – Blauelf
    Jan 28, 2018 at 21:12

1 Answer 1


You will get this error if the values of "username" and "password" in config.json do not match the results of username50 and password50 from the command line.

BEWARE: Lots has changed since the 2016 iteration of the course. Very significant is the fact that download.finance.yahoo.com has been deprecated, so the supplied lookup function will not work. You can search this forum, or any of the other support forums, for how this was resolved in the current version. You will need to retrofit any solution to this version of the courseware.

  • username and password is right
    – Antoniy274
    Jan 29, 2018 at 18:27
  • What happens when you run mysql50 shell at the command prompt? It should start a mysql > command line (type quit to exit). If it does, that indicates that the system parameters username50 and password50 are correct. You would need to verify you have completed all the install steps and triple check that config.json is correct. Jan 30, 2018 at 14:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .