记录一下安装使用MySql8.0以及允许Navicat11远程连接

2019-03-14 23:15:05 浏览数 (1)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_35213388/article/details/80287764

1.新建my.ini和data文件夹

创建my.ini 复制以下内容,注意修改路径,创建data文件夹

代码语言:javascript复制
  1. [mysqld]
  2. basedir=E:/Program Files/MySQL/MySQL Server 8.0
  3. datadir=E:/Program Files/MySQL/MySQL Server 8.0/data
  4. port = 3306
  5. character-set-server=utf8
  6. #忘记密码时使用
  7. #skip-grant-tables
  8. #设置协议认证方式
  9. default_authentication_plugin=mysql_native_password
  10. [mysql]
  11. 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;

0 人点赞