input: def create_and_read_users_api():
      """ Creates a REST API in Python for creating and reading users. The API uses Flask and MySQL for database management. It has endpoints for creating a user, reading all users, and reading a single user.
      >>> # Assuming there's a MySQL server running with the appropriate configuration.
      >>> # Creating a user
      >>> create_user_response = app.test_client().post('/users', json={'name': 'Alice', 'email': 'alice@example.com'})
      >>> create_user_response.json['message'] == 'User created'
      True
      >>> # Reading all users
      >>> get_users_response = app.test_client().get('/users')
      >>> len(get_users_response.json) == 1
      True
      >>> # Reading a single user
      >>> get_user_response = app.test_client().get(f'/users/{get_users_response.json[0]['id']}')
      >>> get_user_response.json['name'] == 'Alice'
      True
      """
output:     
      from flask import Flask, request, jsonify
      import mysql.connector
  
      app = Flask(__name__)
  
      # MySQL configuration
      config = {
          'user': 'root',
          'password': 'password',
          'host': 'localhost',
          'database': 'users_db'
      }
  
      def get_db_connection():
          return mysql.connector.connect(**config)
  
      @app.route('/users', methods=['POST'])
      def create_user():
          data = request.json
          name = data['name']
          email = data['email']
  
          connection = get_db_connection()
          cursor = connection.cursor()
          cursor.execute("INSERT INTO users (name, email) VALUES (%s, %s)", (name, email))
          connection.commit()
          cursor.close()
          connection.close()
  
          return jsonify({'message': 'User created'}), 201
  
      @app.route('/users', methods=['GET'])
      def get_users():
          connection = get_db_connection()
          cursor = connection.cursor(dictionary=True)
          cursor.execute("SELECT * FROM users")
          users = cursor.fetchall()
          cursor.close()
          connection.close()
  
          return jsonify(users), 200
  
      @app.route('/users/<int:user_id>', methods=['GET'])
      def get_user(user_id):
          connection = get_db_connection()
          cursor = connection.cursor(dictionary=True)
          cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
          user = cursor.fetchone()
          cursor.close()
          connection.close()
  
          if user:
              return jsonify(user), 200
          else:
              return jsonify({'message': 'User not found'}), 404
  
      if __name__ == '__main__':
          app.run(debug=True)
  