mysql8入门
# mysql8安装
# 建立my.ini文件
解压后,在目录下建立my.ini文件, 设置以下内容
[mysqld]
character-set-server=utf8mb4
character-set-client-handshake=FALSE
collation-server=utf8mb4_unicode_ci
init_connect='SET NAMES utf8mb4'
# 表名忽略大小写
lower_case_table_names=1
innodb_large_prefix=ON
innodb_file_format=Barracuda
innodb_file_per_table=ON
# 去掉only_full_group_by
sql_mode =STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
# 默认使用“mysql_native_password”插件认证
default_authentication_plugin=mysql_native_password
explicit_defaults_for_timestamp=true
skip-name-resolve
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
mysql的sql_mode设置 - harara - 博客园 (cnblogs.com) (opens new window)
# 初始化
mysqld --initialize --console mysql8 #安装服务,服务名为mysql8
net start mysql8 #启动服务
1
2
2