0

When I try to do:

"drop database wachtwoorden;"

I get the message:

-ERROR 1044 (42000): Access denied for user 'Jip1912'@'%' to database 'wachtwoorden'-

So I tried in bash:

"mysql -u root -p"

I had to give a password and after that I got:

-ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)-

Cœur
  • 37,241
  • 25
  • 195
  • 267
Jip Harthoorn
  • 292
  • 1
  • 8
  • 25
  • For the first one, does the user Jip1912 have the DROP privilege? If not, the drop will fail. See this: https://dev.mysql.com/doc/refman/5.7/en/privileges-provided.html#priv_drop The other sounds like a separate issue, like the mysql daemon is not running, or the may be permission issues. See this for various things to check: https://stackoverflow.com/questions/11990708/error-cant-connect-to-local-mysql-server-through-socket-var-run-mysqld-mysq – Paul T. May 31 '17 at 21:39
  • No I dont have that privilege, otherwise it would work, but an hour ago it just worked...When I run sudo find / -type s, it returns "sudo: unknown user: root sudo: unable to initialize policy plugin". I made the database and I didn't even know that I could add people or something so I don't understand that I don't have the privileges anymore, an hour ago I did had them ... – Jip Harthoorn May 31 '17 at 21:48
  • Do you know root's password? What if you try to login by doing: `mysql -u Jip1912 -p` ? Other than that, it almost sounds like something bad has happened. Were more things deleted unexpectedly? – Paul T. May 31 '17 at 21:54
  • When I do mysql -u Jip1912 -p, it says Enter password:, I typ the password and it says ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2). In case I fill in the wrong password, the password is the one right here https://blog.pythonanywhere.com/static/images/flask-tutorial-databases-tab-empty.png, right? What do you mean by something bad? It doesn't really matter if the database gets deleted because im just testing things and I want to delete the database myself. – Jip Harthoorn May 31 '17 at 22:03
  • Maybe something bad, I'm not sure, only how it sounds based on your description. Can you check that the mysqld is running? – Paul T. May 31 '17 at 22:32
  • How do I do that? But what is an example of something bad? – Jip Harthoorn May 31 '17 at 22:38
  • Sounds bad: "unable to initialize policy plugin" – Paul T. May 31 '17 at 22:50

1 Answers1

0

You do have drop privileges for your databases on PythonAnywhere, you're just not using the right database name. Your databases are listed on the databases page.

Glenn
  • 7,262
  • 1
  • 17
  • 23
  • 1
    Man...... thanks... a lot.. I am soooooo stupid. Ofcourse I had to do ''drop database Jip1912$wachtwoorden;... I thought it worked before the way I did but that is certainly not the case.....and I was trying to get it work the whole evening but I only had to do this.. Thanks. – Jip Harthoorn Jun 01 '17 at 14:49