O serviço MySQL não será iniciado devido ao erro Apparmor

1

Então eu acabei de atualizar do Ubuntu Server 14.04 para o 16.04, mas estou tendo problemas para fazer o MySQL 5.7 começar a rodar. Eu recebo os erros abaixo;

2017-08-21T10:02:39.769552Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2017-08-21T10:02:39.769640Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2017-08-21T10:02:39.922215Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-08-21T10:02:39.923667Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.19-0ubuntu0.16.04.1) starting as process 5469 ...
2017-08-21T10:02:39.927514Z 0 [Note] InnoDB: PUNCH HOLE support available
2017-08-21T10:02:39.927541Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2017-08-21T10:02:39.927548Z 0 [Note] InnoDB: Uses event mutexes
2017-08-21T10:02:39.927554Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2017-08-21T10:02:39.927560Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2017-08-21T10:02:39.927566Z 0 [Note] InnoDB: Using Linux native AIO
2017-08-21T10:02:39.927812Z 0 [Note] InnoDB: Number of pools: 1
2017-08-21T10:02:39.927920Z 0 [Note] InnoDB: Using CPU crc32 instructions
2017-08-21T10:02:39.929437Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2017-08-21T10:02:39.938768Z 0 [Note] InnoDB: Completed initialization of buffer pool
2017-08-21T10:02:39.940687Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2017-08-21T10:02:39.952276Z 0 [Note] InnoDB: Highest supported file format is Barracuda.
2017-08-21T10:02:39.962900Z 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2017-08-21T10:02:39.962987Z 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2017-08-21T10:02:39.976448Z 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2017-08-21T10:02:39.978050Z 0 [Note] InnoDB: 96 redo rollback segment(s) found. 96 redo rollback segment(s) are active.
2017-08-21T10:02:39.978083Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) are active.
2017-08-21T10:02:39.979411Z 0 [Note] InnoDB: Waiting for purge to start
2017-08-21T10:02:40.029663Z 0 [Note] InnoDB: 5.7.19 started; log sequence number 13724963
2017-08-21T10:02:40.029990Z 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2017-08-21T10:02:40.030241Z 0 [Note] Plugin 'FEDERATED' is disabled.
2017-08-21T10:02:40.032694Z 0 [Note] InnoDB: Buffer pool(s) load completed at 170821 13:02:40
2017-08-21T10:02:40.035955Z 0 [ERROR] unknown variable 'Max_heap_table_size=380M'
2017-08-21T10:02:40.035992Z 0 [ERROR] Aborting

2017-08-21T10:02:40.036009Z 0 [Note] Binlog end
2017-08-21T10:02:40.036101Z 0 [Note] Shutting down plugin 'ngram'
2017-08-21T10:02:40.036132Z 0 [Note] Shutting down plugin 'partition'
2017-08-21T10:02:40.036142Z 0 [Note] Shutting down plugin 'BLACKHOLE'
2017-08-21T10:02:40.036151Z 0 [Note] Shutting down plugin 'ARCHIVE'
2017-08-21T10:02:40.036159Z 0 [Note] Shutting down plugin 'CSV'
2017-08-21T10:02:40.036168Z 0 [Note] Shutting down plugin 'INNODB_SYS_VIRTUAL'
2017-08-21T10:02:40.036176Z 0 [Note] Shutting down plugin 'INNODB_SYS_DATAFILES'
2017-08-21T10:02:40.036184Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESPACES'
2017-08-21T10:02:40.036205Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN_COLS'
2017-08-21T10:02:40.036211Z 0 [Note] Shutting down plugin 'INNODB_SYS_FOREIGN'
2017-08-21T10:02:40.036218Z 0 [Note] Shutting down plugin 'INNODB_SYS_FIELDS'
2017-08-21T10:02:40.036224Z 0 [Note] Shutting down plugin 'INNODB_SYS_COLUMNS'
2017-08-21T10:02:40.036230Z 0 [Note] Shutting down plugin 'INNODB_SYS_INDEXES'
2017-08-21T10:02:40.036239Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLESTATS'
2017-08-21T10:02:40.036246Z 0 [Note] Shutting down plugin 'INNODB_SYS_TABLES'
2017-08-21T10:02:40.036255Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_TABLE'
2017-08-21T10:02:40.036262Z 0 [Note] Shutting down plugin 'INNODB_FT_INDEX_CACHE'
2017-08-21T10:02:40.036268Z 0 [Note] Shutting down plugin 'INNODB_FT_CONFIG'
2017-08-21T10:02:40.036277Z 0 [Note] Shutting down plugin 'INNODB_FT_BEING_DELETED'
2017-08-21T10:02:40.036291Z 0 [Note] Shutting down plugin 'INNODB_FT_DELETED'
2017-08-21T10:02:40.036323Z 0 [Note] Shutting down plugin 'INNODB_FT_DEFAULT_STOPWORD'
2017-08-21T10:02:40.036331Z 0 [Note] Shutting down plugin 'INNODB_METRICS'
2017-08-21T10:02:40.036342Z 0 [Note] Shutting down plugin 'INNODB_TEMP_TABLE_INFO'
2017-08-21T10:02:40.036361Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_POOL_STATS'
2017-08-21T10:02:40.036383Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE_LRU'
2017-08-21T10:02:40.036390Z 0 [Note] Shutting down plugin 'INNODB_BUFFER_PAGE'
2017-08-21T10:02:40.036404Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX_RESET'
2017-08-21T10:02:40.036413Z 0 [Note] Shutting down plugin 'INNODB_CMP_PER_INDEX'
2017-08-21T10:02:40.036420Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM_RESET'
2017-08-21T10:02:40.036427Z 0 [Note] Shutting down plugin 'INNODB_CMPMEM'
2017-08-21T10:02:40.036433Z 0 [Note] Shutting down plugin 'INNODB_CMP_RESET'
2017-08-21T10:02:40.036446Z 0 [Note] Shutting down plugin 'INNODB_CMP'
2017-08-21T10:02:40.036456Z 0 [Note] Shutting down plugin 'INNODB_LOCK_WAITS'
2017-08-21T10:02:40.036471Z 0 [Note] Shutting down plugin 'INNODB_LOCKS'
2017-08-21T10:02:40.036479Z 0 [Note] Shutting down plugin 'INNODB_TRX'
2017-08-21T10:02:40.036488Z 0 [Note] Shutting down plugin 'InnoDB'
2017-08-21T10:02:40.036582Z 0 [Note] InnoDB: FTS optimize thread exiting.
2017-08-21T10:02:40.036787Z 0 [Note] InnoDB: Starting shutdown...
2017-08-21T10:02:40.137057Z 0 [Note] InnoDB: Dumping buffer pool(s) to /var/lib/mysql/ib_buffer_pool
2017-08-21T10:02:40.137346Z 0 [Note] InnoDB: Buffer pool(s) dump completed at 170821 13:02:40
2017-08-21T10:02:41.646864Z 0 [Note] InnoDB: Shutdown completed; log sequence number 13724982
2017-08-21T10:02:41.650685Z 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2017-08-21T10:02:41.650720Z 0 [Note] Shutting down plugin 'PERFORMANCE_SCHEMA'
2017-08-21T10:02:41.650836Z 0 [Note] Shutting down plugin 'MRG_MYISAM'
2017-08-21T10:02:41.650864Z 0 [Note] Shutting down plugin 'MyISAM'
2017-08-21T10:02:41.650898Z 0 [Note] Shutting down plugin 'MEMORY'
2017-08-21T10:02:41.650909Z 0 [Note] Shutting down plugin 'sha256_password'
2017-08-21T10:02:41.650931Z 0 [Note] Shutting down plugin 'mysql_native_password'
2017-08-21T10:02:41.651224Z 0 [Note] Shutting down plugin 'binlog'
2017-08-21T10:02:41.651494Z 0 [Note] /usr/sbin/mysqld: Shutdown complete

serviço status do mysql

● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Mon 2017-08-21 13:23:29 EAT; 4s ago
  Process: 9984 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 9975 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 9984 (code=exited, status=1/FAILURE);         : 9985 (mysql-systemd-s)
   CGroup: /system.slice/mysql.service
           └─control
             ├─ 9985 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─10021 sleep 1

Aug 21 13:23:29 loghost systemd[1]: Starting MySQL Community Server...
Aug 21 13:23:31 loghost systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

tail -f / var / log / syslog | grep apparmor

Aug 21 13:23:30 loghost kernel: [ 9839.617741] audit: type=1400 audit(1503311009.999:726): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/9984/status" pid=9984 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=110 ouid=110
Aug 21 13:23:30 loghost kernel: [ 9839.617789] audit: type=1400 audit(1503311009.999:727): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/sys/devices/system/node/" pid=9984 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=110 ouid=0
Aug 21 13:23:30 loghost kernel: [ 9839.617878] audit: type=1400 audit(1503311009.999:728): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/proc/9984/status" pid=9984 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=110 ouid=110

Por favor, informe ou me aponte na direção certa

    
por MissAkiiki 21.08.2017 / 12:26

1 resposta

3

2017-08-21T10:02:40.035955Z 0 [ERROR] unknown variable 'Max_heap_table_size=380M'

Parece que este é provavelmente um bom lugar para começar. Você pode ter certeza de que esta diretiva está no lugar certo em seu arquivo de configuração? Deve estar na seção [mysqld] .

Analisei seus erros do AppArmor e parece que essas falhas de auditoria provavelmente não afetarão o servidor em execução - só preciso corrigir a configuração do servidor.

    
por velinath 21.08.2017 / 13:08