Commit 6cdbe9a6 authored by 王进波's avatar 王进波

update

parent c7e81a1f
......@@ -44,6 +44,7 @@
- [Calibre-web电子书网站的使用](doc/Calibre-web的使用.md)
- [ike-scan扫描服务端的ike加密算法](doc/ike-scan扫描服务端的ike加密算法.md)
- [用 LinqPad 进行快速开发](doc/LinqPad快速开发数据轮询持久化.md)
- [用Quartz.net开发定时调度]
......
......@@ -98,7 +98,7 @@ root@ubuntu:/# sudo du -hsx * | sort -rh | head -10
5.3M run
```
### mysql 主从复制状态查询
### MySQL 主从复制状态查询
Start the MySQL command-line utility on the slave server:
......@@ -114,3 +114,65 @@ Check the replication status using the show slave status command (the status of
mysql> SHOW SLAVE STATUS \G;
```
### MySQL 从服务启停
```shell
start slave;
stop slave;
```
### MySQL 8.0 caching_sha2_password认证
MySQL 从8.0 版本以后默认使用 `caching_sha2_password plugin` 进行身份验证,之前的版本默认使用 `mysql_native_password plugin` 进行身份验证的客户端连接 8.0 时会报错,在 `caching_sha2_password plugin` 下修改用户密码的语句如下:
登录后执行
```sql
ALTER USER user
IDENTIFIED WITH caching_sha2_password
BY 'password';
```
将密码验证回复成`caching_sha2_password plugin`的语句如下:
登录后执行
```shell
use mysql;
select host,user,plugin from user;
```
打印如下
```shell
+-----------+------------------+-----------------------+
| host | user | plugin |
+-----------+------------------+-----------------------+
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | caching_sha2_password |
+-----------+------------------+-----------------------+
4 rows in set (0.00 sec)
```
执行语句修改plugin为`mysql_native_password plugin`
```shell
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '你的密码'; flush privileges;
```
打印如下
```shell
+-----------+------------------+-----------------------+
| host | user | plugin |
+-----------+------------------+-----------------------+
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | mysql_native_password |
+-----------+------------------+-----------------------+
4 rows in set (0.00 sec)
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment