title: Service mysql start failed
body: <p>I get this error when I try to start <code>mysql</code> with <code>service mysql start</code> under a Debian machine (a Docker container actually):</p>
  
  <blockquote>
    <p>[FAIL] Starting MySQL database server: mysqld . . . . . failed!</p>
  </blockquote>
  
  <p>I think the problem is in the Debian itself, but I'll explain the context just in case. I have the following context:</p>
  
  <blockquote>
    <p>A Debian Docker container based in <a href="https://github.com/nzurita/lamp" rel="nofollow noreferrer">this image</a> running over an Ubuntu 18.04 host.</p>
  </blockquote>
  
  <p>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.</p>
  
  <p>If I try <code>sh -x /etc/init.d/mysql start</code> to get some feedback info all I get is messages like:</p>
  
  <blockquote>
    <p>+ echo -n Starting MySQL database server: mysqld</p>
    
    <p>Starting MySQL database server: mysqld+ log_daemon_msg_post Starting MySQL database server mysqld</p>
    
    <p>+ :</p>
    
    <p>+ mysqld_status check_alive nowarn</p>
    
    <p>+ /usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf ping</p>
    
    <p>+ ping_output=/usr/bin/mysqladmin: connect to server at 'localhost' failed</p>
    
    <p>error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'</p>
    
    <p>Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!</p>
  </blockquote>
  
  <p>I'm quite stucked in this, I've been several days searching and moving in circles to no avail.</p>
  
  <p><strong>EDIT:</strong> I'll add some tries and fails I did in order to get some output or logging:</p>
  
  <pre><code>$/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
  </code></pre>