[debian-mysql] Bug#859800: mariadb-server: /var/run/mysqld missing after installing mariadb-server over mysql 5.5 (jessie to stretch update)

Paul Gevers elbrus at debian.org
Fri Apr 7 13:43:56 UTC 2017


Package: mariadb-server
Version: 10.1.22-3
Severity: important

Dear Maintainer,

I just upgraded my NAS from jessie to stretch. On jessie, I had MySQL
installed (version 5.5). After the upgrade, I still had MySQL installed
which surprised me a bit, because I expected MariaDB to take over. The
daemon wasn't running, so without much investigation, I decided to
install mariadb-server to have a stretch version on my system (in
hindsight: I accepted mysqld-server to be removed during the upgrade).
However, after the upgrade the daemon still wasn't running.

I tried to start it, but that failed;
$ sudo service mysql start
$

I looked in the /var/log/mysql/error.log and found:
2017-04-07 12:45:47 2529162048 [Note] InnoDB: Dumping buffer pool(s) not
yet started
2017-04-07 12:45:49 3053044544 [ERROR] Incorrect definition of table
mysql.proc: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVA
2017-04-07 12:45:49 3053044544 [ERROR] Incorrect definition of table
mysql.event: expected column 'sql_mode' at position 14 to have type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','IGNORE_BAD_TABLE_OPTIONS','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH'),
found type
set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_A
ERROR: 1136  Column count doesn't match value count at row 1
2017-04-07 12:45:49 3062317056 [ERROR] Aborting

Duck-duck-going around, I tried /usr/bin/mysql_upgrade, but that gave me:
Can't connect to local MySQL server through socket
'/var/run/mysqld/mysqld.sock'
Obviously, because the daemon wasn't running.

Somehow, I ended up looking in /var/log/syslog and found:
Apr  7 12:45:52 fuji mysqld_safe[2798]: You can also try to start the
mysqld daemon with:
Apr  7 12:45:52 fuji mysqld_safe[2798]:
Apr  7 12:45:52 fuji mysqld_safe[2798]:     shell> /usr/sbin/mysqld
--skip-grant --general-log &

Which is what I tried and then I noticed in the /var/log/error.log:
2017-04-07 13:40:58 3062722560 [ERROR] Can't start server : Bind on unix
socket: No such file or directory
2017-04-07 13:40:58 3062722560 [ERROR] Do you already have another
mysqld server running on socket: /var/run/mysqld/mysqld.sock ?
2017-04-07 13:40:58 3062722560 [ERROR] Aborting

After creating /var/run/mysqld (with the right permissions), I was able
to start mysqld with --skip-grant option. And than mysql_upgrade ran
successfully and after that I could start the mysql service normally.

I think this issue shows a couple of things:
- the release notes should probably contain a section about the
MySQL/MariaDB situation from jessie to stretch.
- mysql_upgrade isn't run during install when it should (maybe because
mysql-server was uninstalled during the upgrade to stretch?
- /var/run/mysql isn't always created, and if it isn't there, the daemon
doesn't want to start properly.

Please let me know if you are missing information to help this forward.

Paul


-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: armel (armv5tel)

Kernel: Linux 4.9.0-2-marvell
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages mariadb-server depends on:
ii  mariadb-server-10.1  10.1.22-3

mariadb-server recommends no packages.

mariadb-server suggests no packages.

-- no debconf information



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20170407/e03362c3/attachment.sig>


More information about the pkg-mysql-maint mailing list