Skip to content

smartswap-org/databases

Repository files navigation

Smartswap Databases

Linux Python MariaDB

This section provides all the tools needed to create and manage databases for the Smartswap project.

Important

You can add this repository as a submodule in any part of the Smartswap project to easily access and use the mng/ functions.

Caution

When using the create_env script, please pay attention to the prompts it provides. If the databases already exist on your machine, the script will ask if you want to proceed with an "over-setup-env." Choosing this option will delete all existing databases and recreate new, empty ones.

Deployment

Setting Up the Environment

To create or recreate the databases and set up the environment, run:

python create_env/create_env.py

You will need to provide the following parameters:

  • sql_host: The host where the SQL service is running. Use localhost for local, or an IP address (e.g., 192.168.1.50) for a local network machine. For online services, use the public IP address.
  • sql_user and sql_password: Credentials with sufficient privileges to grant access to new users. For simplicity, you can use root.
  • db_user and db_password: Credentials for accessing the Smartswap databases. The script will grant all necessary privileges to this user by default.

Usage

Once your environment is set up, you can use the management functions to interact with the databases. For detailed information, refer to the mng/ folder and the mng/README.


About

Tools for managing the project's databases

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages