o mysql não inicia após a atualização para o 5.6 - Permissão negada

1

Estou executando o Ubuntu 14. Na semana passada, eu estava testando algumas ferramentas de PDF localmente e ao tentar instalar o pdftk ele mencionou algo sobre um problema de dependência e precisando atualizar minha instalação do 5.5 para o 5.6. Eu gostaria de salvar a saída, mas infelizmente eu não tenho isso. Até agora eu removi tudo mysql e tentei começar novamente, exceto pelas minhas configurações

root@ubuntu:~# dpkg --get-selections | grep -v deinstall | grep mysql
root@ubuntu:~# 

Tentando instalar mysql-server

root@ubuntu:~# apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
  mysql-client-5.6 mysql-client-core-5.6 mysql-common mysql-server-5.6
  mysql-server-core-5.6
Suggested packages:
  libmldbm-perl libnet-daemon-perl libplrpc-perl libsql-statement-perl tinyca
Recommended packages:
  mysql-common-5.6
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libmysqlclient18 libterm-readkey-perl
  mysql-client-5.6 mysql-client-core-5.6 mysql-common mysql-server
  mysql-server-5.6 mysql-server-core-5.6
0 upgraded, 10 newly installed, 0 to remove and 110 not upgraded.
Need to get 22.9 MB of archives.
After this operation, 166 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty/main libdbi-perl amd64 1.630-1 [879 kB]
Get:2 http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu/ trusty/main mysql-common all 5.6.25-3+deb.sury.org~trusty+1 [75.9 kB]
Get:3 http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu/ trusty/main libmysqlclient18 amd64 5.6.25-3+deb.sury.org~trusty+1 [738 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty/main libdbd-mysql-perl amd64 4.025-1 [99.3 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ trusty/main libterm-readkey-perl amd64 2.31-1 [27.4 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe mysql-client-core-5.6 amd64 5.6.27-0ubuntu0.14.04.1 [4,481 kB]
Get:7 http://ppa.launchpad.net/ondrej/mysql-5.6/ubuntu/ trusty/main mysql-server all 5.6.25-3+deb.sury.org~trusty+1 [73.4 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe mysql-client-5.6 amd64 5.6.27-0ubuntu0.14.04.1 [5,843 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe mysql-server-core-5.6 amd64 5.6.27-0ubuntu0.14.04.1 [4,858 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe mysql-server-5.6 amd64 5.6.27-0ubuntu0.14.04.1 [5,826 kB]
Fetched 22.9 MB in 6s (3,666 kB/s)                                             
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 239594 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.6.25-3+deb.sury.org~trusty+1_all.deb ...
Unpacking mysql-common (5.6.25-3+deb.sury.org~trusty+1) ...
Selecting previously unselected package libmysqlclient18:amd64.
Preparing to unpack .../libmysqlclient18_5.6.25-3+deb.sury.org~trusty+1_amd64.deb ...
Unpacking libmysqlclient18:amd64 (5.6.25-3+deb.sury.org~trusty+1) ...
Selecting previously unselected package libdbi-perl.
Preparing to unpack .../libdbi-perl_1.630-1_amd64.deb ...
Unpacking libdbi-perl (1.630-1) ...
Selecting previously unselected package libdbd-mysql-perl.
Preparing to unpack .../libdbd-mysql-perl_4.025-1_amd64.deb ...
Unpacking libdbd-mysql-perl (4.025-1) ...
Selecting previously unselected package libterm-readkey-perl.
Preparing to unpack .../libterm-readkey-perl_2.31-1_amd64.deb ...
Unpacking libterm-readkey-perl (2.31-1) ...
Selecting previously unselected package mysql-client-core-5.6.
Preparing to unpack .../mysql-client-core-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-core-5.6 (5.6.27-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-client-5.6.
Preparing to unpack .../mysql-client-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-client-5.6 (5.6.27-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server-core-5.6.
Preparing to unpack .../mysql-server-core-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-core-5.6 (5.6.27-0ubuntu0.14.04.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up mysql-common (5.6.25-3+deb.sury.org~trusty+1) ...
Selecting previously unselected package mysql-server-5.6.
(Reading database ... 239961 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.6_5.6.27-0ubuntu0.14.04.1_amd64.deb ...
Unpacking mysql-server-5.6 (5.6.27-0ubuntu0.14.04.1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../mysql-server_5.6.25-3+deb.sury.org~trusty+1_all.deb ...
Unpacking mysql-server (5.6.25-3+deb.sury.org~trusty+1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
ureadahead will be reprofiled on next reboot
Setting up libmysqlclient18:amd64 (5.6.25-3+deb.sury.org~trusty+1) ...
Setting up libdbi-perl (1.630-1) ...
Setting up libdbd-mysql-perl (4.025-1) ...
Setting up libterm-readkey-perl (2.31-1) ...
Setting up mysql-client-core-5.6 (5.6.27-0ubuntu0.14.04.1) ...
Setting up mysql-client-5.6 (5.6.27-0ubuntu0.14.04.1) ...
Setting up mysql-server-core-5.6 (5.6.27-0ubuntu0.14.04.1) ...
Setting up mysql-server-5.6 (5.6.27-0ubuntu0.14.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.6; however:
  Package mysql-server-5.6 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Erors were encountered while processing:
 mysql-server-5.6
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@ubuntu:~# 

Eu vi em alguma outra pergunta SO para depurar o script de inicialização como este

root@ubuntu:~# bash -xv /etc/init.d/mysql start
#!/bin/bash
#
### BEGIN INIT INFO

... <snipped out the script it dumps> ...

esac
+ case "${1:-''}" in
+ sanity_checks
+ '[' '!' -r /etc/mysql/my.cnf ']'
mysqld_get_param datadir
++ mysqld_get_param datadir
++ /usr/sbin/mysqld --print-defaults
++ tr ' ' '\n'
++ tail -n 1
++ cut -d= -f2
++ grep -- --datadir
/usr/sbin/mysqld: Can't read dir of '/etc/mysql/mysql.conf.d/' (Errcode: 13 - Permission denied)
Fatal error in defaults handling. Program aborted
+ datadir=
+ LC_ALL=C
+ tail -n 1
+ BLOCKSIZE=
+ df --portability /.
+ awk '{ exit ($4>4096) }'
+ log_daemon_msg 'Starting MySQL database server' mysqld
+ '[' -z 'Starting MySQL database server' ']'
+ log_use_fancy_output
+ TPUT=/usr/bin/tput
+ EXPR=/usr/bin/expr
+ '[' -t 1 ']'
+ '[' xxterm '!=' x ']'
+ '[' xxterm '!=' xdumb ']'
+ '[' -x /usr/bin/tput ']'
+ '[' -x /usr/bin/expr ']'
+ /usr/bin/tput hpa 60
+ /usr/bin/tput setaf 1
+ '[' -z ']'
+ FANCYTTY=1
+ case "$FANCYTTY" in
+ true
+ /usr/bin/tput xenl
$TPUT cols
++ /usr/bin/tput cols
+ COLS=80
+ '[' 80 ']'
+ '[' 80 -gt 6 ']'
$EXPR $COLS - 7
++ /usr/bin/expr 80 - 7
+ COL=73
+ log_use_plymouth
+ '[' n = y ']'
+ plymouth --ping
+ printf ' * Starting MySQL database server mysqld       '
 * Starting MySQL database server mysqld       $EXPR $COLS - 1
++ /usr/bin/expr 80 - 1
+ /usr/bin/tput hpa 79
                                                                               + printf ' '
 + mysqld_status check_alive nowarn
$MYADMIN ping 2>&1
++ /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping
+ ping_output='/usr/bin/mysqladmin: connect to server at '\''localhost'\'' failed
error: '\''Can'\''t connect to local MySQL server through socket '\''/var/run/mysqld/mysqld.sock'\'' (2)'\''
Check that mysqld is running and that the socket: '\''/var/run/mysqld/mysqld.sock'\'' exists!'
+ ping_alive=0
+ ps_alive=0

Mas todas as minhas permissões parecem estar lá

root@ubuntu:~# ll /etc/mysql/
total 40
drwxr-xr-x   4 root root  4096 Dec 15 07:43 ./
drwxr-xr-x 163 root root 12288 Dec 15 07:43 ../
drwxr-xr-x   2 root root  4096 Dec 15 07:43 conf.d/
-rw-------   1 root root   333 Dec 31  2013 debian.cnf
-rwxr-xr-x   1 root root  1220 Oct 26 19:25 debian-start*
lrwxrwxrwx   1 root root    24 Oct 14 13:41 my.cnf -> /etc/alternatives/my.cnf
-rw-r--r--   1 root root   839 Sep  8 10:17 my.cnf.fallback
-rw-r--r--   1 root root   682 Sep  8 10:17 mysql.cnf
drwxr-xr-x   2 root root  4096 Oct 14 13:42 mysql.conf.d/
root@ubuntu:~# ll /etc/mysql/mysql.conf.d/
total 16
drwxr-xr-x 2 root root 4096 Oct 14 13:42 ./
drwxr-xr-x 4 root root 4096 Dec 15 07:43 ../
-rw-r--r-- 1 root root 3025 Oct 14 13:44 mysqld.cnf
-rw-r--r-- 1 root root   21 Sep  8 10:17 mysqld_safe_syslog.cnf
root@ubuntu:~# ll /etc/mysql/conf.d/
total 20
drwxr-xr-x 2 root root 4096 Dec 15 07:43 ./
drwxr-xr-x 4 root root 4096 Dec 15 07:43 ../
-rw-r--r-- 1 root root    8 Sep  8 10:17 mysql.cnf
-rw-r--r-- 1 root root   21 Oct 22  2013 mysqld_safe_syslog.cnf
-rw-r--r-- 1 root root   55 Sep  8 10:17 mysqldump.cnf
root@ubuntu:~# 

O que mais poderia estar causando esse erro de permissão?

    
por chrisan 15.12.2015 / 14:03

0 respostas

Tags