input: from flask import Flask, jsonify, request
  from flask_mysqldb import MySQL
  
  app = Flask(__name__)
  
  # Mysql configuration
  app.config['MYSQL_USER'] = 'root'
  app.config['MYSQL_PASSWORD'] = 'password'
  app.config['MYSQL_DB'] = 'users'
  app.config['MYSQL_CURSORCLASS'] = 'DictCursor'
  
  mysql = MySQL(app)
  
  @app.route('/users', methods=['POST'])
  def create_user():
      """Create a new user in the database.
      >>> create_user({'name': 'John Doe', 'email': 'john@example.com'})
      {'message': 'User created'}
      """
      name = request.json['name']
      email = request.json['email']
  
      cur = mysql.connection.cursor()
      cur.execute("INSERT INTO users (name, email) VALUES (%s, %s)", (name, email))
      mysql.connection.commit()
      cur.close()
  
      return jsonify({'message': 'User created'})
  
  @app.route('/users', methods=['GET'])
  def get_users():
      """Retrieve all users from the database.
      >>> get_users()
      [{'id': 1, 'name': 'John Doe', 'email': 'john@example.com'}, {'id': 2, 'name': 'Jane Doe', 'email': 'jane@example.com'}]
      """
      cur = mysql.connection.cursor()
      cur.execute("SELECT * FROM users")
      users = cur.fetchall()
      cur.close()
  
      return jsonify(users)
  
  @app.route('/users/<int:id>', methods=['GET'])
  def get_user(id):
      """Retrieve a single user from the database by its ID.
      >>> get_user(1)
      {'id': 1, 'name': 'John Doe', 'email': 'john@example.com'}
      """
      cur = mysql.connection.cursor()
      cur.execute("SELECT * FROM users WHERE id=%s", (id,))
      user = cur.fetchone()
      cur.close()
  
      return jsonify(user)
  
  if __name__ == "__main__":
      app.run(debug=True)
output:     
      cur = mysql.connection.cursor()
      cur.execute("SELECT * FROM users WHERE id=%s", (id,))
      user = cur.fetchone()
      cur.close()
  
      if user is None:
          return jsonify({'message': 'User not found'}), 404
  
      return jsonify(user)
  