Files
nexus/wiki/sources/mysql-mariadb-shu-ju-ku-xiang-xi-xin-xi.md
2026-04-14 16:02:50 +08:00

33 lines
1.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "MySQL MariaDB 数据库详细信息"
type: source
tags: [database, mariadb, mysql, nas]
date: 2026-04-13
source_file: raw/Technical/Home Office/🟠MySQL MariaDB 数据库详细信息.md
---
## Summary
- 核心主题MariaDB数据库的远程访问配置与用户创建
- 问题域:数据库网络访问安全与权限管理
- 方法/机制socket本地登录 + CREATE USER远程授权 + GRANT ALL PRIVILEGES
- 结论/价值解决新安装MariaDB默认只允许localhost访问的问题
## Key Claims
- MariaDB新安装后只有root@localhost没有root@%或其他远程用户
- 远程访问失败的根本原因是缺少Host/User组合和对应权限
- 必须通过CREATE USER 'shenwei'@'%'创建允许任意主机连接的用户
- FLUSH PRIVILEGES使权限更改立即生效
## Key Concepts
- [[数据库远程访问]]通过TCP/IP网络连接数据库而非socket本地连接
- [[MariaDB权限管理]]基于Host+User组合的访问控制机制
## Key Entities
- [[MySQL]]此处指MariaDB分支兼容MySQL协议
- [[Synology-NAS]]:数据库运行的宿主环境
## Connections
- [[MySQL]] ← 运行于 ← [[Synology-NAS]]
## Contradictions