Skip to main content

Add A WeScale Container to the Docker Network

Start WeScale​

Start The WeScale Container​

Once the WeSQL-Server is running, you can start the WeScale container. The WeScale container will connect to the WeSQL-Server and provide the WeScale service.

docker run -itd \
--name wescale \
--network wesql-network \
-w /vt/examples/wesql-server \
-e MYSQL_ROOT_USER=root \
-e MYSQL_ROOT_PASSWORD=passwd \
-e MYSQL_PORT=3306 \
-e MYSQL_HOST=wesql-server-0 \
-p 15306:15306 \
apecloud/apecloud-mysql-scale:0.3.8 \
/vt/examples/wesql-server/init_single_node_cluster.sh

It may take a few seconds for the WeScale container to start. You can check the logs to see if the WeScale container has started successfully.

docker logs wescale

Connecting to WeScale​

You can connect to WeScale using a MySQL client or driver from any environment that can access the SQL listening port.

docker run -it --network wesql-network --rm mysql mysql -hwescale -P15306 -uroot -ppasswd

Run Sysbench​

Run Sysbench Against WeScale​

docker run --network wesql-network --rm \
apecloud/customsuites:latest \
sysbench \
--db-driver=mysql \
--report-interval=2 \
--tables=4 \
--table-size=250000 \
--threads=8 \
--time=300 \
--mysql-host=wescale \
--mysql-port=15306 \
--mysql-user=sbtest \
--mysql-password=password \
--skip-trx=on \
--mysql-ignore-errors=1062 \
/usr/share/sysbench/oltp_write_only.lua \
run