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;
相关推荐
sthnyph12 小时前
MySQL 8.0在windows环境安装及配置
windows·mysql·adb
AI-小柒14 小时前
DataEyes 聚合平台 + Claude Code Max 编程实战
android·开发语言·人工智能·windows·python·macos·adb
wuyikeer17 小时前
windows同时安装两个不同版本的Mysql
windows·mysql·adb
小手智联老徐19 小时前
Windows 下 ADB 无线调试与系统级操作指南
android·windows·adb
AI算法董同学20 小时前
【MySQL】项目后端 MySQL 数据库初始化步骤
数据库·mysql·adb
qq_283720052 天前
MySQL技巧(四): EXPLAIN 关键参数详细解释
android·adb
gjc5922 天前
踩坑实录:MySQL服务器CPU爆高,元凶竟是SELinux的setroubleshootd?
运维·服务器·数据库·mysql·adb
yhole2 天前
MySQL无法连接到本地localhost的解决办法2024.11.8
数据库·mysql·adb
guslegend2 天前
MySQL高手第一章
mysql·adb
轩情吖2 天前
MySQL Connect
数据库·mysql·adb·select·连接·远程访问数据库