当前位置:网站首页>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
边栏推荐
- Alibaba cloud technology expert Qin long: reliability assurance is a must - how to carry out chaos engineering on the cloud?
- 我在源头SQLServer里面登记绝对删除的数据,传到MaxComputer,在数据清洗的时候写绝对
- Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
- Script set random user_ agent
- [rust] reference and borrowing, string slice type (& STR) - rust language foundation 12
- 跌荡的人生
- 2022.07.24(LC_6124_第一个出现两次的字母)
- R language uses wilcox The test function performs Wilcox signed rank test to obtain the confidence interval of the population median (the default output result includes the confidence interval of 95%
- 基于Caffe ResNet-50网络实现图片分类(仅推理)的实验复现
- "Wei Lai Cup" 2022 Niuke summer multi school training camp 2 supplementary problem solution (g, J, K, l)
猜你喜欢

Alibaba cloud technology expert Qin long: reliability assurance is a must - how to carry out chaos engineering on the cloud?

Communication bus protocol I: UART

MySQL exercise 2
![[fluent -- example] case 1: comprehensive example of basic components and layout components](/img/d5/2392d9cb8550aa2692c8b41303d507.png)
[fluent -- example] case 1: comprehensive example of basic components and layout components

Pytorch project practice - fashionmnist fashion classification
![[ROS advanced chapter] Lecture 9 programming optimization of URDF and use of xacro](/img/a2/9b676d0f1b33cc7d413cee6c52d76d.png)
[ROS advanced chapter] Lecture 9 programming optimization of URDF and use of xacro

基于JEECG制作一个通用的级联字典选择控件-DictCascadeUniversal

PyTorch可视化

2022.07.24(LC_6124_第一个出现两次的字母)

Experimental reproduction of image classification (reasoning only) based on caffe resnet-50 network
随机推荐
想要做好软件测试,可以先了解AST、SCA和渗透测试
"Wei Lai Cup" 2022 Niuke summer multi school training camp 2 supplementary problem solution (g, J, K, l)
【8】 Clever use of color finder
启牛开的证券账户安全吗?是怎么开账户的
SSTI template injection vulnerability summary [bjdctf2020]cookie is so stable
JS 中根据数组内元素的属性进行排序
State mode
flinkcdc可以一起导mongodb数据库中的多张表吗?
Clickhouse notes 03-- grafana accesses Clickhouse
Can flinkcdc import multiple tables in mongodb database together?
《富兰克林自传》修身
跌荡的人生
[fluent -- example] case 1: comprehensive example of basic components and layout components
想要做好软件测试,可以先了解AST、SCA和渗透测试
【6】 Map box settings
2022.07.24 (lc_6125_equal row and column pairs)
word样式和多级列表设置技巧(二)
感动中国人物刘盛兰
Technical management essay
shell基础知识(退出控制、输入输出等)