Mom-Portal/docs/REMOTE_DB.md
KevinB-T 30894e7f27 Configure VM services and fix auth flow
- point MySQL and Whisper settings to the VM
- add VM MySQL bootstrap scripts and docs
- allow LAN Vite origins for CORS
- fix Express 5 validation assignment crash
- allow login with username or email
- prevent recursive auth refresh retries
2026-05-15 15:19:49 +05:30

33 lines
673 B
Markdown

# Remote MySQL Setup
Create a database user that can connect from the API host:
```sql
CREATE DATABASE orphion CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'orphion'@'%' IDENTIFIED BY 'NexaVault2026!Blue';
GRANT ALL PRIVILEGES ON orphion.* TO 'orphion'@'%';
FLUSH PRIVILEGES;
```
Configure:
```env
DB_HOST=172.16.10.64
DB_PORT=3306
DB_NAME=orphion
DB_USER=orphion
DB_PASSWORD=NexaVault2026!Blue
```
For the VM setup, run the database/user bootstrap from this project:
```sh
sh scripts/bootstrap-vm-mysql.sh <vm-user>@172.16.10.64
```
That command runs the VM MySQL grant setup and then applies the project schema through:
```sh
npm run migrate
```