当前位置:网站首页>ubuntu mysql 设置远程访问权限
ubuntu mysql 设置远程访问权限
2022-07-28 05:25:00 【幻影七幻】
ubuntu mysql 设置远程访问权限
第一步:修改配置文件的端口绑定
打开的目录可能会根据MySQL的版本稍有不同,可以先尝试打开/etc/mysql/my.cnf这个配置文件,若该文件不存在或文件内容为空,则尝试下面的文件路径。
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf在下面行的开头加上#,注释掉该行,然后保存退出vim:
bind-address = 127.0.0.1第二步:修改访问权限
进入mysql,输入如下命令,输入密码,进入mysql命令行
mysql -u root -p
授权root用户访问权限,并刷新权限,此处的root可用其它MySQL用户替换,pwd部分需替换为该用户对应的密码
grant all privileges on *.* to [email protected]"%" identified by "pwd" with grant option;flush privileges;exit;
第三步:重启mysql服务
service mysql restart边栏推荐
- 基于 YOLOV5 的 SAR 图像舰船检测
- [server usage record] log in to the remote server through the springboard machine and transfer files
- 测量电脑电池容量
- Common table expression CTE in Clickhouse
- OpenGL快速配置方法
- Redhawk Dynamic Analysis
- Measure computer battery capacity
- Detailed explanation of word mail merge function: after merging, multiple word documents are generated and blank pages are deleted
- error: redefinition of ‘xxx‘
- 【学习笔记】进程创建
猜你喜欢

clickhouse建宽表多少列最合适?

Word邮件合并功能详解:合并后生成多个word文档,删除空白页

雷达成像 Matlab 仿真 3 —— 多目标检测
![[server usage record] log in to the remote server through the springboard machine and transfer files](/img/11/1ca6c2f34d43dfb6d766ec0dc3371d.png)
[server usage record] log in to the remote server through the springboard machine and transfer files

Cautious speculation about fusion on Apple silicon

qt中获取当前目录

Mae mask self encoding is scalable learning

雷达成像 Matlab 仿真 1 —— LFM信号及其频谱

自定义组件--纯数据字段&组件的生命周期

VS Code 基础配置与美化
随机推荐
ICC2(三)Clock Tree Synthesis
EfficientNET_ V1
Common table expression CTE in Clickhouse
Esxi on ARM v1.2 (updated in November 2020)
Servlet
clickhouse聚合之探索聚合内部机制
Varistor design parameters and classic circuit recording hardware learning notes 5
Systemmediasize startup option added in esxi 7.0 update 1C
【学习笔记】进程创建
Machine learning note 5 - logistic regression
qt解决每次修改完ui文件都要重新构建的问题
clickhouse聚合之内存不足怎么办?那就提升聚合性能
OpenGL的开发环境配置【VS2017】+常见问题
Trouble encountered in cable testing -- a case study of a manufacturer?
转义字符笔记
Matlab simulation of radar imaging 4 - range resolution analysis
npm yarn相关的操作
Graduation thesis | how to write literature review
ICC2(一)Preparing the Design
Word自动目录字体修改和行间距的问题