# 异步Mysql

建议先阅读官方文档[异步MySQL客户端](https://wiki.swoole.com/wiki/page/517.html)章节

> 注意:必须等待返回结果后才能执行下一条SQL

## 附录：mysql快速安装

下载源

```
wget -i http://dev.mysql.com/get/mysql57-community-release-el7-7.noarch.rpm
```

安装rpm源

```
rpm -ivh mysql57-community-release-el7-7.noarch.rpm
```

安装服务器

```
yum -y install mysql-community-server
```

启动数据库

```
systemctl  start  mysqld.service
```

获取随机密码

```
grep "password" /var/log/mysqld.log
```

登录mysql

修改密码

```
alter user 'root'@'localhost' identified by 'Root!!2019';
```

刷新权限

```
flush privileges
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xiaoxiami.gitbook.io/swoole/swoole-ji-chu/yi-bu-fei-du-sai-io/yi-bu-mysql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
