Forums

Website isn't loading

I have had a website running on pythonanywhere successfully for more than three years.

Yesterday, I added a new web app and database and now my website isn't loading. This is the error I get OperationalError at / (1045, "Access denied for user 'amritha'@'10.0.0.105' (using password: YES)")

I am able to access the database from the Database tab and run and view all my tables. However, when I try to go in through Bash, I get the same kind of error. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Can you please help undo the mess I created? I have deleted the new web app but the files and database still exist. I need to get the existing website up and running as soon as possible.

Thanks!

Hi there, the main thing to do would be to double check all your connection details for the database:

  • the hostname
  • the username
  • the password (different from your main pa password, set on web tab)
  • the database name (contains a $)

all of these are available on the databases tab.

you need all of them (including the hostname) for it to work, from your webapp or from a bash console. but the fact that regular mysql consoles work means the service is definitely available...

hi, the hostname, username, password are correct. I have two database names - how do I remove the one I created for the new webapp?

It is working now. I had changed the mysql password when I added a new webapp .Thanks for your help.

This problem was sorted out over email, but just for anyone who winds up on this forum thread by googling how to delete a database, what you need to do is start a MySQL console, then run

drop database yourusername$yourdbname;

...replacing yourusername and yourdbname appropriately, of course.