Index: src/wp-admin/includes/class-wp-debug-data.php
===================================================================
--- src/wp-admin/includes/class-wp-debug-data.php	(revision 51521)
+++ src/wp-admin/includes/class-wp-debug-data.php	(working copy)
@@ -925,6 +925,21 @@
 			'private' => true,
 		);
 
+		$info['wp-database']['fields']['max_allowed_packet'] = array(
+			'label' => __( 'Max allowed packet size' ),
+			'value' => self::get_mysql_var( 'max_allowed_packet' ),
+		);
+
+		$info['wp-database']['fields']['max_connections'] = array(
+			'label' => __( 'Max connections number' ),
+			'value' => self::get_mysql_var( 'max_connections' ),
+		);
+
+		$info['wp-database']['fields']['query_cache_size'] = array(
+			'label' => __( 'Query cache size' ),
+			'value' => self::get_mysql_var( 'query_cache_size' ),
+		);
+
 		// List must use plugins if there are any.
 		$mu_plugins = get_mu_plugins();
 
@@ -1445,6 +1460,29 @@
 	}
 
 	/**
+	 * Returns the value of a MySQL variable.
+	 *
+	 * @since 5.9.0
+	 *
+	 * @param string $var Name of the MySQL variable.
+	 * @return string|null The variable value on success. Null if the variable does not exist.
+	 */
+	public static function get_mysql_var( $var ) {
+		global $wpdb;
+
+		$result = $wpdb->get_row(
+			$wpdb->prepare( 'SHOW VARIABLES LIKE %s', $var ),
+			ARRAY_A
+		);
+
+		if ( ! empty( $result ) && array_key_exists( 'Value', $result ) ) {
+			return $result['Value'];
+		}
+
+		return null;
+	}
+
+	/**
 	 * Format the information gathered for debugging, in a manner suitable for copying to a forum or support ticket.
 	 *
 	 * @since 5.2.0
