title: MySQL unable to import SQL that creates procedures
body: <p>I am using a hosted web service account that uses <code>cpanel</code> as its management system. When logged into <code>phpmyadmin</code>, I am trying to import an SQL file that contains tables and some procedures.</p>
  
  <pre><code>CREATE DEFINER=`root`@`localhost` PROCEDURE `getClientDashboardStatsMap` (IN `in_userID` INT)  BEGIN
  
          SELECT 
              rl.city,
              rl.state,
              rl.zip,
              rl.longitude,
              rl.latitude,
              rl.timestamp,
              count(rl.ID) as total
          FROM 
              crowd.redemption_log as rl
          JOIN
              reward as r
          ON 
              rl.rewardID = r.rewardID
          WHERE 
              r.userID = 1
          AND
              rl.timestamp BETWEEN NOW() - INTERVAL 30 DAY AND NOW()
          GROUP BY
              rl.city, rl.state, rl.zip
          ORDER BY 
              total DESC;
  
  END$$
  </code></pre>
  
  <p>When I try to run this, I get an error about needing super user privileges to do so. Doing some searching, people suggested removing the definer line like so:</p>
  
  <p><code>CREATE  PROCEDURE getClientDashboardStatsMap (IN in_userID INT)  BEGIN</code>.</p>
  
  <p>While this allows me to complete the import, I am running into another issue. The procedures are getting a default definer of <code>cpaneluser@localhost</code>. However, the database user that is set up is different than this user so the procedure has no permissions for things like <code>select, update, delete</code>. The database user is <code>cpaneluser_dbusername</code>, which is typical for hosted sites like this so you can associate databases with accounts.</p>
  
  <p>How else can I get this procedures to run, under the correct user? I don't see any settings in <code>PHPMYADMIN</code> for privileges in order to run these as a super user.</p>