title: MySQL8.0创建用户及其配置
date: 2019-05-01
author: maxzhao
tags:
- MYSQL8
categories:
- MYSQL8
基本配置文件 my.cnf
[mysqld]
basedir = D:\mysql
datadir = D:\mysql\data
port = 3336
character-set-server = utf8mb4
# 下面这个选项是可以选择的
#default_authentication_plugin=mysql_native_password
[mysql]
default-character-set = utf8mb4
# 不使用密码进入
# skip-grant-table
[client]
default-character-set = utf8mb4
数据库初始化:mysqld --initialize
libicuuc.so.63最后说;
数据库初始化后随机密码在日志文件中hostname.err,需要使用该密码登录并修改密码。
alter user 'maxzhao'@'localhost' identified by "maxzhao";
alter user 'maxzhao'@'localhost' identified with mysql_native_password by "maxzhao";
alter user 'ma