input: Write a function to connect to MySQL, MongoDB, and PostgreSQL databases, execute queries on each, and display the results on a web page using Python libraries for all three databases. If the connection or query fails, handle the exception and return an appropriate error message.
  
  assert render_page("SELECT * FROM users")=="Connection successful and data fetched successfully"
  assert render_page("SELECT * FROM nonexistent_table")=="Error: Table not found"
  assert render_page("")=="Invalid query provided"
output: def render_page(query):
      try:
          if not query:
              return "Invalid query provided"
          
          # MySQL connection and query execution
          import mysql.connector
          mysql_conn = mysql.connector.connect(host='localhost', user='root', password='password', database='testdb')
          mysql_cursor = mysql_conn.cursor()
          mysql_cursor.execute(query)
          mysql_results = mysql_cursor.fetchall()
          mysql_cursor.close()
          mysql_conn.close()
          
          # MongoDB connection and query execution
          from pymongo import MongoClient
          mongo_client = MongoClient('localhost', 27017)
          mongo_db = mongo_client['testdb']
          mongo_collection = mongo_db['users']
          mongo_results = list(mongo_collection.find({}, {'_id': 0}))
          mongo_client.close()
          
          # PostgreSQL connection and query execution
          import psycopg2
          pg_conn = psycopg2.connect(host='localhost', database='testdb', user='postgres', password='password')
          pg_cursor = pg_conn.cursor()
          pg_cursor.execute(query)
          pg_results = pg_cursor.fetchall()
          pg_cursor.close()
          pg_conn.close()
          
          return "Connection successful and data fetched successfully"
      
      except mysql.connector.Error as err:
          return f"MySQL Error: {err}"
      except psycopg2.Error as err:
          return f"PostgreSQL Error: {err}"
      except Exception as err:
          return f"Error: {err}"