Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS RDS new-site error #16052

Open
berniezhao11 opened this issue Nov 22, 2018 · 4 comments
Open

AWS RDS new-site error #16052

berniezhao11 opened this issue Nov 22, 2018 · 4 comments
Labels
to-validate Old issues pending validation

Comments

@berniezhao11
Copy link

AWS RDS does not allow GRANT SUPER privilege so the GRANT ALL does not work when creating new site.

When run sudo bench new-site erpnext the following error shows up.

Is there anyway to work around this issue? I'm thinking install the new site on local Database then copy the database to RDS, then change Strappe to point to new DB?

  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 72, in create_database_and_user
    dbman.grant_all_privileges(db_name, db_name)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_schema.py", line 538, in grant_all_privileges
    user, host))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 176, in sql
    self._cursor.execute(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
    result = self._query(query)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
    conn.query(q)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 516, in query
    self._affected_rows = self._read_query_result(unbuffered=unbuffered)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
    result.read()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 1066, in read
    first_packet = self.connection._read_packet()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/connections.py", line 683, in _read_packet
    packet.check_error()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/protocol.py", line 220, in check_error
    err.raise_mysql_exception(self._data)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
    raise errorclass(errno, errval)
pymysql.err.OperationalError: (1044, u"Access denied for user 'root'@'%' to database '76cf18db07302d32'")
@berniezhao11 berniezhao11 changed the title ` AWS RDS new-site error Nov 22, 2018
@chdecultot
Copy link
Contributor

Hi @berniezhao11,

We are using RDS for our ERPNext instances and never faced this issue.

On which version are you ?

In any case, you should never use sudo to create a new site. If that's the case you have an overall problem with your frappe bench folder permissions in Linux that should be resolved first.

@Salmanmulani Salmanmulani added the to-validate Old issues pending validation label Nov 26, 2018
@Salmanmulani
Copy link
Contributor

Will request you to post this query on https://discuss.erpnext.com. If this bug is validated, then we can reopen issue.

@Olawale1
Copy link

Olawale1 commented Dec 3, 2018

Hi @chdecultot

Could you please give some insight into how you set this up? I actually posted this request on the forum:

https://discuss.erpnext.com/t/how-to-use-aws-rds-for-erpnext/43258

Thanks

@chdecultot
Copy link
Contributor

Hi @Olawale1,

RDS is just a normal database running on a different server, so there are only a few things to do:

  1. Configure the database parameters according to Frappe's requirements (depends on the mariadb version and can be found in the easy install script or in several posts on the forum).
  2. Add the db_host parameter in site_config.json with the address of your rds instance.

That's all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to-validate Old issues pending validation
Projects
None yet
Development

No branches or pull requests

4 participants