CREATE SCHEMA `master` ;
CREATE TABLE `master`.`users` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(256) NOT NULL,
`username` VARCHAR(45) NOT NULL,
`password` VARCHAR(256) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `idusers_UNIQUE` (`id` ASC) VISIBLE);
CREATE SCHEMA `slave` ;
CREATE TABLE `slave`.`users` (
`id` INT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(256) NOT NULL,
`username` VARCHAR(45) NOT NULL,
`password` VARCHAR(256) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `idusers_UNIQUE` (`id` ASC) VISIBLE);
Change values:
host: str = 'localhost',
user: str = 'root',
password: str = '1234567',
database: str = 'slave | master',
on master file and slave file to adapt to your environment.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python simulator