准备工作:
按照上一篇文章《TiUP在线布署TIDB分布式数据库集群》将基础环境配置好。
扩容步骤:
编辑扩容配置文件scale-out.yaml,本次扩容涉及2台pd_server,1台tidb_server,1台tikv_server。
tidb_servers:
- host: 172.16.254.103
tikv_servers:
- host: 172.16.254.104
pd_servers:
- host: 172.16.254.101
- host: 172.16.254.102
执行扩容命令
tiup cluster scale-out hdcluster scale-out.yaml --user root -p
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.3.2/tiup-cluster scale-out hdcluster scale-out.yaml --user root -p
Please confirm your topology:
Cluster type: tidb
Cluster name: hdcluster
Cluster version: v4.0.8
Type Host Ports OS/Arch Directories
---- ---- ----- ------- -----------
pd 172.16.254.101 2379/2380 linux/x86_64 /tidb/tidb-deploy/pd-2379,/tidb/tidb-data/pd-2379
pd 172.16.254.102 2379/2380 linux/x86_64 /tidb/tidb-deploy/pd-2379,/tidb/tidb-data/pd-2379
tikv 172.16.254.104 20160/20180 linux/x86_64 /tidb/tidb-deploy/tikv-20160,/tidb/tidb-data/tikv-20160
tidb 172.16.254.103 4000/10080 linux/x86_64 /tidb/tidb-deploy/tidb-4000
Attention:
1. If the topology is not what you expected, check your yaml file.
2. Please confirm there is no port/directory conflicts in same host.
Do you want to continue? [y/N]: y
Input SSH password:
+ [ Serial ] - SSHKeySet: privateKey=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/ssh/id_rsa, publicKey=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/ssh/id_rsa.pub
- Download pd:v4.0.8 (linux/amd64) ... Done
+ [ Serial ] - RootSSH: user=root, host=172.16.254.103, port=22
+ [ Serial ] - RootSSH: user=root, host=172.16.254.102, port=22
+ [ Serial ] - RootSSH: user=root, host=172.16.254.104, port=22
+ [ Serial ] - EnvInit: user=tidb, host=172.16.254.102
+ [ Serial ] - EnvInit: user=tidb, host=172.16.254.104
+ [ Serial ] - RootSSH: user=root, host=172.16.254.101, port=22
+ [ Serial ] - EnvInit: user=tidb, host=172.16.254.101
+ [ Serial ] - EnvInit: user=tidb, host=172.16.254.103
+ [ Serial ] - Mkdir: host=172.16.254.102, directories='/tidb/tidb-deploy','/tidb/tidb-data'
+ [ Serial ] - Mkdir: host=172.16.254.104, directories='/tidb/tidb-deploy','/tidb/tidb-data'
+ [ Serial ] - Mkdir: host=172.16.254.101, directories='/tidb/tidb-deploy','/tidb/tidb-data'
+ [ Serial ] - Mkdir: host=172.16.254.103, directories='/tidb/tidb-deploy','/tidb/tidb-data'
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.91
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.100
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.92
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.95
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.93
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.96
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.97
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.91
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.91
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.94
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.91
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.98
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.99
+ [ Serial ] - UserSSH: user=tidb, host=172.16.254.104
+ [ Serial ] - Mkdir: host=172.16.254.104, directories='/tidb/tidb-deploy/tikv-20160','/tidb/tidb-deploy/tikv-20160/log','/tidb/tidb-deploy/tikv-20160/bin','/tidb/tidb-deploy/tikv-20160/conf','/tidb/tidb-deploy/tikv-20160/scripts'
+ [ Serial ] - UserSSH: user=tidb, host=172.16.254.103
+ [ Serial ] - Mkdir: host=172.16.254.103, directories='/tidb/tidb-deploy/tidb-4000','/tidb/tidb-deploy/tidb-4000/log','/tidb/tidb-deploy/tidb-4000/bin','/tidb/tidb-deploy/tidb-4000/conf','/tidb/tidb-deploy/tidb-4000/scripts'
+ [ Serial ] - UserSSH: user=tidb, host=172.16.254.101
+ [ Serial ] - Mkdir: host=172.16.254.101, directories='/tidb/tidb-deploy/pd-2379','/tidb/tidb-deploy/pd-2379/log','/tidb/tidb-deploy/pd-2379/bin','/tidb/tidb-deploy/pd-2379/conf','/tidb/tidb-deploy/pd-2379/scripts'
+ [ Serial ] - UserSSH: user=tidb, host=172.16.254.102
+ [ Serial ] - Mkdir: host=172.16.254.102, directories='/tidb/tidb-deploy/pd-2379','/tidb/tidb-deploy/pd-2379/log','/tidb/tidb-deploy/pd-2379/bin','/tidb/tidb-deploy/pd-2379/conf','/tidb/tidb-deploy
- Copy node_exporter -> 172.16.254.101 ... ⠧ Mkdir: host=172.16.254.101, directories='/tidb/ti...
+ [ Serial ] - Mkdir: host=172.16.254.103, directories=''
+ [ Serial ] - CopyComponent: component=tidb, version=v4.0.8, remote=172.16.254.103:/tidb/tidb-depl
- Copy blackbox_exporter -> 172.16.254.104 ... ⠋ Mkdir: host=172.16.254.104, directories='/tid...
- Copy node_exporter -> 172.16.254.101 ... ⠋ Mkdir: host=172.16.254.101, directories='/tidb/ti...
- Copy blackbox_exporter -> 172.16.254.104 ... ⠸ Mkdir: host=172.16.254.104, directories='/tid...
- Copy blackbox_exporter -> 172.16.254.104 ... ⠼ CopyComponent: component=blackbox_exporter, v...
+ [ Serial ] - CopyComponent: component=tikv, version=v4.0.8, remote=172.16.254.104:/tidb/tidb-depl
- Copy blackbox_exporter -> 172.16.254.104 ... ⠴ CopyComponent: component=blackbox_exporter, v...
+ [ Serial ] - CopyComponent: component=pd, version=v4.0.8, remote=172.16.254.102:/tidb/tidb-deploy
- Copy node_exporter -> 172.16.254.103 ... ⠦ CopyComponent: component=node_exporter, version=v...
+ [ Serial ] - CopyComponent: component=pd, version=v4.0.8, remote=172.16.254.101:/tidb/tidb-deploy
- Copy blackbox_exporter -> 172.16.254.102 ... ⠇ MonitoredConfig: cluster=hdcluster, user=tidb...
+ [ Serial ] - ScaleConfig: cluster=hdcluster, user=tidb, host=172.16.254.103, service=tidb-4000.service, deploy_dir=/tidb/tidb-deploy/tidb-4000, data_dir=[], log_dir=/tidb/tidb-deploy/tidb-4000/log
- Copy node_exporter -> 172.16.254.104 ... Done
+ [ Serial ] - ScaleConfig: cluster=hdcluster, user=tidb, host=172.16.254.102, service=pd-2379.service, deploy_dir=/tidb/tidb-deploy/pd-2379, data_dir=[/tidb/tidb-data/pd-2379], log_dir=/tidb/tidb-deploy/pd-2379/log, cache_dir=
+ [ Serial ] - ScaleConfig: cluster=hdcluster, user=tidb, host=172.16.254.101, service=pd-2379.service, deploy_dir=/tidb/tidb-deploy/pd-2379, data_dir=[/tidb/tidb-data/pd-2379], log_dir=/tidb/tidb-deploy/pd-2379/log, cache_dir=
script path: /home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/run_pd_172.16.254.101_2379.sh
script path: /templates/scripts/run_pd_scale.sh.tpl
script path: /home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/run_pd_172.16.254.102_2379.sh
script path: /templates/scripts/run_pd_scale.sh.tpl
+ [ Serial ] - ScaleConfig: cluster=hdcluster, user=tidb, host=172.16.254.104, service=tikv-20160.service, deploy_dir=/tidb/tidb-deploy/tikv-20160, data_dir=[/tidb/tidb-data/tikv-20160], log_dir=/tidb/tidb-deploy/tikv-20160/log, cache_dir=
+ Check status
Enabling component pd
Enabling instance pd 172.16.254.102:2379
Enabling instance pd 172.16.254.101:2379
Enable pd 172.16.254.102:2379 success
Enable pd 172.16.254.101:2379 success
Enabling component node_exporter
Enabling component blackbox_exporter
Enabling component node_exporter
Enabling component blackbox_exporter
Enabling component tikv
Enabling instance tikv 172.16.254.104:20160
Enable tikv 172.16.254.104:20160 success
Enabling component node_exporter
Enabling component blackbox_exporter
Enabling component tidb
Enabling instance tidb 172.16.254.103:4000
Enable tidb 172.16.254.103:4000 success
Enabling component node_exporter
Enabling component blackbox_exporter
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.103
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.101
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.102
+ [Parallel] - UserSSH: user=tidb, host=172.16.254.104
+ [ Serial ] - Save meta
+ [ Serial ] - StartCluster
Starting component pd
Starting instance pd 172.16.254.102:2379
Starting instance pd 172.16.254.101:2379
Start pd 172.16.254.101:2379 success
Start pd 172.16.254.102:2379 success
Starting component node_exporter
Starting instance 172.16.254.101
Start 172.16.254.101 success
Starting component blackbox_exporter
Starting instance 172.16.254.101
Start 172.16.254.101 success
Starting component node_exporter
Starting instance 172.16.254.102
Start 172.16.254.102 success
Starting component blackbox_exporter
Starting instance 172.16.254.102
Start 172.16.254.102 success
Starting component tikv
Starting instance tikv 172.16.254.104:20160
Start tikv 172.16.254.104:20160 success
Starting component node_exporter
Starting instance 172.16.254.104
Start 172.16.254.104 success
Starting component blackbox_exporter
Starting instance 172.16.254.104
Start 172.16.254.104 success
Starting component tidb
Starting instance tidb 172.16.254.103:4000
Start tidb 172.16.254.103:4000 success
Starting component node_exporter
Starting instance 172.16.254.103
Start 172.16.254.103 success
Starting component blackbox_exporter
Starting instance 172.16.254.103
Start 172.16.254.103 success
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.91, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/alertmanager-9093.service, deploy_dir=/tidb/tidb-deploy/alertmanager-9093, data_dir=[/tidb/tidb-data/alertmanager-9093], log_dir=/tidb/tidb-deploy/alertmanager-9093/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.99, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tikv-20160.service, deploy_dir=/tidb/tidb-deploy/tikv-20160, data_dir=[/tidb/tidb-data/tikv-20160], log_dir=/tidb/tidb-deploy/tikv-20160/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.100, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tikv-20160.service, deploy_dir=/tidb/tidb-deploy/tikv-20160, data_dir=[/tidb/tidb-data/tikv-20160], log_dir=/tidb/tidb-deploy/tikv-20160/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.92, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/pd-2379.service, deploy_dir=/tidb/tidb-deploy/pd-2379, data_dir=[/tidb/tidb-data/pd-2379], log_dir=/tidb/tidb-deploy/pd-2379/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.104, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tikv-20160.service, deploy_dir=/tidb/tidb-deploy/tikv-20160, data_dir=[/tidb/tidb-data/tikv-20160], log_dir=/tidb/tidb-deploy/tikv-20160/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.93, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/pd-2379.service, deploy_dir=/tidb/tidb-deploy/pd-2379, data_dir=[/tidb/tidb-data/pd-2379], log_dir=/tidb/tidb-deploy/pd-2379/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.95, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tidb-4000.service, deploy_dir=/tidb/tidb-deploy/tidb-4000, data_dir=[], log_dir=/tidb/tidb-deploy/tidb-4000/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.94, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/pd-2379.service, deploy_dir=/tidb/tidb-deploy/pd-2379, data_dir=[/tidb/tidb-data/pd-2379], log_dir=/tidb/tidb-deploy/pd-2379/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.96, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tidb-4000.service, deploy_dir=/tidb/tidb-deploy/tidb-4000, data_dir=[], log_dir=/tidb/tidb-deploy/tidb-4000/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.97, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tidb-4000.service, deploy_dir=/tidb/tidb-deploy/tidb-4000, data_dir=[], log_dir=/tidb/tidb-deploy/tidb-4000/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.101, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/pd-2379.service, deploy_dir=/tidb/tidb-deploy/pd-2379, data_dir=[/tidb/tidb-data/pd-2379], log_dir=/tidb/tidb-deploy/pd-2379/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.103, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tidb-4000.service, deploy_dir=/tidb/tidb-deploy/tidb-4000, data_dir=[], log_dir=/tidb/tidb-deploy/tidb-4000/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.102, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/pd-2379.service, deploy_dir=/tidb/tidb-deploy/pd-2379, data_dir=[/tidb/tidb-data/pd-2379], log_dir=/tidb/tidb-deploy/pd-2379/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.91, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tiflash-9000.service, deploy_dir=/tidb/tidb-deploy/tiflash-9000, data_dir=[/tidb/tidb-data/tiflash-9000], log_dir=/tidb/tidb-deploy/tiflash-9000/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.91, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/prometheus-9090.service, deploy_dir=/tidb/tidb-deploy/prometheus-9090, data_dir=[/tidb/tidb-data/prometheus-9090], log_dir=/tidb/tidb-deploy/prometheus-9090/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.98, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/tikv-20160.service, deploy_dir=/tidb/tidb-deploy/tikv-20160, data_dir=[/tidb/tidb-data/tikv-20160], log_dir=/tidb/tidb-deploy/tikv-20160/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - InitConfig: cluster=hdcluster, user=tidb, host=172.16.254.91, path=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache/grafana-3000.service, deploy_dir=/tidb/tidb-deploy/grafana-3000, data_dir=[], log_dir=/tidb/tidb-deploy/grafana-3000/log, cache_dir=/home/tidb/.tiup/storage/cluster/clusters/hdcluster/config-cache
+ [ Serial ] - SystemCtl: host=172.16.254.91 action=reload prometheus-9090.service
+ [ Serial ] - UpdateTopology: cluster=hdcluster
Scaled cluster `hdcluster` out successfully
扩容验证:
查看集群信息:
tiup cluster list
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.3.2/tiup-cluster list
Name User Version Path PrivateKey
---- ---- ------- ---- ----------
hdcluster tidb v4.0.8 /home/tidb/.tiup/storage/cluster/clusters/hdcluster /home/tidb/.tiup/storage/cluster/clusters/hdcluster/ssh/id_rsa
查看节点信息:
tiup cluster display hdcluster
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.3.2/tiup-cluster display hdcluster
Cluster type: tidb
Cluster name: hdcluster
Cluster version: v4.0.8
SSH type: builtin
Dashboard URL:
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir
-- ---- ---- ----- ------- ------ -------- ----------
172.16.254.91:9093 alertmanager 172.16.254.91 9093/9094 linux/x86_64 Up /tidb/tidb-data/alertmanager-9093 /tidb/tidb-deploy/alertmanager-9093
172.16.254.91:3000 grafana 172.16.254.91 3000 linux/x86_64 Up - /tidb/tidb-deploy/grafana-3000
172.16.254.101:2379 pd 172.16.254.101 2379/2380 linux/x86_64 Up /tidb/tidb-data/pd-2379 /tidb/tidb-deploy/pd-2379
172.16.254.102:2379 pd 172.16.254.102 2379/2380 linux/x86_64 Up /tidb/tidb-data/pd-2379 /tidb/tidb-deploy/pd-2379
172.16.254.92:2379 pd 172.16.254.92 2379/2380 linux/x86_64 Up|L /tidb/tidb-data/pd-2379 /tidb/tidb-deploy/pd-2379
172.16.254.93:2379 pd 172.16.254.93 2379/2380 linux/x86_64 Up|UI /tidb/tidb-data/pd-2379 /tidb/tidb-deploy/pd-2379
172.16.254.94:2379 pd 172.16.254.94 2379/2380 linux/x86_64 Up /tidb/tidb-data/pd-2379 /tidb/tidb-deploy/pd-2379
172.16.254.91:9090 prometheus 172.16.254.91 9090 linux/x86_64 Up /tidb/tidb-data/prometheus-9090 /tidb/tidb-deploy/prometheus-9090
172.16.254.103:4000 tidb 172.16.254.103 4000/10080 linux/x86_64 Up - /tidb/tidb-deploy/tidb-4000
172.16.254.95:4000 tidb 172.16.254.95 4000/10080 linux/x86_64 Up - /tidb/tidb-deploy/tidb-4000
172.16.254.96:4000 tidb 172.16.254.96 4000/10080 linux/x86_64 Up - /tidb/tidb-deploy/tidb-4000
172.16.254.97:4000 tidb 172.16.254.97 4000/10080 linux/x86_64 Up - /tidb/tidb-deploy/tidb-4000
172.16.254.91:9000 tiflash 172.16.254.91 9000/8123/3930/20170/20292/8234 linux/x86_64 Up /tidb/tidb-data/tiflash-9000 /tidb/tidb-deploy/tiflash-9000
172.16.254.100:20160 tikv 172.16.254.100 20160/20180 linux/x86_64 Up /tidb/tidb-data/tikv-20160 /tidb/tidb-deploy/tikv-20160
172.16.254.104:20160 tikv 172.16.254.104 20160/20180 linux/x86_64 Up /tidb/tidb-data/tikv-20160 /tidb/tidb-deploy/tikv-20160
172.16.254.98:20160 tikv 172.16.254.98 20160/20180 linux/x86_64 Up /tidb/tidb-data/tikv-20160 /tidb/tidb-deploy/tikv-20160
172.16.254.99:20160 tikv 172.16.254.99 20160/20180 linux/x86_64 Up /tidb/tidb-data/tikv-20160 /tidb/tidb-deploy/tikv-20160
Total nodes: 17
可以看到增加了4个节点: 2台pd_server,1台tidb_server,1台tikv_server。
从172.16.254.103登录,并查看上次插入的数据:
mysql -uroot -h 172.16.254.103 -P4000
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.25-TiDB-v4.0.8 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| INFORMATION_SCHEMA |
| METRICS_SCHEMA |
| PERFORMANCE_SCHEMA |
| handong |
| mysql |
| test |
+--------------------+
6 rows in set (0.01 sec)
mysql> use handong;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+-------------------+
| Tables_in_handong |
+-------------------+
| t1 |
+-------------------+
1 row in set (0.00 sec)
mysql> select * from t1;
+------+---------+
| id | name |
+------+---------+
| 1 | handong |
+------+---------+
1 row in set (0.01 sec)
到此,扩容完成。