Subject: mysql broken after jessie upgrade

From: Tony van der Hoff <[email-masked]>
Date: Thu, 22 Sep 2016 12:43:18 +0200

Hi,

Running Jessie here. Performed apt-get upgrade yesterday, which included
a new version of mysql.

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

Any suggestions on how to fix, please?

-- 
Tony van der Hoff  | mailto:[email-masked]
Ariège, France     |

---

From: Cindy-Sue Causey <[email-masked]>
Date: Fri, 23 Sep 2016 00:03:40 -0400

> Any suggestions on how to fix, please?

Well, I've got a slightly weird one that yours brings to mind. I've
wanted to write it up for Debian-User but haven't had the brain power.
Short version is that, for no particular reason, I decided to see what
"apt-get upgrade" would try to do the other day. I don't normally go
that route. Also for no particular reason, I go the "apt-get install"
route instead.

So... How did your upgrade go? Was anything held back?

I'm asking because if I specifically "apt-get install libreoffice"
right now, it says, "Sure, let's do it." If I  try a generic "apt-get
upgrade" instead, all kinds of Libreoffice packages get held back,
including libreoffice itself, while unrelated packages are queued up
to be successfully upgraded.

Cindy :)

-- 
Cindy-Sue Causey
Talking Rock, Pickens County, Georgia, USA

* runs with duct tape *

---

From: Tony van der Hoff <[email-masked]>
Date: Thu, 22 Sep 2016 13:07:49 +0200

On 22/09/16 12:56, [email-masked] wrote:
> On Thu, Sep 22, 2016 at 12:43:18PM +0200, Tony van der Hoff wrote:
>> Hi,
> 
> Is the mysql daemon running? Try "service mysqld status" or however
> that's named in the brave new systemd world (I'm still in the messy
> old sysv world, mind you ;-)
> 
Thanks tomas;

No, it's not:
13:03:23 tony@tony-fr:~$ sudo service mysqld status
Failed to dump process list, ignoring: Unit mysqld.service not found.
● mysqld.service
   Loaded: not-found (Reason: No such file or directory)
   Active: inactive (dead)

But:
13:03:36 tony@tony-fr:~$ sudo service mysql status
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: enabled)
   Active: active (exited) since Thu 2016-09-22 12:32:43 CEST; 32min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 21125 ExecStart=/etc/init.d/mysql start (code=exited,
status=0/SUCCESS)

---

From: Tony van der Hoff <[email-masked]>
Date: Thu, 22 Sep 2016 16:02:37 +0200

On 22/09/16 13:59, [email-masked] wrote:
> On Thu, Sep 22, 2016 at 01:07:49PM +0200, Tony van der Hoff wrote:
> You might check whether there's a process called (more or less) mysql
> around:
> 
>   ps wwwaux | grep mysql
> 
Ther was...

> you might have a look into wherever mysql places its log files (unless
> they've been kidnapped by systemd, in which case I'd have to defer to
> smarter people; but I don't believe that). Look somewhere in /var/log/mysql.
> 
No all the log files were there, but empty...

> Then you might try to invoke (gasp!) "/etc/init.d/mysql start" (as root)
> yourself and see whether it spews any error messages giving any clues.
> 
Nothing...

> Then you could issue an "netstat -antp" as root, to see whether the
> mysql daemon is listening on some other (non-default) port.
> 
No...

It turns out that the recent upgrade took mysql from 5.5 to 5.6. It
uninstalled mysql-server-5.5, but failed to install mysql-server-5.6,
due to an unmet dependency on mysql-server-core-5.6.

I manually installed mysql-server-core-5.6, after which mysql-server-5.6
installed fine.

Mysql now starts correctly.

Thanks for your help,

tony

>> Ariège, France     |
> 
> Wonderful region, btw. I've got warm and sweet memories from summer
> 2015...

Very warm and sunny right now. The trees are just starting to change colour.

---

From: Greg Wooledge <[email-masked]>
Date: Thu, 22 Sep 2016 10:59:57 -0400

> due to an unmet dependency on mysql-server-core-5.6.

Sounds like you're getting mysql-server from jessie-backports instead
of jessie.  On a pure jessie system, it is still 5.5.

---

From: Tony van der Hoff <[email-masked]>
Date: Thu, 22 Sep 2016 19:41:14 +0200

> of jessie.  On a pure jessie system, it is still 5.5.

Yes, I am.
-- 
Tony van der Hoff        | mailto:[email-masked]
Buckinghamshire, England |

---

From: Liam O'Toole <[email-masked]>
Date: Thu, 22 Sep 2016 20:16:30 +0100

>> of jessie.  On a pure jessie system, it is still 5.5.

If you install the mysql-server metapackage from backports then the
server upgrade will be handled correctly in future.

-- 

Liam