Eu tenho um servidor raiz executando ubuntu-16.04-x86_64
. Eu quero instalar (a versão mais nova / estável do) MySQL.
Mas, por algum motivo, não está funcionando. Isso é o que eu tenho no console:
Welcome to Ubuntu 16.04.2 LTS (GNU/Linux 3.10.0 x86_64)
root@myusername:~# apt-get update
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:4 http://archive.canonical.com/ubuntu xenial InRelease
Fetched 204 kB in 0s (272 kB/s)
Reading package lists... Done
root@myusername:~# sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.7.20-0ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 139 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up mysql-server-5.7 (5.7.20-0ubuntu0.16.04.1) ...
Renaming removed key_buffer and myisam-recover options (if present)
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.7 (--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.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@myusername:~# journalctl -xe
-- Unit mysql.service has begun shutting down.
Dec 25 11:23:34 myusername.delta-networks.de systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Dec 25 11:23:35 myusername.delta-networks.de systemd[1]: Reloading.
Dec 25 11:23:35 myusername.delta-networks.de systemd[1]: [/lib/systemd/system/vzfifo.service:19] Support for option SysVStartPriority= has been
Dec 25 11:23:35 myusername.delta-networks.de systemd[1]: Reloading.
Dec 25 11:23:35 myusername.delta-networks.de systemd[1]: [/lib/systemd/system/vzfifo.service:19] Support for option SysVStartPriority= has been
Dec 25 11:23:35 myusername.delta-networks.de systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Dec 25 11:23:36 myusername.delta-networks.de systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has failed.
--
-- The result is failed.
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: mysql.service: Unit entered failed state.
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: mysql.service: Failed with result 'exit-code'.
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: Stopped MySQL Community Server.
-- Subject: Unit mysql.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished shutting down.
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has begun starting up.
Dec 25 11:24:06 myusername.delta-networks.de sudo[5443]: pam_unix(sudo:session): session closed for user root
Dec 25 11:24:08 myusername.delta-networks.de systemd[1]: Started MySQL Community Server.
-- Subject: Unit mysql.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mysql.service has finished starting up.
--
-- The start-up result is done.
lines 1027-1076/1076 (END)
root@myusername:~# systemctl status mysql.service
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2017-12-25 11:24:08 CET; 34s ago
Process: 5654 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)
Process: 5647 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 5653 (mysqld)
CGroup: /system.slice/mysql.service
└─5653 /usr/sbin/mysqld
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: Stopped MySQL Community Server.
Dec 25 11:24:06 myusername.delta-networks.de systemd[1]: Starting MySQL Community Server...
Dec 25 11:24:08 myusername.delta-networks.de systemd[1]: Started MySQL Community Server.
root@myusername:~#
Primeiro, eu fiz apt-get update
: sem erros.
Como você pode ver, recebo vários erros. Mas executando sudo apt-get install mysql-server
recebo vários erros e a sugestão See "systemctl status mysql.service" and "journalctl -xe" for details.
Alguém sabe o que estou fazendo errado? Alguma dica?