I get this error when I try to start mysql
with service mysql start
under a Debian machine (a Docker container actually):
[FAIL] Starting MySQL database server: mysqld . . . . . failed!
I think the problem is in the Debian itself, but I'll explain the context just in case. I have the following context:
A Debian Docker container based in this image running over an Ubuntu 18.04 host.
This container was runninng properly in previous Ubuntu 16.04 and actually is still running in another computer with Ubuntu 16.04. Of course, the container has been rebuilt in new OS.
If I try sh -x /etc/init.d/mysql start
to get some feedback info all I get is messages like:
+ echo -n Starting MySQL database server: mysqld
Starting MySQL database server: mysqld+ log_daemon_msg_post Starting MySQL database server mysqld
+ :
+ mysqld_status check_alive nowarn
+ /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!
I'm quite stucked in this, I've been several days searching and moving in circles to no avail.
EDIT: I'll add some tries and fails I did in order to get some output or logging:
$/usr/bin/mysqld_safe -v
181010 15:30:51 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take effect.
181010 15:30:51 mysqld_safe Logging to '/var/log/mysql/error.log'.
181010 15:30:51 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
181010 15:30:51 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
$mysqld --print-defaults
(empty output)
$mysqld --v
(empty output)
$tail -f /var/log/mysql/error.log
(last log entry is 1 month old)
180921 10:59:40 InnoDB: highest supported file format is Barracuda.
180921 10:59:40 InnoDB: Waiting for the background threads to start
180921 10:59:41 InnoDB: 5.5.60 started; log sequence number 1595675
ERROR: 1050 Table 'plugin' already exists
180921 10:59:41 [ERROR] Aborting
180921 10:59:41 InnoDB: Starting shutdown...
180921 10:59:42 InnoDB: Shutdown completed; log sequence number 1595675
180921 10:59:42 [Note] /usr/sbin/mysqld: Shutdown complete