I had spent a few hours on this with no resolution. Even with the mysql service running as root, it failed to get permissions to write to a data directory other than /var/lib/mysql (or whatever the default is if that's wrong). Even with apparmor configured to allow the new data directory, and even in complain mode, it still failed to read/write files in the new datadir or couldn't open a socket. My fix was moving my data to the location; mounting a device to /var/lib/mysql. On Tue, Jun 21, 2016 at 11:43 AM, Mitch Claborn