def METHOD_NAME(force, source_sql, verbose, no_mariadb_socket=False):
	frappe.local.session = frappe._dict({"user": "Administrator"})
	db_name = frappe.local.conf.db_name
	root_conn = get_root_connection(frappe.flags.root_login, frappe.flags.root_password)
	dbman = DbManager(root_conn)
	dbman_kwargs = {}
	if no_mariadb_socket:
		dbman_kwargs["host"] = "%"
	if force or (db_name not in dbman.get_database_list()):
		dbman.delete_user(db_name, **dbman_kwargs)
		dbman.drop_database(db_name)
	else:
		raise Exception(f"Database {db_name} already exists")
	dbman.create_user(db_name, frappe.conf.db_password, **dbman_kwargs)
	if verbose:
		print("Created user %s" % db_name)
	dbman.create_database(db_name)
	if verbose:
		print("Created database %s" % db_name)
	dbman.grant_all_privileges(db_name, db_name, **dbman_kwargs)
	dbman.flush_privileges()
	if verbose:
		print(f"Granted privileges to user {db_name} and database {db_name}")
	# close root connection
	root_conn.close()
	bootstrap_database(db_name, verbose, source_sql)