Comment 8 for bug 1605948

pickett.aaron (pickett-aaron) wrote :

I am having a issue with a new install of 16.04.01:

trsbox:~$ mysql
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

trsbox:~$ mysqladmin -u root -p status
Enter password:
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!

trsbox:~$ sudo systemctl enable mysql
[sudo] password for scorch:
Synchronizing state of mysql.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable mysql

trsbox:~$ sudo service mysql start
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

trsbox:~$ systemctl status mysql.service
● mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: activating (start-post) (Result: exit-code) since Fri 2017-02-17 12:54:34 EST; 17s ago
  Process: 4248 ExecStart=/usr/sbin/mysqld (code=exited, status=2)
  Process: 4244 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 4248 (code=exited, status=2); : 4249 (mysql-systemd-s)
    Tasks: 2
   Memory: 12.3M
      CPU: 730ms
   CGroup: /system.slice/mysql.service
           └─control
             ├─4249 /bin/bash /usr/share/mysql/mysql-systemd-start post
             └─4314 sleep 1