Bash & SQL

Here's a bash script that connects to your MariaDB server, retrieves a list of databases, and then for each database, it retrieves a list of tables along with their columns:

#!/bin/bash

# MySQL/MariaDB credentials
MYSQL_USER="your_username"
MYSQL_PASSWORD="your_password"

# Connect to MySQL/MariaDB and retrieve list of databases
databases=$(mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -e "SHOW DATABASES;" | grep -Ev "(Database|information_schema|performance_schema)")

# Loop through each database
for db in $databases; do
    echo "Database: $db"
    echo "---------------------------------------"

    # Retrieve list of tables for current database
    tables=$(mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -N -e "USE $db; SHOW TABLES;")

    # Loop through each table and retrieve columns
    for table in $tables; do
        echo "Table: $table"
        echo "Columns:"
        mysql -u$MYSQL_USER -p$MYSQL_PASSWORD -N -e "USE $db; DESCRIBE $table;"
        echo "---------------------------------------"
    done

    echo
done