input: Write a python function to fetch all rows from a MySQL table and return them as a list of tuples.
  assert fetch_data("localhost", "3306", "myDB", "root", "mypassword", "myTable") == [(1, 'John'), (2, 'Jane'), (3, 'Doe')]
  assert fetch_data("localhost", "3306", "anotherDB", "root", "mypassword", "anotherTable") == [(4, 'Alice'), (5, 'Bob')]
  assert fetch_data("localhost", "3306", "testDB", "root", "mypassword", "testTable") == [(6, 'Charlie'), (7, 'Eve')]
output: import mysql.connector
  
  def fetch_data(host, port, database, user, password, table):
      connection = mysql.connector.connect(
          host=host,
          port=port,
          database=database,
          user=user,
          password=password
      )
      
      cursor = connection.cursor()
      query = f"SELECT * FROM {table}"
      cursor.execute(query)
      
      rows = cursor.fetchall()
      
      cursor.close()
      connection.close()
      
      return rows