Skip to content

Commit

Permalink
add: book builder chapters output.
Browse files Browse the repository at this point in the history
  • Loading branch information
auula committed Jul 3, 2024
1 parent 4cc7106 commit a40e342
Show file tree
Hide file tree
Showing 22 changed files with 623 additions and 279 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.* linguist-language=Rust
*.* linguist-language=Rust
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
*.log
/target
docs
cobertura.xml
cobertura.xml
.vscode
83 changes: 83 additions & 0 deletions book/chapter1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
### /book/chapter_1.1.1.md

MySQL 8.x 中引入了许多新特性和改进,包括 JSONJavaScript 作为数据库查询语言,以及更好的性能和安全性。例如,在连接过程中出现的 `Public Key Retrieval is not allowed` 错误提示,这些都是新版本的特性。本文将记录在最新版本的 Ubuntu 中安装 MySQL 8.x 的完整过程。

---

### 安装和配置

在安装 MySQL 8.x 之前,可以先更新操作系统和软件包:

```sh
sudo apt update && apt upgrade -y
```

更新完成后,可以执行以下命令来查找和安装 MySQL 8.x 软件包:

```sh
sudo apt search mysql
sudo apt install mysql-*
```

安装完成后,使用 `sudo mysql_secure_installation` 初始化 root 用户的密码:

```sh
sudo mysql_secure_installation
```

如果需要允许远程用户访问 MySQL 服务器,可以修改配置文件 `/etc/mysql/mysql.conf.d/mysqld.cnf` 中的 `bind-address`,设置为 `0.0.0.0`:

```ini
bind-address = 0.0.0.0
mysqlx-bind-address = 127.0.0.1
```

然后可以为远程用户授予访问权限:

```sql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码' WITH GRANT OPTION;
```

---

### 解决安全连接问题

MySQL 8.x 中,如果出现 `Public Key Retrieval is not allowed` 错误提示,可以执行以下命令来解决:

```sql
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码';
```

执行后,刷新授权表:

```sql
flush privileges;
```

最后,请确保允许服务器上的 `3306` 端口连接。


## 列表示例

- 项目1
- 项目2
- 子项目1
- 子项目2

这是一个 [超链接测试](https://www.ibyte.me/) 对文本内容。

## 插入普通图片

![java](https://img.ibyte.me/470eor.jpg)

## 引用示例

> 这是一个引用示例,可以包含多行文本和**加粗**文字。

## 表格示例

| 姓名 | 年龄 | 城市 |
|--------|------|--------|
| Alice | 25 | 北京 |
| Bob | 30 | 上海 |
| Carol | 28 | 广州 |
83 changes: 83 additions & 0 deletions book/chapter2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
### /book/chapter_1.1.1.md

MySQL 8.x 中引入了许多新特性和改进,包括 JSONJavaScript 作为数据库查询语言,以及更好的性能和安全性。例如,在连接过程中出现的 `Public Key Retrieval is not allowed` 错误提示,这些都是新版本的特性。本文将记录在最新版本的 Ubuntu 中安装 MySQL 8.x 的完整过程。

---

### 安装和配置

在安装 MySQL 8.x 之前,可以先更新操作系统和软件包:

```sh
sudo apt update && apt upgrade -y
```

更新完成后,可以执行以下命令来查找和安装 MySQL 8.x 软件包:

```sh
sudo apt search mysql
sudo apt install mysql-*
```

安装完成后,使用 `sudo mysql_secure_installation` 初始化 root 用户的密码:

```sh
sudo mysql_secure_installation
```

如果需要允许远程用户访问 MySQL 服务器,可以修改配置文件 `/etc/mysql/mysql.conf.d/mysqld.cnf` 中的 `bind-address`,设置为 `0.0.0.0`:

```ini
bind-address = 0.0.0.0
mysqlx-bind-address = 127.0.0.1
```

然后可以为远程用户授予访问权限:

```sql
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码' WITH GRANT OPTION;
```

---

### 解决安全连接问题

MySQL 8.x 中,如果出现 `Public Key Retrieval is not allowed` 错误提示,可以执行以下命令来解决:

```sql
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '新密码';
```

执行后,刷新授权表:

```sql
flush privileges;
```

最后,请确保允许服务器上的 `3306` 端口连接。


## 列表示例

- 项目1
- 项目2
- 子项目1
- 子项目2

这是一个 [超链接测试](https://www.ibyte.me/) 对文本内容。

## 插入普通图片

![java](https://img.ibyte.me/470eor.jpg)

## 引用示例

> 这是一个引用示例,可以包含多行文本和**加粗**文字。

## 表格示例

| 姓名 | 年龄 | 城市 |
|--------|------|--------|
| Alice | 25 | 北京 |
| Bob | 30 | 上海 |
| Carol | 28 | 广州 |
32 changes: 18 additions & 14 deletions root.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# 书的根路径映射文件
# Book root path mapping file
root:
title: "Book Title"
index: "index.md"
chapters:
- title: "Chapter 1"
index: "/chapter1/chapter1.md"
- title: "Chapter 01 Title"
index: "chapter1.md"
# Sub chapters root
sub_chapters:
- title: "Section 1.1"
path: "book/chapter_1.1.0.md"
- title: "Section 1.2"
path: "book/chapter_1.1.1.md"
- title: "Chapter 2"
index: "/chapter2/chapter2.md"
- title: "Sub Chapter 1.1.0"
path: "chapter_1.1.1.md"
- title: "Sub Chapter 1.2.0"
path: "chapter_1.2.1.md"
# Sub chapters root
- title: "Chapter 01 Title"
index: "chapter2.md"
sub_chapters:
- title: "Section 2.1"
path: "book/chapter_1.1.0.md"
- title: "Section 2.2"
path: "book/chapter_1.1.1.md"
# Chapter content
- title: "Sub Chapter 2.1.0"
path: "chapter_2.1.1.md"
- title: "Sub Chapter 2.2.0"
path: "chapter_2.2.1.md"
- title: "Sub Chapter 2.3.0"
path: "chapter_2.3.1.md"
Loading

0 comments on commit a40e342

Please sign in to comment.