Auto-sync: 2026-04-16 20:05

This commit is contained in:
2026-04-16 20:05:13 +08:00
parent db72ecb4f6
commit ee6406f30c
43 changed files with 1786 additions and 12 deletions

View File

@@ -0,0 +1,45 @@
---
title: "MySQL MariaDB 数据库详细信息"
type: source
tags: [database, mariadb, mysql, nas]
date: 2026-04-16
---
## Source File
- [[raw/Home Office/MySQL MariaDB 数据库详细信息.md]]
## Summary
- 核心主题MySQL/MariaDB 数据库配置与远程访问用户创建
- 问题域NAS 环境下的数据库部署与访问配置
- 方法/机制MariaDB 用户权限管理、远程访问授权、 socket 登录
- 结论/价值:解决新安装 MariaDB 无法从外部客户端访问的问题
## Key Claims
- MariaDB 新安装后,只有 `root@localhost`,无法从外部访问
- 远程访问需要创建 `'username'@'%'` 格式的用户
- 需要执行 `GRANT ALL PRIVILEGES``FLUSH PRIVILEGES` 才能生效
## Key Quotes
> "你的 MariaDB 只有 `root@localhost`,并没有 `root@%` 或你要连接用的用户账号"
> "从你外部客户端连接失败的最常见原因就是:没有对应的 Host/User 组合 + 缺少权限"
## Key Concepts
- [[MariaDB]]MySQL 分支的开源关系数据库
- [[远程访问]]:通过非本机 IP 访问数据库服务
- [[用户权限管理]]:数据库用户创建与权限授予
## Key Connections
- [[NAS]] ← hosts ← [[MariaDB]]
- [[Ubuntu]] ← runs ← [[MariaDB]]
## Internal Access Configuration
- IP: 192.168.3.17
- Port: 3307
- Username: shenwei / root
- Password: !Abcde12345
## Public Access Configuration
- Domain: mysql.ishenwei.online
- Port: 63307
- Username: shenwei / root
- Password: !Abcde12345