docker部署OceanBase
第一步 ob docker鏡像下載
下載鏡像
docker pull obpilot/oceanbase-ce:latest
第二步 容器創(chuàng)建
新容器創(chuàng)建
docker run -itd -m 10G -p 2881:2881 -p 2883:2883 –name oceanbase-ce obpilot/oceanbase-ce:latest
進(jìn)入容器
[root@jeames ~]# docker exec -it oceanbase-ce bash
進(jìn)入容器后,可以看看 readme.md 文檔
第三步 查看集群及啟動(dòng)
啟動(dòng)集群
[admin@3ef732cfb95a ~]$ obd cluster list 配置文件:/home/admin/.obd/cluster/obdemo/config.yaml
啟動(dòng)集群
[admin@3ef732cfb95a ~]$ obd cluster start obdemo
第四步 ob數(shù)據(jù)庫(kù)登錄,租戶創(chuàng)建
admin 用戶的密碼是 : adminPWD123 [admin@3ef732cfb95a ~]$ obclient -h127.1 -uroot@sys#obce-single -P2883 -prootPWD123 -c -A oceanbase Welcome to the OceanBase. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.6.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05) Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [oceanbase]> show databases; +--------------------+ | Database | +--------------------+ | oceanbase | | information_schema | | mysql | | SYS | | LBACSYS | | ORAAUDITOR | | test | +--------------------+ 7 rows in set (0.014 sec)
創(chuàng)建資源單元、資源池、租戶
MySQL [oceanbase]> CREATE resource unit S4C1G max_cpu=4, min_cpu=4, max_memory='1G', min_memory='1G', max_iops=10000, min_iops=1000, max_session_num=1000000, max_disk_size='1024G'; MySQL [oceanbase]> CREATE resource pool my_pool unit = 'S4C1G', unit_num = 1; MySQL [oceanbase]> create tenant obmysql resource_pool_list=('my_pool'), primary_zone='RANDOM',comment 'mysql tenant/instance', charset='utf8' set ob_tcp_invited_nodes='%', ob_compatibility_mode='mysql';
第五步 obmysql tenant登錄,數(shù)據(jù)庫(kù)及表的創(chuàng)建
[admin@3ef732cfb95a ~]$ obclient -h 127.1 -uroot@obmysql#obce-single -P2883 -p -c -A test Enter password: Welcome to the OceanBase. Commands end with ; or \g. Your MySQL connection id is 7 Server version: 5.6.25 OceanBase 3.1.1 (r4-8c615943cbd25a6f7b8bdfd8677a13a21709a05e) (Built Oct 21 2021 10:52:05) Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MySQL [test]> show databases; +--------------------+ | Database | +--------------------+ | oceanbase | | information_schema | | mysql | | test | +--------------------+ 4 rows in set (0.005 sec) MySQL [test]> create database mesdb charset utf8mb4; Query OK, 1 row affected (0.118 sec) MySQL [test]> use mesdb Database changed MySQL [mesdb]> MySQL [mesdb]> MySQL [mesdb]> MySQL [mesdb]> source /tmp/mysql_employees.sql
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://www.ezyhdfw.cn/yun/127848.html
摘要:后端好書(shū)閱讀與推薦系列文章后端好書(shū)閱讀與推薦后端好書(shū)閱讀與推薦續(xù)后端好書(shū)閱讀與推薦續(xù)二后端好書(shū)閱讀與推薦續(xù)三后端好書(shū)閱讀與推薦續(xù)四這里依然記錄一下每本書(shū)的亮點(diǎn)與自己讀書(shū)心得和體會(huì),分享并求拍磚。 后端好書(shū)閱讀與推薦系列文章:后端好書(shū)閱讀與推薦后端好書(shū)閱讀與推薦(續(xù))后端好書(shū)閱讀與推薦(續(xù)二)后端好書(shū)閱讀與推薦(續(xù)三)后端好書(shū)閱讀與推薦(續(xù)四) 這里依然記錄一下每本書(shū)的亮點(diǎn)與自己讀書(shū)心得...
摘要:技術(shù)成就劃時(shí)代的分布式數(shù)據(jù)庫(kù)通過(guò)核心業(yè)務(wù)的不斷上線,螞蟻金服幫助渡過(guò)了自研基礎(chǔ)軟件產(chǎn)品最艱難的應(yīng)用關(guān)。年天貓雙十一,支付寶創(chuàng)造了萬(wàn)筆每秒支付峰值的業(yè)界新紀(jì)錄,這對(duì)于數(shù)據(jù)庫(kù)來(lái)說(shuō),意味著每秒需要同時(shí)運(yùn)行萬(wàn)條。 技術(shù)成就:劃時(shí)代的分布式數(shù)據(jù)庫(kù) 通過(guò)核心業(yè)務(wù)的不斷上線,螞蟻金服幫助OceanBase渡過(guò)了自研基礎(chǔ)軟件產(chǎn)品最艱難的應(yīng)用關(guān)。OceanBase不只是被研發(fā)出來(lái)的,更是被用出來(lái)的,是在...
閱讀 1359·2022-09-27 09:47
閱讀 1257·2022-09-27 09:28
閱讀 1739·2022-09-27 09:16
閱讀 940·2022-09-27 08:21
閱讀 1137·2022-09-27 08:08
閱讀 1291·2022-09-18 12:33
閱讀 1038·2022-09-16 08:01
閱讀 1097·2022-09-15 12:27