tidbスタンドアロン版インストール導入

3663 ワード

サーバ構成:
vm  ubuntu 16.04

導入のインストール
TIdbスタンドアロンテスト環境インストール
centos7:

wget https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm 
yum install -y mysql57-community-release-el7-11.noarch.rpm 
yum install -y mysql-community-client.x86_64 


ubuntu16.04:

apt-get install mysql-client mysql-server

インストールtidbのダウンロード
wget http://download.pingcap.org/tidb-latest-linux-amd64.tar.gz
mkdir -p /data/pd
mkdir -p /data/tikv
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=/data/pd --log-file=pd.log &
./bin/tikv-server --pd="127.0.0.1:2379" --data-dir=/data/tikv --log-file=tikv.log &
./bin/tidb-server --store=tikv --path="127.0.0.1:2379" --log-file=tidb.log &

サービスポートの表示
   root@ubuntu:/data# netstat -lntp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      88086/mysqld    
    tcp        0      0 127.0.0.1:2379          0.0.0.0:*               LISTEN      100294/pd-server
    tcp        0      0 127.0.0.1:2380          0.0.0.0:*               LISTEN      100294/pd-server
    tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      839/sshd        
    tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      100193/0        
    tcp        0      0 127.0.0.1:6011          0.0.0.0:*               LISTEN      100355/1        
    tcp6       0      0 :::8080                 :::*                    LISTEN      38175/java      
    tcp6       0      0 :::22                   :::*                    LISTEN      839/sshd        
    tcp6       0      0 ::1:6010                :::*                    LISTEN      100193/0        
    tcp6       0      0 ::1:6011                :::*                    LISTEN      100355/1        
    tcp6       0      0 :::10080                :::*                    LISTEN      100510/tidb-server
    tcp6       0      0 :::4000                 :::*                    LISTEN      100510/tidb-server
    tcp6       0      0 127.0.0.1:20160         :::*                    LISTEN      100386/tikv-server
    tcp6       0      0 127.0.0.1:20160         :::*                    LISTEN      100386/tikv-server
    tcp6       0      0 127.0.0.1:20160         :::*                    LISTEN      100386/tikv-server
    tcp6       0      0 127.0.0.1:20160         :::*                    LISTEN      100386/tikv-server

次の操作を行います.
 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;

Webブラウズ
http://ip:10080