ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

New site installation error `Access denied for user ''@localhost'(using password: YES)`


Hi All,

When I am setting up new site in server Ubuntu 18.04.2 LTS I am getting the error below:

ERROR 1045 (28000): Access denied for user 'newdb'@'localhost' (using password: YES)
Database not installed, this can due to lack of permission, or that the database name exists.
			Check your mysql root password, or use --force to reinstall

I have run below command:

bench new-site my_new_site --db-name newdb

I have found these references from before and tried them but did not work for me:

Any help is greatly appreciated.




This is strange. Does bench create a new user for each table? If so since when is that. To me this seems like a problem in bench.

What if you create “newdb” database and user manually and grant all permissions to the database for this user and then use —force during bench new-site?


Hi All,

These steps work out for me:

  1. Create manually the DB
  2. Create user with both ‘localhost’ and ‘’ host. I have granted it access to all table in the DB.
  3. I did bench new site and it breaks with the same issue.
  4. I went to the site.config file. There is the DB name and a set password there. I copied the “password” and set the user in mysql manually to this password.
  5. I reinstall the site and now it have install frappe successfully.