Giter VIP home page Giter VIP logo

bash_scripts's Introduction

Hi there ๐Ÿ‘‹

bash_scripts's People

Contributors

andyceo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bash_scripts's Issues

dynamically determine the MySQL datadir

Use:

show variables like 'datadir' - ั‚ะพ know the directory with databases

OR

grep -i datadir /etc/mysql/my.cnf

to find out what datadir MySQL use in your system.

Use mount --move in mysql2memory.sh

The move operation.
Since Linux 2.5.1 it is possible to atomically move a mounted tree to another place. The call is
mount --move olddir newdir
or shortoption
mount -M olddir newdir
This will cause the contents which previously appeared under olddir to be accessed under newdir. The physical location of the files is not changed.

sudo mount --move /tmp/mysql2memory /var/lib/mysql

And that's all!

docker-service-exec.sh Error: No suitable container found, exit.

docker-service-exec.sh Error: No suitable container found, exit.

docker version:

Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:22:05 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:45 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

I run docker-service-exec.sh in a vm which create by docker-machine.

docker-service-exec.sh redis-failover_master /bin/sh

Error as follow:

2020-01-09T03:22:44UTC [redis-failover_master] No suitable container found, exit.

docker service ls output as follow:

ID                  NAME                      MODE                REPLICAS            IMAGE               PORTS
wquhm14bqjje        redis-failover_master     replicated          0/1                 redis:5-alpine      
q3ym4vfk6u0a        redis-failover_sentinel   replicated          0/1                 redis:5-alpine      
qs645y4m2kiu        redis-failover_slave      replicated          2/2                 redis:5-alpine  

docker ps -a output as follow(nothing):

CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

source code: docker-service-exec.sh

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.