Lost connection to MySQL when dropping site

I tried to delete a site using bench drop-site sitename but receive this error message

ERROR 2013 (HY000): Lost connection to MySQL server during query

Then I tried to login to mariadb and delete from inside, but still getting this error. Why and what steps should I do to delete this one site?

Note: other sites are created and dropped just fine.

Thank you.

Try reinstalling the site with bench --site [sitename] --force reinstall , then drop it.

the same error.

pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')

also the same with new-site --force or drop-site --force

Take a look at mysqlcheck, from a command prompt: man mysqlcheck

mysqlcheck _66ad74dbca6a37ac
mysqlcheck: Got error: 1045: Access denied for user 'username'@'localhost' (using password: NO) when trying to connect

make sure mariadb status is active
try with sudo command and enter mysql root password

Mariadb is active. And I can create new site and drop other site.
In frappe.log this site during scheduler run:

Site: site1.domain.id
Access denied for site site1.domain.id
[DEBUG] 2020-09-25 23:00:17,690 | /home/user/frappe-bench/apps/frappe/frappe/utils/scheduler.py:

I don’t need to enter the root sql password. Even if I need to, I don’t have the chance because it can’t connect at all. And for other sites also don’t need to enter root password because I have it in common_site_config.json.

Only this one site is problem. Other sites are fine.

I just tried to create user with the same name as the database and use the db password in th site_config.json.
Using that user I can drop tables in its database. But can’t drop the database (same error).
But after logging out from Mariadb, I can’t login to mariadb again using that user, so have to use root.
From root I see user list and the user I created (same name as db) is gone. Always like this.

It may take less time to backup the working sites, reinstall Mariadb , and restore the working sites.

If you cannot use mysqlcheck with either the user/password that was associated with the site or the root one that Mariadb respects otherwise, it may be your only option.

Seems like my last resort :smiley:
Thank for everybody’s help and support.