title: cannot start multiple mysql instance with mysqld_multi
body: <p>I'm newbie on mysql. And today I tried to run multiple mysql instance with mysqld_multi with mysql 5.7.13 on Ubuntu 16.</p>
  
  <p>My problems is when I execute cmd "mysqld_multi start --no-log", instances are not running. And I don't know what the error is according to the error log in syslog.</p>
  
  <p>this is output:</p>
  
  <pre><code>root@ubuntu:/var/run/mysqld# mysqld_multi start --no-log
  mysqld_multi log file version 2.16; run: Wed Aug 24 05:07:23 2016
  
  Starting MySQL servers
  root@ubuntu:/var/run/mysqld# 2016-08-24T12:07:25.411476Z mysqld_safe Logging to syslog.
  2016-08-24T12:07:25.413934Z mysqld_safe Logging to syslog.
  2016-08-24T12:07:25.457022Z mysqld_safe Logging to '/var/log/mysql/error.log'.
  2016-08-24T12:07:25.464033Z mysqld_safe Logging to '/var/log/mysql/error.log'.
  2016-08-24T12:07:25.708791Z mysqld_safe Starting mysqld daemon with databases from /data/mysql/mysql1
  2016-08-24T12:07:25.707895Z mysqld_safe Starting mysqld daemon with databases from /data/mysql/mysql7
  2016-08-24T12:07:27.349043Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld7.pid ended
  2016-08-24T12:07:27.360686Z mysqld_safe mysqld from pid file /var/run/mysqld/mysqld1.pid ended
  </code></pre>
  
  <p>Mysql servers are not running:</p>
  
  <pre><code>root@ubuntu:/var/run/mysqld# mysqld_multi report
  Reporting MySQL servers
  MySQL server from group: mysqld1 is not running
  MySQL server from group: mysqld7 is not running
  </code></pre>
  
  <p>and this is the log in syslog:</p>
  
  <pre><code>root@ubuntu:/var/run/mysqld# tail -50 /var/log/syslog
  
  Aug 24 05:07:25 ubuntu mysqld_safe: Logging to '/var/log/mysql/error.log'.
  Aug 24 05:07:25 ubuntu mysqld_safe: Logging to '/var/log/mysql/error.log'.
  Aug 24 05:07:25 ubuntu mysqld_safe: Starting mysqld daemon with databases from /data/mysql/mysql1
  Aug 24 05:07:25 ubuntu mysqld_safe: Starting mysqld daemon with databases from /data/mysql/mysql7
  Aug 24 05:07:27 ubuntu mysqld[33826]: /usr/sbin/mysqld (mysqld 5.7.13-0ubuntu0.16.04.2) starting as process 33826 ...
  Aug 24 05:07:27 ubuntu mysqld[33825]: /usr/sbin/mysqld (mysqld 5.7.13-0ubuntu0.16.04.2) starting as process 33825 ...
  Aug 24 05:07:27 ubuntu mysqld[33826]: Aborting
  Aug 24 05:07:27 ubuntu mysqld[33826]: Binlog end
  Aug 24 05:07:27 ubuntu mysqld[33826]: /usr/sbin/mysqld: Shutdown complete
  Aug 24 05:07:27 ubuntu mysqld[33825]: Aborting
  Aug 24 05:07:27 ubuntu mysqld[33825]: Binlog end
  Aug 24 05:07:27 ubuntu mysqld[33825]: /usr/sbin/mysqld: Shutdown complete
  Aug 24 05:07:27 ubuntu mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld7.pid ended
  Aug 24 05:07:27 ubuntu mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld1.pid ended
  </code></pre>
  
  <p>Here is the content of /etc/my.cnf</p>
  
  <pre><code>[mysqld_multi]
  mysqld     = /usr/bin/mysqld_safe
  mysqladmin = /usr/bin/mysqladmin
  user       = multi_admin
  password   = multipass
  
  [mysqld]
  user        = mysql
  pid-file    = /var/run/mysqld/mysqld.pid
  socket      = /var/run/mysqld/mysqld.sock
  port        = 3306
  basedir     = /usr
  datadir     = /var/lib/mysql
  
  [mysqld1]
  user        = mysql
  pid-file    = /var/run/mysqld/mysqld1.pid
  socket      = /var/run/mysqld/mysqld1.sock
  port        = 3307
  datadir     = /data/mysql/mysql1
  basedir     = /usr
  
  [mysqld7]
  user        = mysql
  pid-file    = /var/run/mysqld/mysqld7.pid
  socket      = /var/run/mysqld/mysqld7.sock
  port        = 3308
  datadir     = /data/mysql/mysql7
  basedir     = /usr
  </code></pre>
  
  <p>I think the permission is well:</p>
  
  <pre><code>root@ubuntu:/data/mysql# ll
  total 16
  drwxrwxrwx 4 mysql mysql 4096 Aug 24 01:06 ./
  drwxrwxrwx 3 mysql mysql 4096 Aug 23 23:48 ../
  drwxr-xr-x 5 mysql mysql 4096 Aug 24 05:07 mysql1/
  drwxr-xr-x 5 mysql mysql 4096 Aug 24 05:07 mysql7/
  </code></pre>
  
  <p>Permissions in /etc/apparmor.d/usr.sbin.mysqld are also modified:</p>
  
  <pre><code>/var/run/mysqld/mysqld1.pid rw,
  /var/run/mysqld/mysqld1.sock w,
  /var/lib/mysql1/ r,
  /var/lib/mysql1/** rwk,
  /var/log/mysql1/ r,
  /var/log/mysql1/* rw,
  /var/log/mysql1.log rw,
  /var/log/mysql1.err rw,
  /run/mysqld/mysqld1.pid rw,
  /run/mysqld/mysqld1.sock w,
  /data/mysql/mysql1/** rwk,
  /data/mysql/mysql1/ r,
  
  
  /var/run/mysqld/mysqld7.pid rw,
  /var/run/mysqld/mysqld7.sock w,
  /var/lib/mysql7/ r,
  /var/lib/mysql7/** rwk,
  /var/log/mysql7/ r,
  /var/log/mysql7/* rw,
  /var/log/mysql7.log rw,
  /var/log/mysql7.err rw,
  /run/mysqld/mysqld7.pid rw,
  /run/mysqld/mysqld7.sock w,
  /data/mysql/mysql7/** rwk,
  /data/mysql/mysql7/ r,
  </code></pre>
  
  <p>Why can't the instance start please?</p>