当前位置:网站首页>阿里云服务器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
边栏推荐
- 每日一题-1317. 将整数转换为两个无零整数的和
- Exercise 6-2 using functions to sum a special series of a numbers (20 points)
- 启牛商学院送华泰账户安不安全?真的吗
- 机器学习之线性回归简单实例
- 3.2 测试类的命名规则
- [solution] solution to asymmetric and abnormal transformation caused by modifying the transform information of sub objects
- 什么是死锁?(把死锁给大家讲明白,知道是什么,为什么用,怎么用)
- MATLAB点云处理(二十五):点云生成 DEM(pc2dem)
- 926. 将字符串翻转到单调递增
- Swiper -- a solution to the conflict of single page multicast plug-ins
猜你喜欢

BUUCTF(5)

Prefabricated dishes in the trillion market have also begun to roll inside. How can brands stand out in the fierce competition?

【数据挖掘时间序列分析】餐厅销量预测

Only three steps are needed to learn how to use low code thingjs to connect with Sen data Dix data

MySQL事务简介

Zhanrui IOT chip 8910dm is certified by Deutsche Telekom

图的基本操作(C语言)
![[Yu Yue education] Yancheng Normal University Advanced Algebra reference](/img/3f/cd7f6f420fb1d453acca9aa73665ba.jpg)
[Yu Yue education] Yancheng Normal University Advanced Algebra reference

Players must read starfish NFT advanced introduction

Basic operation of graph (C language)
随机推荐
[solution] solution to asymmetric and abnormal transformation caused by modifying the transform information of sub objects
926. 将字符串翻转到单调递增
If I take the college entrance examination again, I will study mathematics well!
Number of classified statistical characters (15 points)
IEEE浮点数尾数向偶舍入-四舍六入五成双
[JS] 1347- high level usage of localstorage
Determine whether the linked list is palindrome structure
Implementation of sequencelist sequence table
NLP - fastText
[Chongqing Guangdong education] college physics of Xiangtan University: mechanical and thermal reference materials
Unity中使用调用Shell的命令行
3.3 测试模块的命名规则
[data mining time series analysis] restaurant sales forecast
利用SecureCRTPortable脚本功能完成网络设备的数据读取
Introduction to MySQL transactions
动态规划之0-1背包问题(详解+分析+原码)
Exercise 10-1 judge the three digits that meet the conditions (15 points)
Tkinter学习笔记(四)
leetcode 257. Binary Tree Paths 二叉树的所有路径(简单)
論文閱讀《Dense Visual SLAM for RGB-D Cameras》