WHM API.
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/
https://{host}:{port}/json-api/
Request
This function checks your MySQL configuration file and table engine before an upgrade to MySQL 8.0.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/background_mysql_upgrade_checker_run
- A server running WHM.
https://whm-server.tld:2087/json-api/background_mysql_upgrade_checker_run
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/background_mysql_upgrade_checker_run{ "data": { "log_entry": "mysql_upgrade.20200202-172923", "pid": 23456 }, "metadata": { "command": "background_mysql_upgrade_checker_run", "reason": "OK", "result": 1, "version": 1 } }
Request
This function retrieves the status of a background MySQL® or MariaDB® upgrade.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/background_mysql_upgrade_status
- A server running WHM.
https://whm-server.tld:2087/json-api/background_mysql_upgrade_status
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://api.docs.cpanel.net/_mock/specifications/whm.openapi/background_mysql_upgrade_status?upgrade_id=mysql_upgrade.20141108-172923'{ "data": { "error": 0, "error_log": "Starting The system failed to update MYSQL,\\n------------------------------------\\n", "log": "Starting process with log file at /var/cpanel/logs/mysql_upgrade.20141108-172923/unattended_background_upgrade.log\nBeginning MariaDB 10.0 upgrade...\nObtained version information from system.\nEnsuring the MariaDB100 repository is available and working.\ncheckyum version 22.3\nEnsuring that the package MariaDB-client with version matching 10.0 is available.\nEnsuring that the package MariaDB-common with version matching 10.0 is available.\nEnsuring that the package MariaDB-devel with version matching 10.0 is available.\nEnsuring that the package MariaDB-server with version matching 10.0 is available.\nEnsuring that the package MariaDB-shared with version matching 10.0 is available.\nEnsuring that the package coreutils is available.\nEnsuring that the package grep is available.\nEnsuring that the package perl-DBI is available.\n your MariaDB server version for the right syntax to use near ''.`netcopya0I5KfqYTfHqJr` FOR UPGRADE'' at line 1 when executing ''CHECK TABLE ... FOR UPGRADE''\nFATAL ERROR: Upgrade failed\nDone building configuration.\nHooks system enabled.\nChecking for and running RPM::Versions ''post'' hooks for any RPMs about to be installed\nAll required ''post'' hooks have been run\nRunning: /usr/local/cpanel/scripts/check_cpanel_pkgs --targets=MySQL41,MySQL50,MySQL51,MySQL55,MySQL56,MariaDB100,MariaDB101 --fix\nRestarting mysql service.\nWaiting for mysql to restart waiting for mysql to initialize finished.\n\u001b[1;32mMariaDB upgrade completed successfully\u001b[0m\n------------------------------------\n", "state": "success" }, "metadata": { "command": "background_mysql_upgrade_status", "reason": "OK", "result": 1, "version": 1 } }
Request
This function retrieves the server's version of MySQL® or MariaDB®.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
- Mock server
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/current_mysql_version
- A server running WHM.
https://whm-server.tld:2087/json-api/current_mysql_version
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
https://api.docs.cpanel.net/_mock/specifications/whm.openapi/current_mysql_version{ "data": { "server": "mysql", "version": "8.0" }, "metadata": { "command": "current_mysql_version", "reason": "OK", "result": 1, "version": 1 } }