how to set up configuration of mysql’s replication in loopback4?
After setting it up, the configuration can be found under src/datasources/.datasource.ts, which would look like this:
ex 1)
{
name: ‘db’,
connector: ‘mysql’,
url: ”,
host: ‘19.151.192.55,19.151.192.56’, —–> ?
port: 3306,
user: ‘user’,
password: ‘pass’,
database: ‘testdb’,
};
ex 2)
{
name: ‘db’,
connector: ‘mysql’,
url: ”,
host: ‘19.151.192.55’, —–> ?
port: 3306,
user: ‘user’,
password: ‘pass’,
database: ‘testdb’,
},
{
name: ‘db’,
connector: ‘mysql’,
url: ”,
host: ‘19.151.192.56’, —–> ?
port: 3306,
user: ‘user’,
password: ‘pass’,
database: ‘testdb’,
};