TiDB v6.3.0

[root@k8s-master ~]# vi /etc/ssh/sshd_config



[root@k8s-master ~]# curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 7085k  100 7085k    0     0  7375k      0 --:--:-- --:--:-- --:--:-- 7373k
WARN: adding root certificate via internet: https://tiup-mirrors.pingcap.com/root.json
You can revoke this by remove /root/.tiup/bin/7b8e153f2e2d0928.root.json
Successfully set mirror to https://tiup-mirrors.pingcap.com
Detected shell: bash
Shell profile:  /root/.bash_profile
/root/.bash_profile has been modified to add tiup to PATH
open a new terminal or source /root/.bash_profile to use it
Installed path: /root/.tiup/bin/tiup
===============================================
Have a try:     tiup playground
===============================================





[root@k8s-master ~]# 
[root@k8s-master ~]# source /root/.bash_profile
[root@k8s-master ~]# 




[root@k8s-master ~]# tiup playground
tiup is checking updates for component playground ...
A new version of playground is available:
   The latest version:         v1.11.0
   Local installed version:    
   Update current component:   tiup update playground
   Update all components:      tiup update --all

The component `playground` version  is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/playground-v1.11.0-linux-amd64.tar.gz 7.44 MiB / 7.44 MiB 100.00% 12.79 MiB/s                                                     
Starting component `playground`: /root/.tiup/components/playground/v1.11.0/tiup-playground
Using the version v6.3.0 for version constraint "".
		
If you'd like to use a TiDB version other than v6.3.0, cancel and retry with the following arguments:
	Specify version manually:   tiup playground <version>
	Specify version range:      tiup playground ^5
	The nightly version:        tiup playground nightly

Playground Bootstrapping...
Start pd instance:v6.3.0
The component `pd` version v6.3.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/pd-v6.3.0-linux-amd64.tar.gz 44.51 MiB / 44.51 MiB 100.00% 6.93 MiB/s                                                             
Start tikv instance:v6.3.0
The component `tikv` version v6.3.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/tikv-v6.3.0-linux-amd64.tar.gz 250.34 MiB / 250.34 MiB 100.00% 9.54 MiB/s                                                         
Start tidb instance:v6.3.0
The component `tidb` version v6.3.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/tidb-v6.3.0-linux-amd64.tar.gz 60.52 MiB / 60.52 MiB 100.00% 5.83 MiB/s                                                           
Waiting for tidb instances ready
127.0.0.1:4000 ... Done
The component `prometheus` version v6.3.0 is not installed; downloading from repository.
download https://tiup-mirrors.pingcap.com/prometheus-v6.3.0-linux-amd64.tar.gz 92.25 MiB / 92.25 MiB 100.00% 9.49 MiB/s                                                     
download https://tiup-mirrors.pingcap.com/grafana-v6.3.0-linux-amd64.tar.gz 50.09 MiB / 50.09 MiB 100.00% 9.87 MiB/s                                                        
Start tiflash instance:v6.3.0
TiFlash 127.0.0.1:3930 failed to start: error requesting http://127.0.0.1:2379/pd/api/v1/config/replicate, response: redirect to not leader
, code 500
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
To connect TiDB: mysql --comments --host 127.0.0.1 --port 4000 -u root -p (no password)
To view the dashboard: http://127.0.0.1:2379/dashboard
PD client endpoints: [127.0.0.1:2379]
To view the Prometheus: http://127.0.0.1:9090
To view the Grafana: http://127.0.0.1:3000

[root@k8s-master ~]# mysql --comments --host 127.0.0.1 --port 4000 -u root -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'root'@'127.0.0.1' (using password: YES)




[root@k8s-master ~]# mysql --host 127.0.0.1 --port 4000 -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 409
Server version: 5.7.25-TiDB-v6.3.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

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 |
| mysql              |
| test               |
+--------------------+
5 rows in set (0.04 sec)

mysql> 
mysql> CREATE USER 'admin'@'%' IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.10 sec)

mysql> select user,host  from mysql.user;
+-------+------+
| user  | host |
+-------+------+
| admin | %    |
| root  | %    |
+-------+------+
2 rows in set (0.00 sec)

mysql> 
mysql> 
mysql> select host, user, authentication_string from mysql.user;
+------+-------+-------------------------------------------+
| host | user  | authentication_string                     |
+------+-------+-------------------------------------------+
| %    | root  |                                           |
| %    | admin | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+------+-------+-------------------------------------------+
2 rows in set (0.01 sec)

mysql> 
mysql> update user set authentication_string=password('123456') where user='root';
ERROR 1046 (3D000): No database selected
mysql> 
mysql> use mysql
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> 
mysql> update user set authentication_string=password('123456') where user='root';
Query OK, 1 row affected, 1 warning (0.62 sec)
Rows matched: 1  Changed: 1  Warnings: 1

mysql> 
mysql> select host, user, authentication_string from mysql.user;
+------+-------+-------------------------------------------+
| host | user  | authentication_string                     |
+------+-------+-------------------------------------------+
| %    | root  | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
| %    | admin | *6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9 |
+------+-------+-------------------------------------------+
2 rows in set (0.00 sec)

mysql> 
mysql> 

TiDB  相当于 MySQL 换了一件衣服,哈哈,当然开源加工完,以后走自己的国产路线,至少比其他安全。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值