Skip to content

Computer-Science-Course/master-user-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Database and tbales on my mysql

Master

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);

Slave

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);

Adapte for your environment

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.

Create Virtual environmen

python -m venv .venv

Activate Virtual environment

source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

Run the app

python simulator

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages