Issue with bench new-site - MySQL Access Denied (1698) Frappe-bench 15 on ubuntu 22.04.5

Command used:
cd frappe-bench
bench new-site newsitename.com

The root password is the one i’ve set up for mysql when I used this command if i’m not mistaken:

sudo mysql_secure_installation

But when prompted, I didnt change the root password i.e:

  • Enter current password for root: (Enter your SSH root user password)
  • Switch to unix_socket authentication [Y/n]: Y
  • Change the root password? [Y/n]: N
    It will ask you to set new MySQL root password at this step. This can be different from the SSH root user password.
  • Remove anonymous users? [Y/n] Y
  • Disallow root login remotely? [Y/n]: N
    This is set as N because we might want to access the database from a remote server for using business analytics software like Metabase / PowerBI / Tableau, etc.
  • Remove test database and access to it? [Y/n]: Y
  • Reload privilege tables now? [Y/n]: Y

PROBLEM
So when I did:
bench new-site newsitename.com

MySQL root password: <==I did both "enter" which means none and also i've input the password of the root account. It still results in the same error:

pymysql.err.OperationalError: (1698, "Access denied for user 'root'@'localhost'")

Can someone help trouble-shoot this?
Thank you in advance.

Try: sudo bench new-site newsitename.com

1 Like