input: Write a python function to connect to a MySQL database, execute a query to fetch all records from a table, and return the results.
  assert fetch_data_from_table('users') == [(1, 'Alice', 'alice@example.com'), (2, 'Bob', 'bob@example.com')]
  assert fetch_data_from_table('products') == [(101, 'Laptop', 999.99), (102, 'Smartphone', 499.99)]
  assert fetch_data_from_table('orders') == [(1001, 1, 101, '2023-10-01'), (1002, 2, 102, '2023-10-02')]
output: import mysql.connector
  
  def fetch_data_from_table(table_name):
      # Replace these values with your actual database configuration
      config = {
          'user': 'your_username',
          'password': 'your_password',
          'host': 'your_host',
          'database': 'your_database',
      }
      
      # Establishing the connection to the database
      conn = mysql.connector.connect(**config)
      
      # Creating a cursor object to interact with the database
      cursor = conn.cursor()
      
      # Formulating the SQL query to fetch all records from the specified table
      query = f"SELECT * FROM {table_name}"
      
      # Executing the query
      cursor.execute(query)
      
      # Fetching all the results
      results = cursor.fetchall()
      
      # Closing the cursor and the connection
      cursor.close()
      conn.close()
      
      # Returning the fetched results
      return results