25 lines
422 B
Bash
25 lines
422 B
Bash
#!/bin/bash
|
|
|
|
# MySQL MCP Server 启动脚本
|
|
|
|
# 设置环境变量(可选)
|
|
export MYSQL_USER=gotest
|
|
export MYSQL_PASS=2nZhRdMPCNZrdzsd
|
|
export MYSQL_URLS=212.64.112.158:3388
|
|
export MYSQL_DB=gotest
|
|
|
|
# 编译
|
|
echo "Building MCP Server..."
|
|
go build -o mcp-server main.go
|
|
|
|
if [ $? -ne 0 ]; then
|
|
echo "Build failed!"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Build successful! Starting MCP Server..."
|
|
echo ""
|
|
|
|
# 启动服务器
|
|
./mcp-server
|