input: Write a function to implement a REST API in Python for creating and reading users using Flask and MySQL. The API should have endpoints for creating a user, reading all users, and reading a single user by ID. If the user is successfully created, return a JSON response with a message "User created". If a user or all users are successfully read, return the corresponding user data in JSON format.
  assert 'message' in create_user('John', 'john@example.com')
  assert type(get_users())==list
  assert type(get_user(1))==dict
  assert 'message' in create_user('Jane', 'jane@example.com')
  assert len(get_users())==2
  assert get_user(2)['email']=='jane@example.com'
output: 
  def create_user(name, email):
      cursor = mysql.connection.cursor()
      cursor.execute("INSERT INTO users (name, email) VALUES (%s, %s)", (name, email))
      mysql.connection.commit()
      cursor.close()
      return {'message': 'User created'}
  
  def get_users():
      cursor = mysql.connection.cursor()
      cursor.execute("SELECT * FROM users")
      users = cursor.fetchall()
      cursor.close()
      return users
  
  def get_user(user_id):
      cursor = mysql.connection.cursor()
      cursor.execute("SELECT * FROM users WHERE id = %s", (user_id,))
      user = cursor.fetchone()
      cursor.close()
      return user
  