Loading README.md +1 −19 Original line number Diff line number Diff line Loading @@ -13,25 +13,6 @@ please execute it before you first run the example. Please make sure master-slave data sync on MySQL is running correctly. Otherwise this example will query empty data from slave. ## Using docker-compose to config startup environment before we use docker compose, please install docker first : https://docs.docker.com/compose/install/ #### sharding-jdbc 1. access the docker folder (cd docker/sharding-jdbc/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access mysql / etcd / zookeeper as you want 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down #### sharding-proxy 1. access the docker folder (cd docker/sharding-proxy/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access proxy by `mysql -h127.0.0.1 -P13308 -proot -uroot` 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down to clean the docker container , you could use docker rm `docker ps -a -q` (be careful) ## sharding-sphere-example module design ### project module Loading Loading @@ -109,3 +90,4 @@ we prefer to add encrypt & decrypt example recently. ### how to use sharding-proxy with jdbc. we prefer to add a docker base example recently. ### [how to use docker to config sharding-jdbc & sharding-proxy](./docker/docker-compose.md) docker/docker-compose.md 0 → 100644 +18 −0 Original line number Diff line number Diff line ## Using docker-compose to config startup environment before we use docker compose, please install docker first : https://docs.docker.com/compose/install/ #### sharding-jdbc 1. access the docker folder (cd docker/sharding-jdbc/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access mysql / etcd / zookeeper as you want 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down #### sharding-proxy 1. access the docker folder (cd docker/sharding-proxy/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access proxy by `mysql -h127.0.0.1 -P13308 -proot -uroot` 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down to clean the docker container , you could use docker rm `docker ps -a -q` (be careful) Loading
README.md +1 −19 Original line number Diff line number Diff line Loading @@ -13,25 +13,6 @@ please execute it before you first run the example. Please make sure master-slave data sync on MySQL is running correctly. Otherwise this example will query empty data from slave. ## Using docker-compose to config startup environment before we use docker compose, please install docker first : https://docs.docker.com/compose/install/ #### sharding-jdbc 1. access the docker folder (cd docker/sharding-jdbc/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access mysql / etcd / zookeeper as you want 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down #### sharding-proxy 1. access the docker folder (cd docker/sharding-proxy/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access proxy by `mysql -h127.0.0.1 -P13308 -proot -uroot` 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down to clean the docker container , you could use docker rm `docker ps -a -q` (be careful) ## sharding-sphere-example module design ### project module Loading Loading @@ -109,3 +90,4 @@ we prefer to add encrypt & decrypt example recently. ### how to use sharding-proxy with jdbc. we prefer to add a docker base example recently. ### [how to use docker to config sharding-jdbc & sharding-proxy](./docker/docker-compose.md)
docker/docker-compose.md 0 → 100644 +18 −0 Original line number Diff line number Diff line ## Using docker-compose to config startup environment before we use docker compose, please install docker first : https://docs.docker.com/compose/install/ #### sharding-jdbc 1. access the docker folder (cd docker/sharding-jdbc/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access mysql / etcd / zookeeper as you want 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down #### sharding-proxy 1. access the docker folder (cd docker/sharding-proxy/sharding) 2. launch the environment by docker compose (docker-compose up -d) 3. access proxy by `mysql -h127.0.0.1 -P13308 -proot -uroot` 4. if there is conflict on port, just modify the mapper port in docker-compose.yml and then launch docker compose again(docker-compose up -d) 5. if you want to stop these environment, use command docker-compose down to clean the docker container , you could use docker rm `docker ps -a -q` (be careful)