title: How to set max_allowed_packet using php code?
body: <p>I am trying to set max_allowed_packet using php code but i get this error:</p>
  
  <blockquote>
    <p>WordPress database error Access denied; you need the SUPER privilege for this operation for query SET GLOBAL max_allowed_packet=16777216 made by require('wp-blog-header.php'), require_once('wp-load.php'), require_once('wp-config.php'), require_once('wp-settings.php'), include('/themes/supreme/functions.php')</p>
  </blockquote>
  
  <p>My PHP/Wordpress code is:</p>
  
  <pre><code>global $wpdb;
  if ( $wpdb ) {
      $wpdb-&gt;query( "SET GLOBAL max_allowed_packet=16777216" );
  }
  </code></pre>