Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql数据库远程登录失败 #10

Open
ye-guo opened this issue Apr 15, 2024 · 0 comments
Open

Mysql数据库远程登录失败 #10

ye-guo opened this issue Apr 15, 2024 · 0 comments
Assignees
Milestone

Comments

@ye-guo
Copy link
Owner

ye-guo commented Apr 15, 2024


title: Mysql数据库远程登录失败
date: 2024-04-09 09:56
updated: 2024-04-09 09:56
category: 技术杂谈
tags:

  • bug
  • mysql

连接数据库报错:Access denied for user ‘root‘@ ‘xxx‘ (using password: YES)

本地的数据库,其他IP地址的访问都是没有权限的,需要的本机用户给予权限才能访问到。

  • 首先登录自己数据库

  • 执行授权

GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '您的密码' WITH GRANT OPTION;
  • 重启服务

sudo service mysal restart 
或
sudo systemctl restart mysqld
@ye-guo ye-guo added this to the 技术杂谈 milestone Apr 15, 2024
@ye-guo ye-guo self-assigned this Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant