2018年05月11日 23:51:39 爱不离此 阅读数:4449mysql
版权声明:本文为博主原创文章,未经博主容许不得转载。 https://blog.csdn.net/qq_35213388/article/details/80287764sql
1.新建my.ini和data文件夹数据库
建立my.ini 复制如下内容,注意修改路径,建立data文件夹ide
[mysqld]
spa
basedir=E:/Program Files/MySQL/MySQL Server 8.0
.net
datadir=E:/Program Files/MySQL/MySQL Server 8.0/data
code
port = 3306
server
character-set-server=utf8
blog
#忘记密码时使用
ip
#skip-grant-tables
#设置协议认证方式
default_authentication_plugin=mysql_native_password
[mysql]
default-character-set=utf8
2.将mysql数据库user表里的root用户的host改为%
update user set host='%' where user='root';
3.容许root用户远程访问
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'IDENTIFIED BY '密码' WITH GRANT OPTION;
4.Navicat11链接mysql8报错Client does not support authentication protocol requested by server; consider upgrading MySQL client
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '密码';
FLUSH PRIVILEGES;