当前位置:网站首页>关于在云服务器上(这里用腾讯云)安装mysql8.0并使本地可以远程连接的方法
关于在云服务器上(这里用腾讯云)安装mysql8.0并使本地可以远程连接的方法
2022-07-07 09:06:00 【optimistic丶中】
这里采取利用宝塔的方法,首先在宝塔官网上找到宝塔适合于个人环境的安装方式并在云服务器上进行安装
安装完宝塔后在可以宝塔的软件商店中安装mysql,并设置了mysql的用户名和密码后,需要打开防火墙中的3306端口,此时远程连接依旧会出现1045的错误,后续需要通过修改用户的权限解决(这里不知道为什么,出现过多次
的问题,网上查是因为套接字文件缺失,但我反复检查没有做过删除操作,最后通过重启服务器可以解决问题,很玄学)
首先通过CREATE USER 'your username'@'%' IDENTIFIED BY 'your password';
来新建一个用户,
再通过grant all privileges on *.* to 'your username'@'%' with grant option;
(mysql8.0之后用这个,8.0之前用grant all privileges on *.* to 'your username'@'%' identified by 'root' with grant option;
)给该用户权限,
之后通过flush privileges;
刷新数据库的配置,
并最后依靠sudo service mysql restart;
重启,最终可以成功使用Navicat远程连接
边栏推荐
- vim 的各种用法,很实用哦,都是本人是在工作中学习和总结的
- Use of dotween
- After the uniapp jumps to the page in onlaunch, click the event failure solution
- Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
- Monai version has been updated to 0.9. See what new functions it has
- 2021-04-08
- Unity script visualization about layout code
- [pro test feasible] error while loading shared libraries solution
- From pornographic live broadcast to live broadcast E-commerce
- Kitex 重试机制
猜你喜欢
Unity script generates configurable files and loads
CSAPP bomb lab parsing
RationalDMIS2022阵列工件测量
Use load_ decathlon_ Datalist (Monai) fast loading JSON data
2021-05-21
PostgreSQL中的表复制
"Dream Cup" 2017 Jiangsu information and future primary school summer camp it expert PK program design questions
The gun startles the dragon, and the crowd "locks" Zhou Zhi
Antd select selector drop-down box follows the scroll bar to scroll through the solution
Avoid mutating a prop directly since the value will be overwritten whenever the parent component
随机推荐
The difference between monotonicity constraint and anti monotonicity constraint
Add a self incrementing sequence number to the antd table component
QT document
SQL Server knowledge gathering 9: modifying data
[pytorch 07] hands on deep learning chapter_ Preliminaries/ndarray exercises hands-on version
How to remove addition and subtraction from inputnumber input box
2021 summary and 2022 outlook
JS add spaces to the string
Multithreaded application (thread pool, singleton mode)
Deeply understand the characteristics of database transaction isolation
Still cannot find RPC dispatcher table failed to connect in virtual KD
seata 1.3.0 四種模式解决分布式事務(AT、TCC、SAGA、XA)
Static semantic check of clang tidy in cicd
What if copying is prohibited?
Monai version has been updated to 0.9. See what new functions it has
[untitled]
Unity websocket server
Deconstruction and assignment of variables
Realize ray detection, drag the mouse to move the object and use the pulley to scale the object
JSON format query of MySQL