Retrieving Default Database User Info
You can manage databases either in the database management tool (such as phpMyAdmin) or by connecting directly to the database server. To access a database in the database management tool, Plesk uses the default database user if no other user is specified. You can set any database user account as the default. If you create a new database, the first user created in the database will be set as the default database user.
Request Packet Structure
A request XML packet retrieving the default database user information includes the get-default-user operation node:
The get-default-user node is presented by type DatabaseGetDBInputType (
database_input.xsd), and its graphical representation is as follows:
- The filter node is required. Specifies the filtering rule. For more information, refer to the Available Filters section. Data type: DatabaseDefaultUserFilterType.
- The db-id node is optional. It specifies ID of a database. Data type: integer.
You can retrieve ID's of multiple default database users by using a single request packet. Add the get-default-user operation for each database to the request packet.
Important: When creating request packets, put nodes and elements in the order they follow in the packet structure.
Response Packet Structure
The get-default-user node of the output XML packet is presented by type DatabaseGetDefaultUserOutputType (
database_output.xsd) and structured as follows:
- The result node is required. It wraps the response retrieved from the server. Data type: resultType (
- The status node is required. It specifies the execution status of the get-default-user operation. Data type: string. Allowed values: ok | error.
- The errcode node is optional. Is returns the error code if the get-default-user operation fails. Data type: integer.
- The errtext node is optional. It returns the error message if the get-default-user operation fails. Data type: string.
- The filter-id node is optional. It returns the filtering rule parameter. For more information, refer to the Available Filters section.
- The id node is required. It specifies the ID of the default database user. Data type: integer.
Retrieving information on the default database user
This packet retrieves a default database user of the database with ID 35.
A negative response from the server can look as follows:
Retrieving information on multiple default database users
This packet retrieves default database users of all databases on all database servers available for the packet sender.