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 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 I probably just need an upgrade to my webservices
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.