Host Is Not Allowed to Connect to This MySQL Server

Mysql 8 版本 8.0.24

bash 复制代码
[root@VM-0-5-centos ~]# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 128
Server version: 8.0.24 Source distribution

部署在腾讯云服务器,本地电脑操作python想连接远程MySQL,提示异常

'ip地址' Is Not Allowed to Connect to This MySQL Server

显然是权限不足

创建新的管理员用户或修改root用户以允许从"vScopeServerIP"进行连接

复制代码
> CREATE USER 'newusername'@'*' IDENTIFIED BY 'your_password';
> GRANT ALL PRIVILEGES ON *.* TO 'newusername'@'*' WITH GRANT OPTION;
> CREATE USER 'newusername'@'ip' IDENTIFIED BY 'password';
> GRANT ALL PRIVILEGES ON *.* TO 'newusername'@'ip' WITH GRANT OPTION;
> FLUSH PRIVILEGES;
相关推荐
dessler3 小时前
MYSQL-多种方法安装部署
android·mysql·adb
Andy4 小时前
Mysql基础1
数据库·mysql·adb
独行soc17 小时前
2025年渗透测试面试题总结-224(题目+回答)
网络·python·安全·web安全·adb·渗透测试·安全狮
超人小子2 天前
mysql重置密码
数据库·mysql·adb
rexling12 天前
【MySQL】mysqldump使用方法
数据库·mysql·adb
xhbh6662 天前
【实战总结】MySQL日志文件位置大全:附查找脚本和权限解决方案
android·adb
xhbh6663 天前
【实战大全】MySQL连接全攻略:命令行+编程语言+可视化工具+故障排查
adb
木易 士心3 天前
在 Mac 上配置 ADB 环境变量:解决 “command not found: adb” 问题
macos·adb
2501_938782094 天前
《Ubuntu 系统下 MySQL 安装前的环境检查与依赖准备指南》
hive·mysql·ubuntu·adb
Java 码农4 天前
mysql8.4.6 LTS 主从架构搭建
mysql·adb·架构