1、首先进入mysql的安装目录下的bin目录,例如我的是【C:\WINDOWS\System32\cmd.exe】
 
2、接着输入cmd,回车
 
 
3、在命令行中输入命令【mysql -hlocalhost -uroot -p 按回车键,输入密码】,其中【-h主机名 -u用户 -p密码】 
 
4、成功进入界面
...
5、show databases;   查看所有数据库
 

在bin目录下执行mysql -uroot -p123456

登录后执行:

use mysql;

select host, user, plugin from user;

打印:

+-----------+------------------+-----------------------+
| host | user | plugin |
+-----------+------------------+-----------------------+
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | caching_sha2_password |
+-----------+------------------+-----------------------+
4 rows in set (0.00 sec)

发现新版MySQL都是默认用caching_sha2_password这个plugin来加密密码了,HeidiSQL无法接入。现改成原生密码的加密方式。

执行:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';

flush privileges;

就可以了。再执行上面的查询语句,返回:

+-----------+------------------+-----------------------+
| host | user | plugin |
+-----------+------------------+-----------------------+
| localhost | mysql.infoschema | caching_sha2_password |
| localhost | mysql.session | caching_sha2_password |
| localhost | mysql.sys | caching_sha2_password |
| localhost | root | mysql_native_password |
+-----------+------------------+-----------------------+
4 rows in set (0.00 sec)

可知,已经改mysql_native_password插件了。

 

MySQL Windows安装连接的更多相关文章

  1. Mysql(windows)安装

    h3 { color: rgb(255, 255, 255); background-color: rgb(30,144,255); padding: 3px; margin: 10px 0px } ...

  2. MySQL Windows ZIP 免费安装和启动设置

    MySQL Windows ZIP免安装版,设置和启动的过程事实上挺麻烦的.以下一步一步介绍使用的过程: 1.下载Windows (x86, 64-bit), ZIP Archive: 2.解压zip ...

  3. MySQL Windows 环境安装

    1.下载 MySQL Windows 安装包 下载地址:https://downloads.mysql.com/archives/installer/ 我这个是 MySQL 5.7 版本 2.直接双击 ...

  4. MySQL Windows版安装详解

    一.下载MySQL MySQL官网https://dev.mysql.com提供了Windows下的安装版msi和解压版zip,其中均包含32和64位版本,mis版本与SqlServer安装基本一致N ...

  5. [Mysql]mysql windows下配置文件

    环境是win7 mysql5.6版本 测试下配置文件是否可用(之前没用过windows下的msyql配置) 修改配置前查询下: mysql> show variables like '%max_ ...

  6. Configure the MySQL account associate to the domain user via MySQL Windows Authentication Plugin

    在此记录如何将之前一次做第三发软件在配置的过程. 将AD user通过代理映射到mysql 用户. 在Mysql官网有这样一段话: The server-side Windows authentica ...

  7. python操作三大主流数据库(1)python操作mysql①windows环境中安装python操作mysql数据库的MySQLdb模块mysql-client

    windows安装python操作mysql数据库的MySQLdb模块mysql-client 正常情况下应该是cmd下直接运行 pip install mysql-client 命令即可,试了很多台 ...

  8. MySQL Windows 下的安装

    my.ini ####################配置文件开始################### # For advice on how to change settings please s ...

  9. mysql windows 5.7 安装版下载地址

    https://dev.mysql.com/downloads/windows/installer/5.7.html

随机推荐

  1. topcoder srm 633 div1

    problem1 link 如果两个循环之内可以跳完,那么我们只要让这些步数之内的数字组成两个数字$p,q,p\leq q$,使得$p,q,x$组成三角形即可($p+q\geq x,p+x\geq q ...

  2. laravel console handle 传参方法

    <?php namespace App\Console\Commands; use Illuminate\Console\Command; use App\Libs\wxpay\CLogFile ...

  3. oracle jdk和openjdk区别;idea如何加载jdk源码并调试jdk代码

    两个jdk的区别 oracle jdk是sun/oracle(甲骨文)公司的,部分jdk开源:相对比较稳定,使用的比较多. openjdk是完全开源的,据说是官方oracle唯一承认的开源版本. id ...

  4. Npcap.例子(raw tcp syn)

    1.来自:winpcap实现syn攻击 - 125096 - CSDN博客.html(https://blog.csdn.net/qq125096885/article/details/5178452 ...

  5. 打开app应用

    =========================================人才网 <!--app底部浮动广告--><style> footer { padding-bo ...

  6. WebStorm 2018.2安装激活教程

    1.下载解压,得到jetbrains webstorm 2018.2主程序,破解文件和中文语言包: 2.运行“WebStorm-2018.2.exe”开始安装,默认安装目录[C:\Program Fi ...

  7. mysql 表字段部分替换

    update user set `ph` = REPLACE(`ph`,'shenji.osnt.me','60.210.113.147:555');

  8. python 内置函数input/eval(22)

    python的内置函数其实挺多的,其中input和eval算得上比较特殊,input属于交互式内置函数,eval函数能直接执行字符串表达式并返回表达式的值. 一.input函数 input是Pytho ...

  9. vue vue-cli3 修改elementui的date-picker源码 引入node_modules里的element-ui后报错exports is not defined

    报错说明: 1.复制node_modules/element-ui/packages/date-picker里的文件到自己项目里  --------->>>>>>& ...

  10. HTML札记

    HTML 指的是 超文本标记语言 (Hyper Text Markup Language) 文档后缀名: 当您保存 HTML 文件时,既可以使用 .htm 也可以使用 .html 扩展名.两者没有区别 ...