update refrence md

This commit is contained in:
zhh 2019-01-04 17:22:18 +08:00
parent 73214817a8
commit a42a2a4545
3 changed files with 11 additions and 1 deletions

View File

@ -34,6 +34,8 @@ docker start $ContainerId
docker logs $ContainerIdName(或者$ContainerId)
### 查看容器的IP地址172.17.0.*
docker inspect --format '{{ .NetworkSettings.IPAddress }}' $ContainerId
### 同步宿主机时间到容器
docker cp /etc/localtime $ContainerName:/etc/
## Docker Registry
### Docker Registry 2.0搭建

View File

@ -62,6 +62,11 @@ delete from emp where ename='zhangsan'
- 查看字符集show variables like 'character%'
- 创建数据库时指定字符集create database mall character set utf8
### 修改时区
- 修改mysql全局时区为北京时间即我们所在的东8区set global time_zone = '+8:00';
- 修改当前会话时区set time_zone = '+8:00'
- 立即生效flush privileges
### 权限相关
- 授予所有数据库的所有权限grant all privileges on *.* to z1@localhost identified by '123'
- 授予所有数据库的所有权限(包括grant)grant all privileges on *.* to z1@localhost with grant option

View File

@ -1,9 +1,12 @@
#===datasource start===
spring.datasource.url=jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8
spring.datasource.url=jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
spring.datasource.username=reader
spring.datasource.password=123456
#===datasource end===
#\u914D\u7F6E\u65E5\u5FD7\u751F\u6210\u8DEF\u5F84
logging.path=/var/logs
#===druid start===
#\u8FDE\u63A5\u6C60\u521D\u59CB\u5316\u5927\u5C0F
spring.datasource.druid.initial-size=5