Giter Club home page Giter Club logo

ezdocker_mysql's Introduction

EZDocker MySql

This project is used to create and dump docker MySql containers easily using helper scripts

Usage

Initializing the Database

Note: Ensure you edit the file db_files/backup.sql to have the correct database name for your purposes before proceeding.

For Windows Users:

# To initialize the database:
# Navigate to the root project directory (e.g., ezdocker_mysql/)
# Run the following command to create the MySQL server
init_script.bat

For Linux Users:

# To initialize the database:
# Navigate to the root project directory (e.g., ezdocker_mysql/)
# Run the following command to create the MySQL server
init_script.sh

Performing a Backup

For Windows Users:

backup_script_docker.bat <db_name>

For Linux Users:

backup_script_docker.sh <db_name>

Replace <db_name> with the actual name of the database you want to create a backup for. Make sure you have navigated to the project's root directory before running the backup script.

Important Note

If you prefer using one of your backups instead of the blank database created initially, you can replace the backup.sql file located in db_files/ with any backup you have made in the backup/ folder.

Background

Motivation

This project was born out of the necessity I encountered while developing various projects that required a database. Traditional tools like MySQL Workbench felt cumbersome, offering more features than necessary for my development work.

Benefits

The EZDocker MySQL project eliminates complexity from the process of setting up databases, allowing for more streamlined development. It empowers users to effortlessly create multiple MySQL servers and readily generate backups. By doing so, it enables developers to allocate more time and focus on the enjoyable aspects of their projects.

ezdocker_mysql's People

Contributors

bsimmons123 avatar

Stargazers

Rob Wood avatar

Watchers

 avatar

ezdocker_mysql's Issues

Error with "(using password: NO)" fix

  • logs:
mysqldump: [Warning] World-writable config file '/home/config/mysqlpass.cnf' is ignored.
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
  • fix:
    chmod 644 config/mysqlpass.cnf

Password being ignored in config file

  • Problem:
mysqldump: [Warning] World-writable config file '/home/config/mysqlpass.cnf' is ignored.
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect

Fix:

  • -p%PASSWORD% flag in docker command

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.