title: 'Triggers can not be created on system tables' error when restoring MySQL database
body: <p>I had a large database up on AWS for a few months, but took it down because it was starting to get expensive.  </p>
  
  <p>Now, I have a single 32GB file on my hard drive, that I exported before I shut down the MySQL database running on the instance.  </p>
  
  <p>I'd like to import the 4 million rows or so into my local MySQL on my laptop.  </p>
  
  <p>Using MySQL Workbench, I attempted to do just that. But first, I recreated the exact same schema locally (just 3 tables). Then, using the Data Import option, I selected "Import from Self-Contained File", and pointed to my file.  I let it rip -- only to receive this disheartening message in response:  </p>
  
  <pre><code>01:56:30 PM Restoring /home/monica/dumps/Dump20160406.sql
  Running: mysql --defaults-file="/tmp/tmpMJpTQj/extraparams.cnf"  --protocol=tcp --host=127.0.0.1 --user=root --port=3306 --default-character-set=utf8 --comments --database=my_db  &lt; "/home/monica/dumps/Dump20160406.sql"
  ERROR 1465 (HY000) at line 488: Triggers can not be created on system tables  
  Operation failed with exitcode 1
  </code></pre>
  
  <p>It looks like there is some issue with triggers? First I'm a bit confused since my database never had any triggers to begin with.  </p>
  
  <p>To troubleshoot, I found t<a href="https://stackoverflow.com/questions/27360693/error-1465-triggers-can-not-be-created-on-system-tables-after-restore-from-sql">his SO question</a>, and I tried the advice -- I edited the my.conf file but it didn't make any difference.  </p>
  
  <p>Other searching caused me to come up blank. There's really nothing out there about this error that I can find.  </p>
  
  <p>If anyone has any advice, that would be great. Thanks.  </p>
  
  <p><strong>EDIT</strong>  </p>
  
  <p>I used some advice in the comments from @Solarflare and used this statement:  </p>
  
  <p><code>mysql -u root -p for_import -o &lt; /home/monica/dumps/Dump20160406.sql</code></p>
  
  <p>Actually, I discovered a cool utility called <a href="http://www.ivarch.com/programs/pv.shtml" rel="noreferrer">Pipe Viewer</a> which provided a progress bar -- visual proof (I hope) that something was actually happening.  So I rewrite the line to this:  </p>
  
  <p><code>pv /home/monica/dumps/Dump20160406.sql | mysql -u root -p -o for_import</code></p>
  
  <p>Sure enough, it looks like things were working and after 5 or so minutes, the import was completed:  </p>
  
  <p>34.1GB 0:08:19 [69.9MB/s] [==================================>] 100%  </p>
  
  <p>Nice! <strong>HOWEVER:</strong> when I <code>show databases</code> and then <code>use for_import</code> then <code>show tables</code>, I get:  </p>
  
  <p><code>Empty set (0.00 sec)</code>  My heart is broken.  :(</p>