Bench Doctor error

Hello guys,
i am trying to schedule a task with the event scheduler and it was not implementing so i ran bench doctor and i got an error: pymysql.err.OperationalError: (1045, u"Access denied for user ‘_1bd3e0294da19198’@‘localhost’ (using password: YES)")

the thing is 1bd3e0294da19198 is the name of my old site which does not work anymore, is there anyway to fix this error or better still is there anyway to make the scheduler work without interfacing with bench doctor??

thank you.

You’re headed in the right direction, but would need a bit more info to resolve this.
What is in the file “current_site.txt”? Can you also ensure that your old site is dropped?
If you look in the site_config.json for each site in your bench it will give you that user name.

old site site_config.json : “db_name”: “_1bd3e0294da19198”,
“db_password”: “1ANSFlN3tPb1Fejq”,
“db_type”: “mariadb”

current site site_config.json: db_name": “_a46003081c220c38”,
“db_password”: “i3q7gymWtrLMLEKD”,
“db_type”: “mariadb”,
“developer_mode”: 1,
“encryption_key”: “y5Sa_Kmor5nv9396va3PyCfsjwnSdwyt0sT4nw4xC0c=”,
“limits”: {
“space_usage”: {
“backup_size”: 1.0,
“database_size”: 23.7,
“files_size”: 2.0,
“total”: 26.7
i get the same pymysql.err.OperationalError: (1045, u"Access denied for user ‘_1bd3e0294da19198’@‘localhost’ (using password: YES)") error when i try to drop my old site.

thank you for your help.

You need to have bench running to drop a site, to migrate or to execute patches, I think that’s the problem.

I executed the drop site command while bench was running

Clarification: When you did drop-site before, bench was running OR when you did it just now, it worked?

Sorry i was not clear enough, i mean when the bench was running when i did drop site previously.

OK. Let’s do a work around.

  1. Log in to mysql as root: mysql -u root -p
  2. drop database _1bd3e0294da19198;
  3. Confirm with show databases;
    I’m not sure this will fix the problem, but it will eliminate a variable and we’ll keep hacking on it.

Done, i really appreciate the help,
I still got the same error after i restarted bench and tried the drop site command.

That’s frustrating. So, dropping the database and dropping the site are basically the same thing. No need to run it after the mqsql hack. Try the scheduler now?

yes, but i am getting the same error

You might want to cd to the sites directory and check if the site folder for the dropped site is still there. If it is, delete it.

Also, check if the new site is the one inside the currentsite.txt (which is in the frappe-bench/sites/ folder).

You can also execute bench use new_site_name to update bench’s currentsite without having to edit the txt file manually. :slight_smile:

Hope it helps.

1 Like

Thank you for your help!!, I deleted the file manually and everything is working properly, thanks again

You’re welcome.

Glad I could help.

Will now close the topic since the problem has been solved. :slight_smile: