sqlalchemy mysql can we pass multiple hosts? - flask

As per sqlalchemy website and github in postgresql we can pass multiple host when we create database connection:
Ex: "postgresql+psycopg2://user:pass#/test?host=host1:port1&host=host2:port2&host=host3:port3"
can we pass multiple hosts in mysql also?

Related

Django app with offline mode: store datas both in remote and local postgresql database?

I have a problem quite similar with this post but was thinking for an easiest implementation
My Django app is deployed on a remote server with Postgresql database (main central remote database).
Users online: data are stored both in the remote database and, if possible, in a local postgresql database (local database hosted on a dedicated laptop)
Users offline (when server where app is hosted is down): 'central' user need to be able to use Django web app on the dedicated laptop (with PWA) with the most up-to-date local database
When back online, the remote database is synchronized
Django can use multiple databases.
But is my solution possible?
I have read for Django sync and collect-offline apps...
thanks for advices

Can I use Cassandra as Apache Airflow backend DB

I was going through the Airflow documentation and as per the documentation
As Airflow was built to interact with its metadata using the great SqlAlchemy library, you should be able to use any database backend supported as a SqlAlchemy backend.
Although Cassandra doesn't support SqlAlchemy, I see the project Flask-CQLAlchemy provides and SQLAlchemy like API.
Flask-CQLAlchemy handles connections to Cassandra clusters and provides a Flask-SQLAlchemy like interface to declare models and their columns in a Flask app Links
I am just getting started with Airflow and trying to setup its backend Db, will Cassandra with Flas-CQLAlchemy works for Airlow metadata repo?

How can i update one PostgreSQL database and sync changes/updates to another PostgreSQL database on another server

I have a django website with PostgreSQL database hosted on one server with a different company and a mirror of that django website is hosted on another server with another company which also have the same exact copy of the PostgreSQL database . How can i sync or update that in real time or interval
Postgresql has master-slave replication. Try That!

Newly created local claim isn't shown in claim configuration WSO2 Identity Server when using remote Postgres DB

I am trying to map a newly created local claim to the claims of a service providers.
Some notes about my WSO2 implementation:
I am using Postgres databases in AWS's Relational Database Service. I followed the steps here to set up my master, metrics, and bps databases: https://docs.wso2.com/display/ADMIN44x/Changing+to+PostgreSQL#ChangingtoPostgreSQL-ChangingthedefaultdatabaseChangingthedefaultWSO2_CARBON_DBdatasource
My steps to map the claim look like this:
Create a local claim
Attempt to add the newly created claim to a service provider
My issue is that the claim I created in step 1 doesn't appear in the dropdown in step 2. I have confirmed that the claim is being written to my master Postgres database under the idn_claim table. If it's in the idn_claim table, shouldn't it show in the dropdown when adding a claim?
The same steps have worked for me with the following setups:
Using the built-in H2 database (no config changes)
Using a LOCAL Postgres database that is setup using the same configuration files and seeding scripts as the scenario above.
I'm stumped about why everything works as expected using the H2 database or a Local Postgres database (with identical setup) but it doesn't work with a Postgres database in AWS.

How to connect to remote SQL Server for login validation in flask

I am working on a flask project where I need to connect to a remote SQL Server for validating login credentials and session management. Being new to the flask environment, I am not able to work my head around sqlalchemy with SQL Server. Also, how to user LoginManager() for maintaining login sessions?
The only difference there is between working with a local database vs a hosted one is the SQLALCHEMY_DATABASE_URI.
Now if that database is read only and already have defined tables, then it's another problem, but I can't deduct that from your question.