网站:https://pingcap.com/docs-cn/op-guide/binary-deployment/ 官方文档
- 下载:mysql57服务端
wget https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm
yum install -y mysql57-community-release-el7-11.noarch.rpm
- 下载:tidb-latest-linux-amd64
wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz
- 启动pd-server,tikv-server,tidb-server
mv tidb-latest-linux-amd64.tar.gz /usr/local/
cd /usr/local/
tar xf tidb-latest-linux-amd64.tar.gz
ln -s tidb-latest-linux-amd64 tidb
cd /usr/local/tidb
./bin/pd-server --data-dir=pd --log-file=pd.log &
./bin/tikv-server --pd="127.0.0.1:2379" --data-dir=tikv --log-file=tikv.log &
./bin/tidb-server --store=tikv --path="127.0.0.1:2379" --log-file=tidb.log &
- 下载:mysql57客户端
yum install -y mysql-community-client.x86_64
使用: mysql -h 127.0.0.1 -P 4000 -u root -D test
- 功能测试
grant all privileges on *.* to 'oracle'@'%' identified by 'oracle' with grant option;
flush privileges;
创建用户
CREATE USER 'ggs'@'%' IDENTIFIED BY 'oracle';
set password for ggs=password('oracle');
GRANT ALL PRIVILEGES ON *.* TO 'ggs'@'%' with grant option;
flush privileges;
grant all privileges on *.* to 'root'@'localhost' identified by 'oracle' with grant option;
grant all privileges on *.* to 'root'@'%' identified by 'oracle' with grant option;
grant all privileges on *.* to 'root'@'127.0.0.1' identified by 'oracle' with grant option;
flush privileges;
授权结束,安装完毕。