# Database Management MySQL and MariaDB / Database Management ## Validate MySQL database integrity - [GET /Mysql/check_database](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/mysql-check_database.md): This function checks for errors in all of the tables in a MySQL® database. When you disable the MySQL role remote MySQL is already configured, the system this function. ## Create MySQL database - [GET /Mysql/create_database](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/create_database.md): This function creates a MySQL® database. When you disable the MySQL/MariaDB role remote MySQL is already configured, the system this function. ## Delete MySQL database - [GET /Mysql/delete_database](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/delete_database.md): This function deletes a MySQL® database. when you disable the MySQL/MariaDB role remote MySQL is already configured, the system this function. ## Return MySQL database schema - [GET /Mysql/dump_database_schema](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/dump_database_schema.md): This function returns a string that you can give to MySQL® to recreate a particular database’s schema. When you disable the MySQL/MariaDB role remote MySQL is configured, the system this function. ## Return MySQL databases - [GET /Mysql/list_databases](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/list_databases.md): This function lists an account's MySQL® databases. When you disable the role remote MySQL is configured, the system this function. ## Update MySQL database name - [GET /Mysql/rename_database](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/mysql-rename_database.md): This function renames a MySQL® database. MySQL does not allow you to rename a database. When cPanel & WHM "renames" a database, the system performs the following steps: 1. The system creates a new database. 2. The system moves data from the old database to the new database. 3. The system recreates grants and stored code in the new database. 4. The system deletes the old database and its grants. * It is potentially dangerous to rename a MySQL database. We recommend that you perform a backup of the database before you attempt to rename it. * If any of the first three steps fail, the system returns an error and attempts to restore the database's original state. If the restoration process fails, the API function's error response describes these additional failures. * In rare cases, the system creates the second database successfully, but fails to delete the old database or grants. The system treats the rename action as a success; however, the API function returns warnings that describe the failure to delete the old database or grants. When you disable the MySQL/MariaDB role remote MySQL is already configured, the system this function. ## Repair MySQL database tables - [GET /Mysql/repair_database](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/repair_database.md): This function repairs all of the tables in a MySQL® database. When you disable the MySQL/MariaDB role remote MySQL is already configured, the system this function. ## Create a randomly named MySQL username/database set. - [GET /Mysql/setup_db_and_user](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/setup_db_and_user.md): This function creates a randomly named MySQL® database and user. This allows a 3rdparty tool to create its own DB without needing any knowledge of cPanel internals such as quotas or other limits. These will simply be passed back as an error. When you disable the MySQL/MariaDB role remote MySQL is already configured, the system this function. ## Update MySQL® privileges - [GET /Mysql/update_privileges](https://api.docs.cpanel.net/specifications/cpanel.openapi/database-management/mysql-update_privileges.md): This function updates privileges for all MySQL® databases and users on an account. When you disable the MySQL/MariaDB role remote MySQL is configured, the system this function.