文件
yjyf/scratch/check_remote_db.py
MiAn 0370cb9bd6 feat: 新增师傅入驻审核与接单状态联动功能
- 新增师傅资质审核模块及权限
- 未审核通过的师傅默认禁用接单状态
- 新增售后退款申诉功能与相关界面
- 新增用户钱包管理及充值功能
- 更新服务定价矩阵相关数据库结构
- 修复微信支付证书验证问题
2026-11-17 10:28:01 +08:00

17 行
814 B
Python

import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('8.137.181.63', port=22, username='root', password='liyanxia@6688', timeout=10)
stdin, stdout, stderr = ssh.exec_command("mysql -uyjyf -pyjyf yjyf -e \"SELECT price_type, count(*) FROM fa_service GROUP BY price_type;\"")
print("Remote DB before:", stdout.read().decode('utf-8'))
stdin, stdout, stderr = ssh.exec_command("mysql -uyjyf -pyjyf yjyf -e \"UPDATE fa_service SET price_type = 'fixed' WHERE price_type != 'fixed';\"")
print("Remote update err:", stderr.read().decode('utf-8'))
stdin, stdout, stderr = ssh.exec_command("mysql -uyjyf -pyjyf yjyf -e \"SELECT price_type, count(*) FROM fa_service GROUP BY price_type;\"")
print("Remote DB after:", stdout.read().decode('utf-8'))
ssh.close()