input: Write a python function to update a user's information in the MySQL database.
  assert update_user_info(1, {'name': 'Alice', 'email': 'alice@example.com'}) == {'message': 'User updated'}
  assert update_user_info(2, {'name': 'Bob', 'email': 'bob@example.com'}) == {'message': 'User updated'}
  assert update_user_info(3, {'name': 'Charlie', 'email': 'charlie@example.com'}) == {'error': 'No database selected'}, 500
output: import mysql.connector
  from mysql.connector import Error
  
  def update_user_info(user_id, new_info):
      try:
          connection = mysql.connector.connect(
              host='localhost',
              user='your_username',
              password='your_password',
              database='your_database_name'
          )
          
          if connection.is_connected():
              cursor = connection.cursor()
              update_query = "UPDATE users SET name = %s, email = %s WHERE id = %s"
              cursor.execute(update_query, (new_info['name'], new_info['email'], user_id))
              connection.commit()
              
              if cursor.rowcount == 0:
                  return {'error': 'User not found'}, 404
              
              return {'message': 'User updated'}
  
      except Error as e:
          if "No database selected" in str(e):
              return {'error': 'No database selected'}, 500
          return {'error': str(e)}, 500
  
      finally:
          if connection.is_connected():
              cursor.close()
              connection.close()