-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.ps1
More file actions
27 lines (21 loc) · 919 Bytes
/
Copy pathstart.ps1
File metadata and controls
27 lines (21 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Windows 启动脚本
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8'
Write-Host "启动数据库..."
docker compose up -d
Write-Host "等待数据库就绪..."
Start-Sleep -Seconds 15
# 创建 SQL Server 数据库
Write-Host "创建 SQL Server 数据库..."
docker exec bench_sqlserver /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "Benchmark@123" -C -Q "CREATE DATABASE benchmark_test" 2>$null
Write-Host ""
Write-Host "✅ 数据库已启动!" -ForegroundColor Green
Write-Host ""
Write-Host "连接信息:"
Write-Host " MySQL: localhost:3306 root/123456"
Write-Host " SQLServer: localhost:1433 sa/Benchmark@123"
Write-Host " PostgreSQL: localhost:5432 postgres/123456"
Write-Host " MongoDB: localhost:27017"
Write-Host " SQLite: 自动创建 benchmark_test.db"
Write-Host ""
Write-Host "运行测试: dotnet run"