Skip to content

Commit

Permalink
Update readme and add import data topics (matrixorigin#4719)
Browse files Browse the repository at this point in the history
Approved by: @dengn
  • Loading branch information
lacrimosaprinz authored Aug 26, 2022
1 parent 0724046 commit 102f8ef
Show file tree
Hide file tree
Showing 32 changed files with 1,367 additions and 512 deletions.
62 changes: 37 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,50 +152,62 @@ For more details, you can checkout [MatrixOne Architecture](https://docs.matrixo

## ⚡️ <a id="quick-start">Quick start</a>


### ⚙️ Install MatrixOne
MatrixOne supports Linux and MacOS. You can install MatrixOne either by [building from source](#building-from-source) or [using docker](#using-docker).
For other installation types, please refer to [MatrixOne installation](https://docs.matrixorigin.io/0.5.1/MatrixOne/Get-Started/install-standalone-matrixone/) for more details.
#### **Building from source**

1. Install Go (version 1.19 is required).
**Step 1. Install Go (version 1.19 is required).**

**Step 2. Get the MatrixOne code to build MatrixOne**

2. Get the MatrixOne code: Depending on your needs, choose whether you want to keep your code up to date, or if you want to get the latest stable version of the code.
Depending on your needs, choose whether you want to keep your code up to date, or if you want to get the latest stable version of the code.

- *Option 1*: Get the MatrixOne(Preview Version) code
- *Option 1*: Get the MatrixOne(Preview Version) code, build MatrixOne

The **main** branch is the default branch, the code on the main branch is always up-to-date but not stable enough.

```
$ git clone https://github.com/matrixorigin/matrixone.git
$ cd matrixone
```
1. Get the MatrixOne(Preview Version) code:

- *Option 2*: Get the MatrixOne(Stable Version) code
```
git clone https://github.com/matrixorigin/matrixone.git
cd matrixone
```
If you want to get the latest stable version code released by MatrixOne, please switch to the branch of version **0.5.1** first.
2. You can run `make debug`, `make clean`, or anything else our Makefile offers.
```
$ git clone https://github.com/matrixorigin/matrixone.git
$ git checkout 0.5.1
$ cd matrixone
```
```
make build
```
3. Run make:
3. Launch MatrixOne server:
You can run `make debug`, `make clean`, or anything else our Makefile offers.
```
./mo-service -cfg ./etc/cn-standalone-test.toml
```
```
$ make config
$ make build
```
- *Option 2*: Get the MatrixOne(Stable Version) code, build MatrixOne
4. Boot MatrixOne server:
1. If you want to get the latest stable version code released by MatrixOne, please switch to the branch of version **0.5.1** first.
```
$ ./mo-server system_vars_config.toml
```
```
git clone https://github.com/matrixorigin/matrixone.git
git checkout 0.5.1
cd matrixone
```
2. You can run `make debug`, `make clean`, or anything else our Makefile offers.
```
make config
make build
```
3. Launch MatrixOne server:
```
./mo-server system_vars_config.toml
```
#### **Using docker**
1. Make sure Docker is installed, verify Docker daemon is running in the background:
Expand Down
58 changes: 34 additions & 24 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,45 +151,55 @@ MatrixOne目前支持Linux及MacOS系统,您可以通过源码安装或者dock

**步骤 1.** 搭建Go语言环境(至少需要1.19版本)。

**步骤 2.** 获取MatrixOne源码
**步骤 2.** 获取MatrixOne源码,搭建MatrixOne

根据您的需要,选择您所获取的代码永远保持最新,还是获得稳定版本的代码。

- *选项 1*:获取 MatrixOne(预览版本) 代码
- *选项 1*:获取 MatrixOne(预览版本) 代码,搭建MatrixOne

**main** 分支是默认分支,主分支上的代码总是最新的,但不够稳定。

获取 MatrixOne(预览版本) 代码方法如下:
1. 获取 MatrixOne(预览版本) 代码方法如下:

```
$ git clone https://github.com/matrixorigin/matrixone.git
$ cd matrixone
```
```shell
git clone https://github.com/matrixorigin/matrixone.git
cd matrixone
```

- *选项 2*:获取 MatrixOne(稳定版本) 代码
2. 运行编译文件:你可以运行`make debug``make clean`或者其他任何`Makefile`支持的命令。

如果您想获得 MatrixOne 发布的最新稳定版本代码,请先从 **main** 切换选择至 **0.5.1** 版本分支。
```
make build
```

```
$ git clone https://github.com/matrixorigin/matrixone.git
$ git checkout 0.5.1
$ cd matrixone
```
3. 启动 MatrixOne 服务:

**3.** 运行编译文件
```
./mo-service -cfg ./etc/cn-standalone-test.toml
```

你可以运行`make debug``make clean`或者其他任何Makefile命令。
- *选项 2*:获取 MatrixOne(稳定版本) 代码,搭建MatrixOne

```
$ make config
$ make build
```
1. 如果您想获得 MatrixOne 发布的最新稳定版本代码,请先从 **main** 切换选择至 **0.5.1** 版本分支。

**4.** 启动MatrixOne服务
```
git clone https://github.com/matrixorigin/matrixone.git
git checkout 0.5.1
cd matrixone
```

```
$ ./mo-server system_vars_config.toml
```
2. 运行编译文件:你可以运行`make debug``make clean`或者其他任何`Makefile`支持的命令。

```
make config
make build
```

3. 启动 MatrixOne 服务:

```
./mo-server system_vars_config.toml
```

#### 使用docker

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,22 +556,20 @@ MatrixOne 不区分运算符和函数。
## **编译并运行 MatrixOne**

本章节讲述编译并运行 MatrixOne 来查看函数的行为。
Once the aggregation function is ready, we can compile and run MatrixOne to see the function behavior.

### 步骤 1:运行 `make config``make build` 来编译 MatrixOne 并构建二进制文件

```
make config
make build
```

!!! info
`make config` 运行完成将生成一个新的配置文件。在本教程中,你只需要运行一次。如果你修改了一些代码并想重新编译,你只需要运行 `make build`

### 步骤 2:运行 `./mo-server system_vars_config.toml` 启动 MatrixOne,MatrixOne 服务将开始监听客户端连接
### 步骤 2:运行 `./mo-service -cfg ./etc/cn-standalone-test.toml` 启动 MatrixOne,MatrixOne 服务将开始监听客户端连接

```
./mo-server system_vars_config.toml
./mo-service -cfg ./etc/cn-standalone-test.toml
```

!!! info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,17 +378,16 @@ Once the aggregation function is ready, we can compile and run MatrixOne to see
### 步骤 1:运行 `make config``make build` 来编译 MatrixOne 并构建二进制文件

```
make config
make build
```

!!! info
`make config` 运行完成将生成一个新的配置文件。在本教程中,你只需要运行一次。如果你修改了一些代码并想重新编译,你只需要运行 `make build`

### 步骤 2:运行 `./mo-server system_vars_config.toml` 启动 MatrixOne,MatrixOne 服务将开始监听客户端连接
### 步骤 2:运行 `./mo-service -cfg ./etc/cn-standalone-test.toml` 启动 MatrixOne,MatrixOne 服务将开始监听客户端连接

```
./mo-server system_vars_config.toml
./mo-service -cfg ./etc/cn-standalone-test.toml
```

!!! info
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# 客户端连接 MatrixOne 服务

MatrixOne 现在支持通过以下几种客户端的方式连接 MatrixOne 服务:

- MySQL Client
- Navicat

## 前期准备

已完成[安装并启动 MatrixOne](../../Get-Started/install-standalone-matrixone.md)

## 通过 MySQL Client 连接 MatrixOne 服务

1. 下载安装 [MySQL Client](https://dev.mysql.com/downloads/installer/)

2. 下载完成后,你可以使用 MySQL 命令行客户端来连接 MatrixOne 服务。

```
mysql -h IP -P PORT -uUsername -p
```
连接符的格式与MySQL格式相同,你需要提供用户名和密码。
此处以内置帐号作为示例:
- user: dump
- password: 111
```
mysql -h 127.0.0.1 -P 6001 -udump -p
Enter password:
```
3. 连接成功提示如下:
```
Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1031
Server version: 0.5.0 MatrixOne
Copyright (c) 2000, 2022, Oracle and/or its affiliates.
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.
```
更多关于安装部署的问题,参见[部署常见问题](../../FAQs/deployment-faqs.md)。
## 通过 Navicat 连接 MatrixOne 服务
1. 下载安装 [Navicat](https://www.navicat.com/en/products)。
2. 安装 Navicat 完成后,打开 Navicat,点击左上角 **Connection > MySQL**, 在弹窗中填入如下参数:
- **Connction Name**: MatrixOne
- **Host**: 127.0.0.1
- **Port**: 6001
- **User Name**: dump
- **Password**: 111
- **Save password**:勾选
3. 点击 **Save** 保存设置。
4. 双击左侧数据库目录中的 **MatrixOne**,图标点亮,连接成功。
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 编程语言连接 MatrixOne 服务

MatrixOne 现在支持通过以下几种编程语言的方式连接 MatrixOne 服务:

- Java
- Python

## 前期准备

已完成[安装并启动 MatrixOne](../../Get-Started/install-standalone-matrixone.md)

## Java 语言的 JDBC 连接器连接 MatrixOne 服务

1. 下载安装 [Java 语言 JDBC 连接器](https://dev.mysql.com/downloads/connector/j/)

2. 在应用程序中调用 `com.mysql.cj.jdbc.Driver` 驱动包即可。

!!! info
关于通过 Java 语言的 JDBC 连接器连接 MatrixOne 服务的示例,参见[用 JDBC 连接器连接 MatrixOne 服务](../../Tutorial/develop-java-connect-mo.md)

## Python 语言的 pymysql 工具连接 MatrixOne 服务

1. 下载安装 pymysql 工具:

```
pip3 install pymysql
```
2. 在应用程序中调用 `import pymysql` 即可,具体使用方式请参考 `pymysql` 官方文档:<https://pypi.org/project/PyMySQL/>。
!!! info
关于通过 Python 语言的 pymysql 工具连接 MatrixOne 服务的示例,参见[用 MatrixOne 构建一个简单的股票分析 Python 应用程序](../../Tutorial/develop-python-application.md)。
<!--执行py脚本,1. python 脚本。或者是编程环境下,或者是终端,执行python脚本;2. 相应的数据库建表 3. python脚本完成对数据库的执行(操作) python3+python文件名称完成对数据库的操作-->
Loading

0 comments on commit 102f8ef

Please sign in to comment.