Forums

ERROR 1044 (42000): Access denied for user 'lisot'@'%' to database 'lisot@xxx'

Suddenly I lost access to my website because the password stopped working. All commands in MYSQL resulted in ERROR 1044 (42000). However, I had access to the database through Workbench and ONLY WITH IT I was able to delete the Database. I deleted the old database and I created a new one with a new password. I was able to re-upload the copy of the database but there is no way to access it. - Luckily the site is still in production. What if this happens when it's up and running? -

Are you able to start a MySQL console for the database on the Databases page?

YES. You can see in this print links. ... https://i.imgur.com/g7nkL0g.png ... https://i.imgur.com/xOW34qf.png ... And now even with Workbench I can't access the DB lisot@xxx. So there is no way to delete this DB (which I created for testing), to create the correct one.

I think you can't drop a database that is currenlty in use -- at least I got the same behavior when I used your commands in my dummy database. But when I opened a fresh MySQL console and ran only drop database foo$bar, it was happily executed. What kind of errors do you get in Workbench when you're trying to connect to the database?

I just logged out of pythonanywhere, signed in and on the Databases tab I clicked on the lisot@xx table. In Mysql Bash I typed ..... DROP DATABASE lisot@xxx; .... The error continues> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@xxx' at line 1. .... Workbench: Cannot Connect to Database Server.

I made a bizarre mistake. I was using @ instead of $. Sorry for my mistake. I'm 68 years old and I don't see very well. Using the right character... it worked. Thank you for your willingness to help me.

Oh, I missed that, too! Glad you found it, after all!