$ sudo aa-disable /usr/sbin/mysqld
And reboot system
OR
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
OR
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo service apparmor reload
==> need to reboot
* /var/log/syslog
....
....
Jul 18 09:07:34 ubuntu systemd[1]: Starting MariaDB 10.2.16 database server...
Jul 18 09:07:34 ubuntu kernel: [46906.765575] audit: type=1400 audit(1531872454.473:174): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1228/status" pid=1228 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=120 ouid=120
Jul 18 09:07:34 ubuntu kernel: [46906.765581] audit: type=1400 audit(1531872454.473:175): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=1228 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=120 ouid=0
Jul 18 09:07:34 ubuntu kernel: [46906.765665] audit: type=1400 audit(1531872454.473:176): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/1228/status" pid=1228 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=120 ouid=120
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] /usr/sbin/mysqld (mysqld 10.2.16-MariaDB-10.2.16+maria~xenial-log) starting as process 1228 ...
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Uses event mutexes
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Compressed tables use zlib 1.2.8
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Using Linux native AIO
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Number of pools: 1
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Using SSE2 crc32 instructions
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Completed initialization of buffer pool
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139822703924992 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Highest supported file format is Barracuda.
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: 128 out of 128 rollback segments are active.
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Creating shared tablespace for temporary tables
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: Waiting for purge to start
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] InnoDB: 5.7.22 started; log sequence number 2477609
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139822391883520 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] Plugin 'FEEDBACK' is disabled.
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] Server socket created on IP: '127.0.0.1'.
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] Reading of all Master_info entries succeded
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] Added new Master_info '' to hash table
Jul 18 09:07:34 ubuntu mysqld[1228]: 2018-07-18 9:07:34 139823637936320 [Note] /usr/sbin/mysqld: ready for connections.
Jul 18 09:07:34 ubuntu mysqld[1228]: Version: '10.2.16-MariaDB-10.2.16+maria~xenial-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
Jul 18 09:07:34 ubuntu kernel: [46907.185353] audit: type=1400 audit(1531872454.893:177): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:07:35 ubuntu mysqld[1228]: 2018-07-18 9:07:35 139822391883520 [Note] InnoDB: Buffer pool(s) load completed at 180718 9:07:35
Jul 18 09:09:04 ubuntu systemd[1]: mariadb.service: Start operation timed out. Terminating.
Jul 18 09:09:04 ubuntu mysqld[1228]: 2018-07-18 9:09:04 139823134938880 [Note] /usr/sbin/mysqld (initiated by: unknown): Normal shutdown
Jul 18 09:09:04 ubuntu mysqld[1228]: 2018-07-18 9:09:04 139823134938880 [Note] Event Scheduler: Purging the queue. 0 events
Jul 18 09:09:04 ubuntu mysqld[1228]: 2018-07-18 9:09:04 139822576424704 [Note] InnoDB: FTS optimize thread exiting.
Jul 18 09:09:04 ubuntu kernel: [46996.735275] audit: type=1400 audit(1531872544.442:178): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:04 ubuntu mysqld[1228]: 2018-07-18 9:09:04 139823134938880 [Note] InnoDB: Starting shutdown...
Jul 18 09:09:04 ubuntu mysqld[1228]: 2018-07-18 9:09:04 139822391883520 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
Jul 18 09:09:04 ubuntu mysqld[1228]: 2018-07-18 9:09:04 139822391883520 [Note] InnoDB: Buffer pool(s) dump completed at 180718 9:09:04
Jul 18 09:09:04 ubuntu kernel: [46996.765629] audit: type=1400 audit(1531872544.473:179): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:04 ubuntu kernel: [46996.865465] audit: type=1400 audit(1531872544.573:180): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:04 ubuntu kernel: [46996.965630] audit: type=1400 audit(1531872544.673:181): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:04 ubuntu kernel: [46997.065785] audit: type=1400 audit(1531872544.773:182): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:04 ubuntu kernel: [46997.165939] audit: type=1400 audit(1531872544.873:183): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:04 ubuntu kernel: [46997.165945] audit: type=1400 audit(1531872544.873:184): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:04 ubuntu kernel: [46997.166594] audit: type=1400 audit(1531872544.874:185): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:05 ubuntu mysqld[1228]: 2018-07-18 9:09:05 139823134938880 [Note] InnoDB: Shutdown completed; log sequence number 2477637
Jul 18 09:09:05 ubuntu mysqld[1228]: 2018-07-18 9:09:05 139823134938880 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
Jul 18 09:09:05 ubuntu mysqld[1228]: 2018-07-18 9:09:05 139823134938880 [Note] /usr/sbin/mysqld: Shutdown complete
Jul 18 09:09:05 ubuntu kernel: [46997.694033] audit: type=1400 audit(1531872545.401:186): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:05 ubuntu kernel: [46997.694287] audit: type=1400 audit(1531872545.401:187): apparmor="DENIED" operation="sendmsg" info="Failed name lookup - disconnected path" error=-13 profile="/usr/sbin/mysqld" name="run/systemd/notify" pid=1228 comm="mysqld" requested_mask="w" denied_mask="w" fsuid=120 ouid=0
Jul 18 09:09:05 ubuntu systemd[1]: Failed to start MariaDB 10.2.16 database server.
Jul 18 09:09:05 ubuntu systemd[1]: mariadb.service: Unit entered failed state.
Jul 18 09:09:05 ubuntu systemd[1]: mariadb.service: Failed with result 'timeout'.
....