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.
==========================================
NPQS9100 MySQL 免安装版使用说明
==========================================
一、快速开始
----------------------------------------
1. 启动 MySQL:
双击运行: startup.bat
(注意: 不要关闭窗口, 关闭会停止MySQL)
2. 首次使用,如需重置密码和权限:
双击运行: reset-root-password.bat
3. 停止 MySQL:
双击运行: stop.bat
二、连接信息
----------------------------------------
主机: 127.0.0.1 (或 localhost)
端口: 3306
用户: root
密码: njcnpqs
字符集: utf8mb4
三、脚本说明
----------------------------------------
startup.bat - 启动 MySQL 服务
stop.bat - 正常停止 MySQL 服务
reset-root-password.bat - 重置root密码和权限( 解决1130错误)
kill-running-port.bat - 智能清理应用实际使用的端口( 自动识别3306/3307/...)
my.ini - MySQL 配置文件
.running-port - 运行时端口记录(自动生成,勿删除)
bin/ - MySQL 可执行文件
data/ - 数据库数据目录
share/ - 共享资源
⚠️ 安全说明:
- 应用自动停止MySQL时, 只会停止应用自己启动的MySQL进程
- 不会影响您电脑上安装的其他MySQL服务
- kill-running-port.bat 会读取 .running-port 文件,精确清理实际使用的端口
- 如果3306被占用, 应用会自动使用3307, kill-running-port.bat 会智能识别
⚙️ 停止机制:
- 应用关闭时会自动使用 mysqladmin shutdown 优雅停止MySQL
- 如果优雅停止失败,会自动尝试强制停止
- 整个停止过程最多12秒, 确保MySQL完全关闭
⭐ 端口智能管理:
- 应用启动时自动检测可用端口( 3306 → 3307 → 3308...)
- 启动成功后会记录实际端口到 .running-port 文件
- 使用 kill-running-port.bat 可自动清理正确的端口
四、注意事项
----------------------------------------
1. 启动后不要关闭命令行窗口,关闭窗口会停止 MySQL
2. 正常停止请使用 stop.bat
3. 如果出现 1130 或密码错误,运行 reset-root-password.bat
4. 如果端口被占用无法启动,运行 kill-3306.bat
5. 默认密码是 njcnpqs, 不要随意修改
五、常见问题
----------------------------------------
Q: 连接提示 1130 错误或密码错误?
A: 运行 reset-root-password.bat 重置权限
Q: 启动失败或端口被占用?
A: 运行 kill-running-port.bat 清理端口(自动识别正确端口)
Q: 如何重置密码?
A: 运行 reset-root-password.bat( 密码会重置为 njcnpqs)
Q: 数据在哪里?
A: 所有数据库数据在 data/ 目录下
==========================================
南京灿能电气自动化有限公司
2025
==========================================