当前位置:网站首页>解决navicat连接数据库遇到的问题
解决navicat连接数据库遇到的问题
2022-06-30 03:38:00 【走到哪,爬到哪】
一、查看端口是否是3306
dos窗口输入命令:mysql -uroot -p

接着输入:show global variables like 'port';

二、是否把端口号添加到防火墙
2.1 入站规则--双击新建规则


2.2 输入端口号:3306




三、出现1130错误

解决方法:
3.1 打开dos命令窗口,登录:mysql -uroot -p

3.2 输入use mysql ;

3.3 查看mysql 服务的用户信息(用户名,可访问ip)输入:select user, host from user;
3.4 user 代表mysql服务可访问的用户,host代表用户运行在制定的ip上访问(localhost,表示本机)修改root用户允许在任务机器上访问 update user set host='%' where user='root';

3.5 然后更改远程连接设置命令:GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘root’ WITH GRANT OPTION;
3.6 刷新用户权限,使root新设置的权限能够生效 flush privileges;

3.7 连接成功

边栏推荐
- Redis中的Hash设计和节省内存数据结构设计
- 【筆記】AB測試和方差分析
- Huawei interview question: tall and short people queue up
- unity input system 使用记录(实例版)
- laravel9本地安裝
- 【笔记】2022.5.23 MySQL
- Global and Chinese markets for advanced wound care 2022-2028: Research Report on technology, participants, trends, market size and share
- Knowledge points of 2022 system integration project management engineer examination: software quality assurance and quality evaluation
- The 5-year Android development interview took 20 days to join Alibaba
- Feign 坑
猜你喜欢

毕业设计EMS办公管理系统(B/S结构)+J2EE+SQLserver8.0

(04).NET MAUI实战 MVVM

laravel9本地安装

dbt产品初体验

Number of students from junior college to Senior College (4)

ThingsBoard教程(二三):在规则链中计算二个设备的温度差

Chapter 2 control structure and function (programming problem)
![[Note] ab Test and Variance Analysis](/img/f2/58369a99514d37d5af335a61d0911f.jpg)
[Note] ab Test and Variance Analysis

Redis高并发分布式锁(学习总结)

LitJson解析 生成json文件 读取json文件中的字典
随机推荐
【力扣刷题总结】数据库题目按知识点分类总结(持续更新/简单和中等题已完结)
Use common fileUpload to upload files
【云原生】AI云开发平台——AI Model Foundry介绍(开发者可免费体验AI训练模型)
Installation and use of yarn
【作业】2022.5.25 MySQL 查操作2
Tidb 6.0: making Tso more efficient tidb Book rush
王爽-汇编语言 万字学习总结
Utilisation de foreach en Qt
【笔记】2022.6.7 数据分析概论
AppData文件夹下Local,Locallow和Roaming
Mathematical solution of Joseph Ring
The 5-year Android development interview took 20 days to join Alibaba
【笔记】2022.5.27 通过pycharm操作MySQL
Use of foreach in QT
Global and Chinese market of bulk acoustic wave devices 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market for sensor screwdrivers 2022-2028: Research Report on technology, participants, trends, market size and share
EasyCVR部署服务器集群时,出现一台在线一台不在线是什么原因?
Dripping backward (II)
Feign 坑
MySQL + JSON = King fried