mysql数据库问题记录

1. 启动服务器

1
mysql.server start

2. sql导入数据库

1
mysql -u root --default-character-set=utf8 -p wens_uc < wens_uc.sql

3. 关闭启用ssl连接警告

Establishing SSL connection without server’s identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn’t set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to ‘false’. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

解决:在数据源url加上&useSSL=false

1
2
datasource:
url: jdbc:mysql://127.0.0.1:3306/guns?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false

4. 查找mysql版本号命令

1
2
3
4
5
# 帮助文档查找命令
mysql --help|grep version

# 查询mysyl命令
mysql -V 或者 mysql --version
文章目录
  1. 1. 1. 启动服务器
  2. 2. 2. sql导入数据库
  3. 3. 3. 关闭启用ssl连接警告
  4. 4. 4. 查找mysql版本号命令
| 45.9k | |