当前位置: 首页 > news >正文

MySQL: Failed to Connect to MySQL at XXXX:3306 with user root

客户端连接MySQL服务器,报错:
在这里插入图片描述

解决方案:
没有让root用户远程登录,需要设置;
进入MySQL服务器,修改一下

# mysql -h localhost -uroot -P3306 -p12345678
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 7
Server version: 5.7.42-debug Source distributionCopyright (c) 2000, 2023, Oracle and/or its affiliates.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345678' ;
Query OK, 0 rows affected, 1 warning (5.02 sec)

备注:自己测试用的服务器,密码简单点;

在这里插入图片描述

http://www.lryc.cn/news/117346.html

相关文章:

  • 《大型网站技术架构设计》第二篇 架构-性能
  • 谷歌推出AI模型机器人RT2 将文本和图像输出为机器人动作
  • 常见的服务器安全管理漏洞
  • JavaScript高级:探索作用域链的神秘面纱
  • mysql数据库如何转移到oracle
  • nnU-Net 终极指南
  • ubuntu 安装 python
  • 【腾讯云 Cloud studio 实战训练营】云端 IDE 构建移动端H5
  • Kubernetes 之 Kubeadm 搭建
  • Qt应用开发(基础篇)——堆栈窗口 QStackedWidget
  • 浅谈测试开发岗位
  • 典型移动APP安全风险提醒
  • 多平台发布文章-项目总结
  • 什么是IoC?什么是Spring IoC?什么是DI?
  • 分布式任务调度平台XXL-JOB学习笔记-helloworld运行
  • 维护工程师提升设备管理水平的5个技巧
  • 解码大众全新数字高尔夫8汽车CAN FD行驶功能电气架构
  • 什么是DDL、MDL?
  • 【sonar】安装sonarQube免费社区版9.9【Linux】【docker】
  • MySQL基本语法总结
  • 锐捷VSU技术理论与实验
  • 深入探索Linux文件链接技术:ln命令的妙用
  • electron项目开发环境搭建
  • Spring 知识点
  • 目标跟踪与检测后进行 OpenCV 人脸识别 ,马赛克
  • 持有PMP证书,可申请CSPM证书!
  • linux自定义网络访问规则
  • 247 个经典实用有趣的 Python 实例附源码
  • 动手学深度学习Pytorch 4.4练习
  • 【计算机视觉 | Kaggle】飞机凝结轨迹识别 Baseline 分享和解读(含源代码)