title: Not able to connect MySQL with Sails js
body: <p>I am using sails latest version(0.10.*), I am trying to connect mysql data base, but its throwing following error.</p>
  
  <blockquote>
    <p>info: Starting app...
    error: A hook (<code>orm</code>) failed to load!
    error: Error (E_UNKNOWN) :: Encountered an unexpected error
    : Query inactivity timeout
       at Query. >(/home/pavan/pavanwork/development/plotstoday/node_modules/sails->mysql/node_modules/mysql/lib/protocol/Protocol.js:154:17)
       at emitNone (events.js:67:13)
       at Query.emit (events.js:166:7)
       at Query._onTimeout >(/home/pavan/pavanwork/development/plotstoday/node_modules/sails->mysql/node_modules/mysql/lib/protocol/sequences/Sequence.js:116:8)
       at Timer.listOnTimeout (timers.js:9</p>
  </blockquote>
  
  <p>Configuration:</p>
  
  <p>config/connection.js</p>
  
  <pre><code>  mysqlServer: {
      adapter: 'sails-mysql',
      host: 'localhost',
      user: 'root',
      password: 'vtiger',
      database: 'plotstoday'
    },
  </code></pre>
  
  <p>config/model.js</p>
  
  <pre><code>module.exports.models = {
   connection: 'mysqlServer',
    migrate: 'alter'
  
  };
  </code></pre>
  
  <p>config/env/development.js</p>
  
  <pre><code>models: {
       //connection: 'localMongo'
       connection: 'mysqlServer'
     }
  </code></pre>
  
  <p>OS: Ubuntu 14.04 LTS
  Installed both sails-mysql adapter and node-mysql adapter.</p>
  
  <p>I even tried  giving host:127.0.0.1.</p>
  
  <p>Mysql is working fine from command-line, I tried the suggestion given</p>
  
  <pre><code>GRANT ALL PRIVILEGES ON sails.* TO 'homestead'@'%' WITH GRANT OPTION; 
  </code></pre>
  
  <p>(Reference : <a href="https://stackoverflow.com/questions/27406734/sails-can-not-connect-to-mysql">Sails can not connect to mySql</a>)</p>
  
  <p>Please suggest</p>