fix:添加英文qa

This commit is contained in:
spiritlhl
2025-10-23 09:59:27 +00:00
parent cdb62f2d24
commit 7f3dfaf31c

View File

@@ -2,4 +2,70 @@
outline: deep
---
Occupancy pending construction
# Please Report Issues to the Corresponding Repository
## What to Do If You Forgot the Administrator Password
You need to forcibly change the password through database operations
1. Generate Password Hash
```bash
# Generate using Python (replace NewPassword123! with your new password)
python3 -c "import bcrypt; print(bcrypt.hashpw(b'NewPassword123!', bcrypt.gensalt()).decode('utf-8'))"
```
Example output: `$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`
2. Enter the Database
**Docker Deployment (All-in-One Version):**
```bash
docker exec -it oneclickvirt mysql -u root oneclickvirt
```
**Standalone Database Deployment:**
```bash
mysql -h 127.0.0.1 -P 3306 -u root -p oneclickvirt
```
3. Update Password
```sql
-- View administrator account
SELECT id, username, user_type FROM users WHERE user_type = 'admin';
-- Update password (replace with the hash value generated in step 1)
UPDATE users
SET password = '$2b$12$xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
WHERE username = 'admin';
-- Exit
EXIT;
```
4. Login Test
Log in to the system with the new password to verify.
**Notes**
- The hash value must start with `$2a$`, `$2b$`, or `$2y$`
- The default administrator username is `admin`, which can be confirmed through a query
- It is recommended to use a strong password (≥8 characters, containing uppercase and lowercase letters, numbers, and special characters)
- It is recommended to backup the database before modification:
```bash
docker exec oneclickvirt mysqldump -u root oneclickvirt > backup.sql
```
## How to Delete Persistent Database and Storage Volumes in Docker
After deleting the corresponding container
Execute
```shell
docker volume rm oneclickvirt-data oneclickvirt-storage oneclickvirt-config
```
to delete