mysql - 在 CentOS 7.6 上无法远程连接 MariaDB 10.3
问题描述
我正在尝试从远程机器连接 MariaDB 10.3(安装在 CentOS 7.6 上),但我无法连接。
Output of grep
我也找不到 .cnf 文件。
Output of cd /etc --> ls
解决方案
my.cnf(Windows 上的 my.ini)
-> 将 IP 地址替换为您的
bind-address = 123.456.789.10
然后
CREATE USER 'myuser'@'localhost' IDENTIFIED BY 'mypass';
CREATE USER 'myuser'@'%' IDENTIFIED BY 'mypass';
最后的
GRANT ALL ON *.* TO 'myuser'@'localhost';
GRANT ALL ON *.* TO 'myuser'@'%';
还要检查你的 iptables 和 firewalld
systemctl status firewalld
systemctl status iptables
iptables -L
firewall-cmd --list-all-zones
推荐阅读
- javascript - UpdatePanel 中的 javascript 在回发时不起作用
- python - 如何从字典中返回值列表?
- java - 将包级 Java 注释转换为 Kotlin
- amazon-web-services - 使用 Google Firebase 进行物联网设备管理/入职
- python-3.x - tkinter中带有网格的位置小部件
- excel - 从 Excel 发送大量电子邮件
- postgresql - PostgreSQL 从两个表中获取匹配并保存到磁盘
- matlab - 如何在 MATLAB 中绘制显示非共形映射的复值函数?
- python - WIFI Pineapple Nano 和 RPi GPIO
- typescript - 使用 TypeScript 在量角器中无法单击元素