Installation without root and without root to mariadb

So far it went really well in installing frappe / erpnext without root access on an fairly open shared-webhosting:

but with creating a new-site I don’t find a solution, cause i don’t have root access to the db-server.

pymysql.err.InternalError: (1227, 'Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation')

I found: Install ERPNext without root access to the remote mariadb server and Help with --mariadb-root-username option to authenticate to MariaDB for new site creation and in there a corresponding github issue.

Is that still the state, that I need root access to the db-server? or what is really required?
Is there anywhere a guide / workaround on setting up a new site with a different db user then root?

You will need access to a MariaDB user that has privilege to create databases. If you checkout bench new-site --help, you’ll see --mariadb-root-username, --mariadb-root-password options which you can use to set the privileged non-root user/pass too.

Thank you @gavindsouza,

so I get it right, that currently it is not possible to install erpnext onto an existing database?

I will look into that, how I can overcome this obstacle. :thinking:

Have you gone through the bench docs yet?

You can use bench install-app for that on a site which doesn’t have the setup wizard completed yet.

Thank you for pointing that out, but without a site how should I install an app to that site?

So I still have to overcome that the new-site command is missing a switch to say, please use this preconfigured database and create the tables for this site into it, because then mydb user would not require the right to create a new db, what he don’t has.

Edit / Addition: for now, I will call this not possible on my infrastructure :frowning: I probably just need an upgrade to my webservices :partying_face:

I understand this post is a few years back now, but I am running into a similar problem and was wondering if there has been any development on this topic since then.

My webservice does not allow mysql root access.

I have one predetermined non-root user.
This user can create unlimited databases as long as they are prefixed with the username, e.g.: USER_DATABASENAME.

Setting up a new site with Bench, I receive the following error message:

1227, ‘Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation’

I have tried creating an empty database, named USER_erpnext and passing this to the bench new-site command with a --force option, but I get the same error.

bench new-site site.local --db-name USER_erpnext --db-password MYSQLPASSWD --admin-password ADMINPASSWD --db-root-username USER --db-root-password MYSQLPASSWD --force

Is there an approach to get this site installed with the restrictions I have on the web service?