mirror of
https://github.com/frappe/frappe.git
synced 2026-04-24 01:14:06 -06:00
Page:
Using Frappe with Amazon RDS (or any other DBaaS)
Pages
(Client Side Scripting)Fetch values from another document
(Client Side Scripting)Fetching child tables
App Development using GitHub
Client Side Scripting Index
Client side scripting(Archive)
Client side scripting
Deprecations
Developer Cheatsheet
Frappe Framework Front End Routing and Document Creation
Frappe Push Notification Client Reference
Frappe Test Record Loading: Startup Sequence
Generating Test Records in Frappe
Home
Installing Frappe ERPNext on MacOS
Migrating to Version 13
Migrating to Version 14
Migrating to nightly version
Migrating to version 15
Migrating to version 16
Pull Request Review Guidelines
Setup MariaDB Server
Setup NFS Server
The Hitchhiker's Guide to Installing Frappe on Linux
The Hitchhiker's Guide to Installing Frappe on Mac OS X
Tree view for custom DocType
Using Desk Modules, Calendar and List View in Frappe Framework
Using Frappe with Amazon RDS (or any other DBaaS)
Using the VSCode Debugger with Frappe
Writing an IntegrationTestCase in Frappe: A Step‐by‐Step Guide
query builder migration
No results
Your bench instance allows you to connect to an external database by setting a configuration in your common_site_config.json in your sites folder.
Setup an RDS Instance for Frappe
We're in the AWS Console, on the RDS page.
- Click the "Create database" button.
- Choose "Standard Create" and select "MariaDB" as the database engine.
- Choose a supported MariaDB Version (currently, 10.3)
- Set the "Master username" to "root" and choose a password. This is the password that bench wants to know when it asks for the "Root password".
- Choose the size of the DB instance (at least "t2.small").
- Optional: Enable Multi-AZ deployment for redundancy.
- Choose the same VPC that contains your frappe server EC2 instance.
- Select or create a parameter group that matches the below settings (for MariaDB 10.3).
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
default-character-set = utf8mb4
- Create the database and wait until it's ready
- Note down the "Endpoint" for that instance (for example,
instance.rds.amazonaws.com)
Parameters for MariaDB 10.2
If you want to use MariaDB 10.2, use these parameters instead:
innodb-file-format = barracuda
innodb-file-per-table = 1
innodb-large-prefix = 1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
default-character-set = utf8mb4
Setup Frappe
We're on the frappe server. This should be an EC2 instance in the same VPC as the database.
- Test if you can connect to the database
mysql -h instance.rds.amazonaws.com -u root -p
-
Open
frappe-bench/sites/common_site_config.jsonwith an editor- Add a key
db_hostand set it to the endpoint you just noted down. Add a keyrds_dband set it to 1. The two lines should look like this:
- Add a key
{
"db_host": "instance.rds.amazonaws.com",
"rds_db": 1,
}
- Now you should be able to create a new site by running
bench new-site
Move an existing database to RDS
- Take a database backup of your site with
bench backup. - Change the configuration as described in "Setup Frappe".
- Create a new site and restore the backup into it.