Install ERPNext with remote managed MariaDB

I’m trying to install ERPNext with a managed MariaDB service.
Within that service, I created a database named ‘erpnext’ and a user named ‘erpnext’ that associated with ‘erpnext’ database:


When I run SHOW GRANTS query, the result is:

GRANT USAGE ON . TO ‘erpnext’@‘%’ IDENTIFIED BY PASSWORD ‘userpassword’
GRANT ALL PRIVILEGES ON erpnext.* TO ‘erpnext’@‘%’

Then I create a new site with bench.

bench new-site site1 --db-name erpnext --mariadb-root-username erpnext

And I got this error:

Exception: Database erpnext already exists

Then I removed --db-name parameter to let bench decide database name.

bench new-site site1 --mariadb-root-username erpnext

And I got this error:

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

I know bench need root user access to have CREATE USER privilege and I contacted with the managed database service support but I can not have either root user access or CREATE USER privilege for my erpnext database user.

Is there any solution for me to install ERPNext to that managed database service instead of install my own MariaDB server?

Thank you.

Refer this link. Might help. Try with default username as root instead of erpnext.

Thank you @kartik, but the service does not allow me to create an user named ‘root’. I think because it’s already existed.

@lapphan

GRANT SUPER ON . TO user@localhost

Might help you…!!!

Thank you @Onkar_Mirajkar. I tried but got this message because of lacking privilege:

GRANT SUPER ON *.* TO ‘erpnext’@‘%’ IDENTIFIED BY PASSWORD ‘erpnext’
1045 - Access denied for user ‘erpnext’@‘%’ (using password: YES)

So I think I will go with my own MariaDB server. Thank you all for your help.

1 Like