This function retrieves the MySQL® database and user data for the specified account.
Important:
When you disable the MySQL/MariaDB role and remote MySQL is not already configured, the system disables this function.
HTTP Request was successful.
object | |
object |
whmapi1 --output=jsonpretty \ list_mysql_databases_and_users \ user='username'
{- "data": {
- "mysql_config": {
- "mysql-version": "5.5",
- "prefix_length": 8,
- "use_db_prefix": 1
}, - "mysql_databases": {
- "user1_database1": [
- "user1_user1"
], - "user2_database2": [
- "user2_user2"
]
}
}, - "metadata": {
- "command": "list_mysql_databases_and_users",
- "reason": "OK",
- "result": 1,
- "version": 1
}
}