title: Problems installing mysql in ubuntu 18.04
body: <p>I have installed mysql since upgrading the operating system. But there seems to be a problem with the root password. I have tried to fix this in many ways on the web, so far it has not been successful.</p>
  
  <p><strong>systemctl status mysql.service</strong> give:</p>
  
  <pre><code>● mysql.service - MySQL Community Server
     Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Wed 2018-05-02 16:57:24 +07; 13s ago
    Process: 6172 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=217/USER)
  Thg 5 02 16:57:24 thiennguyen systemd[1]: mysql.service: Service hold-off time  over, scheduling restart.
  Thg 5 02 16:57:24 thiennguyen systemd[1]: mysql.service: Scheduled restart job,  restart counter is at 5.
  Thg 5 02 16:57:24 thiennguyen systemd[1]: Stopped MySQL Community Server.
  Thg 5 02 16:57:24 thiennguyen systemd[1]: mysql.service: Start request repeated too quickly
  Thg 5 02 16:57:24 thiennguyen systemd[1]: mysql.service: Failed with result 'exit-code'.
  Thg 5 02 16:57:24 thiennguyen systemd[1]: Failed to start MySQL Community Server
  </code></pre>
  
  <p><strong>journalctl -xe</strong> give:
  <a href="http://codepad.org/6EbGVu2Q" rel="noreferrer">http://codepad.org/6EbGVu2Q</a></p>
  
  <p><strong>mysql_secure_installation</strong> give:</p>
  
  <pre><code>Securing the MySQL server deployment.
  Enter password for user root: 
  Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  </code></pre>
  
  <p><strong>mysql -u root -p</strong> give:</p>
  
  <pre><code>Enter password: 
  ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
  </code></pre>
  
  <p>Especially when I install, mysql does not require setting password for root and i have reinstalled many times.
  Maybe the problem is old, but I have found many ways on the network but can not solve, so look forward to the help.</p>