<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                [TOC] # 創建 OceanBase 示例數據庫 TPCC 默認情況 OceanBase 沒有創建示例數據庫 TPCC,需要手動創建。示例數據庫必須在業務租戶下創建。有關示例數據庫介紹請參考[關于示例數據庫 TPCC](https://open.oceanbase.com/docs/community/oceanbase-database/V3.1.0/about-the-sample-database-tpcc-2)。 租戶創建好后,需要創建相應的 DataBase 來存放示例數據庫的對象,還要分配相應的用戶和訪問權限。 ## 示例 1. 通過 obclient 連接 MySQL 租戶。 ~~~ #obclient -h192.168.1.101 -uroot@obmysql#obdemo -P2883 -pabcABC123 -A oceanbase obclient: [Warning] Using a password on the command line interface can be insecure. Welcome to the OceanBase monitor. Commands end with ; or \g. Your OceanBase connection id is 57981 Server version: 5.6.25 OceanBase 2.2.20 (…) (Built Aug 10 2019 15:27:33) <…省略…> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. ~~~ 2. 創建一個數據庫。 ~~~ obclient> create database tpccdb; Query OK, 1 row affected (0.02 sec) obclient> show databases; +--------------------+ | Database | +--------------------+ | oceanbase | | information_schema | | mysql | | test | | tpccdb | +--------------------+ 5 rows in set (0.01 sec) ~~~ 3. 創建一個用戶并賦權。 ~~~ obclient> grant all privileges on tpccdb.* to tpcc identified by '123456'; Query OK, 0 rows affected (0.02 sec) obclient> show grants for tpcc; +----------------------------------------------+ | Grants for tpcc@% | +----------------------------------------------+ | GRANT USAGE ON *.* TO 'tpcc' | | GRANT SELECT ON `oceanbase`.* TO 'tpcc' | | GRANT ALL PRIVILEGES ON `tpccdb`.* TO 'tpcc' | +----------------------------------------------+ 3 rows in set (0.01 sec) obclient> ~~~ 4. 創建數據庫對象 ~~~ obclient> use tpccdb; Database changed obclient> source create_mysql_tables.sql Query OK, 0 rows affected (0.01 sec) <…省略…> Query OK, 0 rows affected (0.01 sec) +------------------+ | Tables_in_tpccdb | +------------------+ | cust | | dist | | hist | | item | | load_hist | | load_proc | | nord | | ordl | | ordr | | stock_item | | stok | | ware | +------------------+ 12 rows in set (0.00 sec) ~~~ 5. 初始化表數據。 ~~~ obclient> source init_data.sql Query OK, 0 rows affected (0.01 sec) <…省略…> Query OK, 0 rows affected (0.01 sec) +------------+----------+ | table_name | rows_cnt | +------------+----------+ | WARE | 2 | | DIST | 20 | | NORD | 40 | | ORDR | 60 | | HIST | 240 | | ITEM | 622 | | ORDL | 626 | | CUST | 1040 | | STOK | 1244 | +------------+----------+ 9 rows in set (0.01 sec) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看