mysql falha ao iniciar com a versão 16.04.1

0

O MySQL está falhando no Ubuntu 16.04

Código do erro:

mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Tue 2016-11-29 15:13:28 EST; 28s ago
  Process: 4925 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
  Process: 4922 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 4925 (code=exited, status=1/FAILURE);         : 4927 (mysql-systemd-s)
    Tasks: 2
   Memory: 580.0K
      CPU: 632ms
   CGroup: /system.slice/mysql.service
           └─control
             ├─4927 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─5014 sleep 1

    Nov 29 15:13:28 vmdb-master systemd[1]: Starting MySQL Community Server...
    Nov 29 15:13:29 vmdb-master systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
===========================================
2016-11-29T20:53:54.626501Z 0 [Warning] Changed limits: max_open_files: 1024 (requested 5000)
2016-11-29T20:53:54.626576Z 0 [Warning] Changed limits: table_open_cache: 431 (requested 2000)
2016-11-29T20:53:54.785332Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2016-11-29T20:53:54.785371Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2016-11-29T20:53:54.785490Z 0 [Warning] Can't create test file /mnt/raid0/mysql/vmdb-master.lower-test
2016-11-29T20:53:54.785542Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.16-0ubuntu0.16.04.1) starting as process 5291 ...
2016-11-29T20:53:54.788939Z 0 [Warning] Can't create test file /mnt/raid0/mysql/vmdb-master.lower-test
2016-11-29T20:53:54.788990Z 0 [Warning] Can't create test file /mnt/raid0/mysql/vmdb-master.lower-test
2016-11-29T20:53:54.791836Z 0 [Note] InnoDB: PUNCH HOLE support available
2016-11-29T20:53:54.791887Z 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-11-29T20:53:54.791895Z 0 [Note] InnoDB: Uses event mutexes
2016-11-29T20:53:54.791918Z 0 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2016-11-29T20:53:54.791925Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.8
2016-11-29T20:53:54.791931Z 0 [Note] InnoDB: Using Linux native AIO
2016-11-29T20:53:54.792247Z 0 [Note] InnoDB: Number of pools: 1
2016-11-29T20:53:54.792376Z 0 [Note] InnoDB: Using CPU crc32 instructions
2016-11-29T20:53:54.794969Z 0 [Note] InnoDB: Initializing buffer pool, total size = 4G, instances = 8, chunk size = 128M
2016-11-29T20:53:55.097378Z 0 [Note] InnoDB: Completed initialization of buffer pool
2016-11-29T20:53:55.132818Z 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2016-11-29T20:53:55.142992Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2016-11-29T20:53:55.143032Z 0 [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable
2016-11-29T20:53:55.143043Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2016-11-29T20:53:55.744170Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2016-11-29T20:53:55.744194Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2016-11-29T20:53:55.744207Z 0 [ERROR] Failed to initialize plugins.
2016-11-29T20:53:55.744214Z 0 [ERROR] Aborting

2016-11-29T20:53:55.744223Z 0 [Note] Binlog end
2016-11-29T20:53:55.744291Z 0 [Note] Shutting down plugin 'CSV'
2016-11-29T20:53:55.744301Z 0 [Note] Shutting down plugin 'MyISAM'
2016-11-29T20:53:55.744627Z 0 [Note] /usr/sbin/mysqld: Shutdown complete
--------------------------------------------

o diretório onde os arquivos estão localizados está configurado para 777 e ainda está reclamando que não pode escrever.

    
por Michael 29.11.2016 / 21:18

2 respostas

0

Seu erro é mencionado aqui:

2016-11-29T20: 53: 55.142992Z 0 [ERROR] InnoDB: O arquivo de dados innodb_system 'ibdata1' deve ser gravável

Você deve usar o sudo para iniciar o serviço mysql ou ter certeza de que a conta do usuário que está iniciando o serviço mysql tem acesso de gravação no local onde innodb_system

    
por Ashu 29.11.2016 / 22:12
0

RESPOSTA:

teve que editar /etc/apparmor.d/usr.sbin/mysqld e adicionar a localização real da instalação do mysql. Não sei por que ele não tinha essa informação antes ou como ela estava sendo executada sem ela, mas era o acesso do mysql ao DENYING ao seu próprio diretório.

    
por Michael 30.11.2016 / 00:51

Tags