title: Create index causes 'Lost connection to MySQL'
body: <p>I have a table which is defined like <a href="http://prntscr.com/6a0zcs" rel="noreferrer">this</a>. Where <code>ProviderId</code> is the primary key, and <code>StateID</code> is the foreign key, that comes from another table. It is running in my laptop, therefore, it is a local database. In my table I have around 9 million entries. I ran the following command to create a new index for the table: </p>
  
  <pre><code>CREATE INDEX name_addr ON providers (ProviderName, Address, StateID, Zip);
  </code></pre>
  
  <p>It ran around 10 minutes, and I got this error message:</p>
  
  <pre><code>Error Code: 2013. Lost connection to MySQL server during query - 600.547 sec
  </code></pre>
  
  <p>I checked my log, and the result was this:</p>
  
  <pre><code>150226 13:07:31    12 Query CREATE INDEX name_addr ON providers (ProviderName, Address, StateID, Zip)
  150226 13:17:32    13 Connect   root@localhost on 
             13 Query set autocommit=1
             13 Query SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ
             13 Query SHOW SESSION VARIABLES LIKE 'lower_case_table_names'
             13 Query SELECT current_user()
             13 Query SET CHARACTER SET utf8
             13 Query SET NAMES utf8
             13 Query SET SQL_SAFE_UPDATES=1
             13 Query SELECT CONNECTION_ID()
             13 Query SHOW SESSION STATUS LIKE 'Ssl_cipher'
             13 Query USE `workflydb`
             13 Query set autocommit=1
  </code></pre>
  
  <p>Although, I got an error message, when I checked my indexes, the result was <a href="http://prntscr.com/6a10nv" rel="noreferrer">this</a>. I don't know what the problem can be, and how to solve it, or whether my created index actually works. Any ideas?</p>