title: How to use a unix socket (mamp) instead of a port for sails js db connection?
body: <p>EDIT (SOLVED):</p>
  
  <p>Ok, thanks to Andrea, the issue has been solved. Strangely enough, both of these syntaxes seem to work:</p>
  
  <pre><code>/* 
    - adapter, not module 
    - host
    - port as socket
  */
  connections:{
    local_mysql:{
      adapter: 'sails-mysql', 
      host: 'localhost',
      user: 'root',
      password: 'root',
      port: '/Applications/MAMP/tmp/mysql/mysql.sock', /* socket path as a port */
      database: 'sailstest1'
    }
  }
  </code></pre>
  
  <p>--</p>
  
  <pre><code>/* 
    - module instead of adapter, but you can use both names
    - socketPath instead of port
    - no need for host
  */
  connections:{
    local_mysql:{
      module: 'sails-mysql',
      user: 'root',
      password: 'root',
      database: 'sailstest1',
      socketPath: '/Applications/MAMP/tmp/mysql/mysql.sock'
    }
  }
  </code></pre>
  
  <p>Both in my case are written in config/local.js</p>
  
  <hr>
  
  <p>I'm playing with Sailsjs. For now, I'd like to use the MAMP mysql server instead of installing a new one. I'd like to just connect to the db via socket connection, just like I do through SequelPro. The default MAMP socket is this:</p>
  
  <pre><code>/Applications/MAMP/tmp/mysql/mysql.sock
  </code></pre>
  
  <p>But where should I tell sails to use it? Standard docs only show the standard connection way:</p>
  
  <pre><code>  someMysqlServer: {
      adapter: 'sails-mysql',
      host: 'YOUR_MYSQL_SERVER_HOSTNAME_OR_IP_ADDRESS',
      user: 'YOUR_MYSQL_USER',
      password: 'YOUR_MYSQL_PASSWORD',
      database: 'YOUR_MYSQL_DB'
    },
  </code></pre>
  
  <p>Maybe I shoud write it somewhere else?</p>