当前位置:网站首页>Mysql 远程连接权限错误1045问题
Mysql 远程连接权限错误1045问题
2022-07-25 12:27:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
#今天新安装mysql以后,由于没有勾选Enable root access from remote machines 而再连接数据库时出现了以下问题
走了许多绕路,在这里做下笔记。 网上查阅资料很多说是密码问题,我一开始也是照着网上的方法去服务器上修改密码,然后本地连接,结果还是出 错,才发现是混淆了一些东西。 数据库的root账户分两种,一种是本地,一种是远程: 我需要修改的是远程root密码,权限也是远程账户root: 1.首先再服务器的mysql打开cmd输入: mysql -u root -p 接下来会提示输入密码 2.进入成功以后找到表user: use mysql 提示database changed表示成功 3.修改表里的参数,也就是权限修改 mysql> GRANT ALL PRIVILEGES ON . TO ‘root’@’%’ IDENTIFIED BY ‘’ WITH GRANT OPTION; (这个==%==号就是代表任意IP都可以进行数据库的访问) 4.在进入这句话完了以后需要再加上一句: flush privileges; (告诉mysql进行权限刷新) 5.退出mysql的连接 \q
好了,到了这一步,权限就已经修改,再次远程连接mysql,就可以了 对于远程密码和localhost的密码不一致导致一方连接不上的问题下次再补充。
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/127189.html原文链接:https://javaforall.cn
边栏推荐
- mysql实现一张表数据插入另一张表
- 【C语言进阶】动态内存管理
- "Wei Lai Cup" 2022 Niuke summer multi school training camp 2 supplementary problem solution (g, J, K, l)
- Numpy first acquaintance
- 2022.07.24 (lc_6124_the first letter that appears twice)
- Software testing interview question: Please list the testing methods of several items?
- [rust] reference and borrowing, string slice type (& STR) - rust language foundation 12
- SSTI 模板注入漏洞总结之[BJDCTF2020]Cookie is so stable
- 【9】 Coordinate grid addition and adjustment
- 【4】 Layout view and layout toolbar usage
猜你喜欢

2022.07.24 (lc_6126_design food scoring system)

【问题解决】org.apache.ibatis.exceptions.PersistenceException: Error building SqlSession.1 字节的 UTF-8 序列的字
![[problem solving] ibatis.binding BindingException: Type interface xxDao is not known to the MapperRegistry.](/img/00/65eaad4e05089a0f8c199786766396.png)
[problem solving] ibatis.binding BindingException: Type interface xxDao is not known to the MapperRegistry.

2022.07.24(LC_6125_相等行列对)

Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network

零基础学习CANoe Panel(14)——二极管( LED Control )和液晶屏(LCD Control)

【AI4Code】《GraphCodeBERT: Pre-Training Code Representations With DataFlow》 ICLR 2021

Crawler crawls dynamic website

Communication bus protocol I: UART

想要白嫖正则大全是吧?这一次给你个够!
随机推荐
flinkcdc可以一起导mongodb数据库中的多张表吗?
【AI4Code】《CoSQA: 20,000+ Web Queries for Code Search and Question Answering》 ACL 2021
吕蒙正《破窑赋》
【高并发】通过源码深度分析线程池中Worker线程的执行流程
SSTI 模板注入漏洞总结之[BJDCTF2020]Cookie is so stable
Ministry of Public Security: the international community generally believes that China is one of the safest countries in the world
Moving Chinese figure liushenglan
Jenkins configuration pipeline
JS 中根据数组内元素的属性进行排序
基于JEECG制作一个通用的级联字典选择控件-DictCascadeUniversal
cmake 学习使用笔记(二)库的生成与使用
【Flutter -- 布局】层叠布局(Stack和Positioned)
Introduction to the scratch crawler framework
[shutter -- layout] stacked layout (stack and positioned)
《富兰克林自传》修身
【问题解决】ibatis.binding.BindingException: Type interface xxDao is not known to the MapperRegistry.
Pytorch environment configuration and basic knowledge
PyTorch主要模块
Does MySQL have flush privileges
pytorch环境配置及基础知识