24 lines
935 B
Python
24 lines
935 B
Python
import paramiko
|
|
|
|
HOST = '161.97.93.156'
|
|
USER = 'carlos'
|
|
PASSWORD = 'Innova1978+*?'
|
|
MARIADB = 'appwrite-mariadb-sss6crntvrcs54qbhvhy5728'
|
|
DB_PASS = 'sn9YkZqoLV06CQxAy2qsKi36S7POVShT'
|
|
DB_USER = 'sYoHWwl0DGvEyt3s'
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect(hostname=HOST, username=USER, password=PASSWORD, timeout=15)
|
|
|
|
# Check table structure for collection 12
|
|
cmd = f"docker exec {MARIADB} mysql -u {DB_USER} -p{DB_PASS} appwrite -e 'SHOW TABLES LIKE \"_1_database_2_collection_12%\"; SHOW TABLES LIKE \"_1_12%\"; SHOW TABLES LIKE \"_2_12%\";'"
|
|
stdin, stdout, stderr = client.exec_command(cmd)
|
|
print("Tables found:\n", stdout.read().decode())
|
|
|
|
cmd2 = f"docker exec {MARIADB} mysql -u {DB_USER} -p{DB_PASS} appwrite -e 'SHOW TABLES LIKE \"_2_%\";'"
|
|
stdin2, stdout2, stderr2 = client.exec_command(cmd2)
|
|
print("All tables in db 2:\n", stdout2.read().decode())
|
|
|
|
client.close()
|