当前位置:网站首页>阿里云服务器mysql远程连接一直连不上
阿里云服务器mysql远程连接一直连不上
2022-06-11 22:34:00 【单筱风】
一、MySQL 开启远程连接需要先在服务器上登录到 MySQL
mysql -u root -p
然后 Enter password:
二、修改 root 账户的 Host
1、打开 mysql 数据库
use mysql;
2、查看 user 数据表当前已有的数据
select * from user;
3、修改一条 root 数据,并刷新MySQL的系统权限相关表
update user set Host = '%' where Host = 'localhost' and User='root';
flush privileges;
或者使用 grant 命令重新创建一个用户
grant all privileges on *.* to root @"%" identified by "root";
flush privileges;
三、注意事项
当出现 10038错误时 2003 - Can’t content to MySQL server on ‘127.0.0.1’ (10038) ,需要 check 以下几点;
1、记得在服务器安全组开放对应端口
2、开放了安全组后还是连接不上,就要检查防火墙了。
四、关闭防火墙
我的阿里云服务器mysql远程连接一直连不上,就是忘记了关闭防火墙了
1.关闭防火墙:
sudo systemctl stop firewalld.service
2. 关闭开机启动:
sudo systemctl disable firewalld.service
边栏推荐
- 【解决】修改子物体Transform信息导致变换不对称、异常问题的解决方案
- 玩家必读|Starfish NFT进阶攻略
- Basic operation of graph (C language)
- Exercise 9-5 address book sorting (20 points)
- Tkinter study notes (IV)
- 判断链表是否为回文结构
- Exercise 10-1 judge the three digits that meet the conditions (15 points)
- Brief introduction to integrity
- Dynamics 365 option set operation
- Matlab point cloud processing (XXV): point cloud generation DEM (pc2dem)
猜你喜欢

5.学城项目 支付宝支付

Simple example of logistic regression for machine learning

仅需三步学会使用低代码ThingJS与森数据DIX数据对接

Glory earbud 3 Pro with three global first strong breakdowns flagship earphone Market

Basic operation and question type summary of binary tree

华为设备配置HoVPN

How to adjust the font blur of win10

遇到表格,手动翻页太麻烦?我教你写脚本,一页展示所有数据

Learn to crawl for a month and earn 6000 a month? Don't be fooled. The teacher told you the truth about the reptile

Fastapi 5 - common requests and use of postman and curl (parameters, x-www-form-urlencoded, raw)
随机推荐
[uniapp native plug-in] shangmi cashbox plug-in
【NodeJs】Electron安装
Exercise 11-2 find week (15 points)
[Matlab]二阶节约响应
Lecture de l'article dense Visual SLAM for RGB - D Cameras
What is deadlock? (explain the deadlock to everyone and know what it is, why it is used and how to use it)
MATLAB点云处理(二十五):点云生成 DEM(pc2dem)
习题11-3 计算最长的字符串长度 (15 分)
习题6-2 使用函数求特殊a串数列和 (20 分)
Analysis of the implementation principle of an open source markdown to rich text editor
Basic operation of graph (C language)
Players must read starfish NFT advanced introduction
Unity3d getlaunchintintforpackage getting package returned null
Basic operation and question type summary of binary tree
【LeetCode】11. Container with the most water
剑指offer数组题型总结篇
习题11-2 查找星期 (15 分)
Zhanrui IOT chip 8910dm is certified by Deutsche Telekom
每日一题-1317. 将整数转换为两个无零整数的和
How to adjust the font blur of win10