Giter VIP home page Giter VIP logo

percona-mysql's Introduction

percona-mysql

percona mysql for nicescale

Build

docker build -t nicescale/percona-mysql .

Run

. path.ini
docker run -d -v $HOME/data:$data -v $HOME/log:$log nicescale/percona-mysql

Create Database

. path.ini
docker run --rm -v $HOME/data:$data -e DBNAME=dbtest -e DBUSER=dbtest_user -e DBPASS=123qwe nicescale/percona-mysql /opt/nicedocker/create_db.sh

If you need to automate your work, you can create database like this:

docker run --rm -v $HOME/data:$data -e DBNAME=dbtest -e DBUSER=dbtest_user -e DBPASS=123qwe nicescale/percona-mysql /opt/nicedocker/wait.sh /opt/nicedocker/create_db.sh

Script wait.sh will execute create_db.sh until mysqld be ready.

Connect Database

. path
docker run --rm -it -v $HOME/data:$data nicescale/percona-mysql mysql  

Execute Sql

. path
docker run --rm -v $HOME/data:$data nicescale/percona-mysql mysql -e "select count(*) from dbtest.testtable"

Backup Database

. path
docker run --rm -v $HOME/data:$data -v $HOME/backup:/backup nicescale/percona-mysql sh -c "mysqldump dbtest > /backup/dbtest"

Shutdown Database

. path
docker run --rm -v $HOME/data:$data nicescale/percona-mysql mysqladmin --no-defaults shutdown

percona-mysql's People

Contributors

hanwoody avatar

Watchers

dmitiriy grunskiy avatar

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.