当前位置:网站首页>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
边栏推荐
- "Autobiography of Franklin" cultivation
- Excuse me, using data integration to import data from PostgreSQL to MySQL database, emoj appears in some data fields
- Selenium uses -- XPath and analog input and analog click collaboration
- A turbulent life
- 力扣 83双周赛T4 6131.不可能得到的最短骰子序列、303 周赛T4 6127.优质数对的数目
- 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%
- 2022河南萌新联赛第(三)场:河南大学 I - 旅行
- Clickhouse notes 03-- grafana accesses Clickhouse
- Microsoft azure and Analysys jointly released the report "Enterprise Cloud native platform driven digital transformation"
- Create directories and subdirectories circularly
猜你喜欢

Clickhouse notes 03-- grafana accesses Clickhouse

业务可视化-让你的流程图'Run'起来(3.分支选择&跨语言分布式运行节点)

If you want to do a good job in software testing, you can first understand ast, SCA and penetration testing

Azure Devops (XIV) use azure's private nuget warehouse

【问题解决】org.apache.ibatis.exceptions.PersistenceException: Error building SqlSession.1 字节的 UTF-8 序列的字

Kyligence 入选 Gartner 2022 数据管理技术成熟度曲线报告

零基础学习CANoe Panel(13)—— 滑条(TrackBar )
![[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

Moving Chinese figure liushenglan

交换机链路聚合详解【华为eNSP】
随机推荐
PyTorch项目实战—FashionMNIST时装分类
软件测试流程包括哪些内容?测试方法有哪些?
R language uses LM function to build multiple linear regression model, step function to build forward stepwise regression model to screen the best subset of prediction variables, and scope parameter t
Software testing interview question: Please list the testing methods of several items?
[fluent -- example] case 1: comprehensive example of basic components and layout components
【8】 Clever use of color finder
MySQL implements inserting data from one table into another table
[high concurrency] deeply analyze the execution process of worker threads in the thread pool through the source code
【7】 Layer display and annotation
【七】图层显示和标注
Leetcode 1184. distance between bus stops
软件测试面试题目:请你列举几个物品的测试方法怎么说?
【9】 Coordinate grid addition and adjustment
请问一下,使用数据集成从postgreSQL导数据到Mysql数据库,有部分数据的字段中出现emoj
2022.07.24(LC_6125_相等行列对)
Plus SBOM: assembly line BOM pbom
Monit installation and use
【二】栅格数据显示拉伸色带(以DEM数据为例)
【九】坐标格网添加以及调整
2022河南萌新联赛第(三)场:河南大学 I - 旅行