Navicat怎么正确连接MySQL8.0
作者:水悠悠予安
时间:2023-04-29
来源:互联网
浏览:0
更改加密方式1.先通过命令行进入mysql的root账户:PSC:\Windows\system32>mysql-uroot-p再输入root的密码:Enterpassword:******WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis18Serverversion:8.0.11MySQLCommunityServer-GPLCopyright(c)2000,2018,Oracleand/oritsaffiliat
更改加密方式
1.先通过命令行进入mysql的root账户:
PS C:\Windows\system32> mysql -uroot -p
再输入root的密码:
Enter password: ****** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 18 Server version: 8.0.11 MySQL Community Server - GPL Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
2.更改加密方式:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; Query OK, 0 rows affected (0.10 sec)
3.更改密码:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; Query OK, 0 rows affected (0.35 sec)
4.刷新:
mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.28 sec)
// 如果报错 ERROR 1396 (HY000): Operation ALTER USER failed for 'root'@'%' :
则是远程访问权限不正确,先选择数据库,查看一下再更改:
mysql> use mysql; Database changed mysql> select user,host from user; +------------------+-----------+ | user | host | +------------------+-----------+ | mysql.infoschema | localhost | | mysql.session | localhost | | mysql.sys | localhost | | root | localhost | +------------------+-----------+ 5 rows in set (0.00 sec)
作者最新文章
灵活计算器
2026-09-16 17:45
苹果折叠屏iPhone预计售价是多少
2026-09-14 13:44
OpenAI GPT-6 Astra 自主通关《传送门》:技术原理与实验成本解析
2026-09-08 19:08
苹果与铠侠签署NAND长期供应协议:3-5年长约与不设价格上限背后的供应链战略
2026-09-08 16:58
PDF转PPT操作指南:在线、本地与批量转换及结果核对
2026-09-04 15:04
热门文章
更多
精品专题
更多
Mac软件
更多
WINDOWS
更多
Windows 10
Windows
Windows 10 是一款微软推出的经典操作系统,拥有硬件兼容性与多任务处理能力。它更偏向把系统状态查看和常用调节动作放在一起,适合需要持续观察和微调设备状态的场景。
极度公式
Windows/macOS/Linux
极度公式是一款跨平台专业LaTeX公式识别编辑软件,支持OCR公式识别和多平台编辑。和使用说明,避免使用,享受完整功能与稳定支持。做扫描整理、文字提取和表格转换时,它能把识别后的处理步骤接得更顺,资料录入这类场景会省下不少时间。
















