My MySQL 5.6's datadir is a symbolic link and I've the same issue.
To be honest this server uses using Debian v7.11:
Linux 3.16.0-0.bpo.4-amd64 #1 SMP Debian 3.16.7-ckt25-2+deb8u3~bpo70+1 
(2016-07-07) x86_64 GNU/Linux

An `aptitude upgrade` fails:

----------8<----------
$ aptitude upgrade
The following packages will be upgraded: 
  mysql-server-5.6 
The following packages are RECOMMENDED but will NOT be installed:
  mysql-common-5.6 
1 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/14.7 MB of archives. After unpacking 8192 B will be used.
Do you want to continue? [Y/n/?] Y
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 93574 files and directories currently installed.)
Preparing to replace mysql-server-5.6 5.6.32-1~dotdeb+7.1 (using 
.../mysql-server-5.6_5.6.34-1~dotdeb+7.2_amd64.deb) ...
Stopping MySQL database server: mysqld.
Stopping MySQL database server: mysqld.
cp: cannot overwrite directory `/var/lib/mysql-upgrade/DATADIR.link/mysql' with 
non-directory
dpkg: error processing 
/var/cache/apt/archives/mysql-server-5.6_5.6.34-1~dotdeb+7.2_amd64.deb 
(--unpack):
 subprocess new pre-installation script returned error exit status 1
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld.
Checking for tables which need an upgrade, are corrupt or were 
not closed cleanly..
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.6_5.6.34-1~dotdeb+7.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
----------8<----------

Here are the asked `stat` outputs:
----------8<----------
$ stat /var/lib/mysql
  File: `/var/lib/mysql' -> `/home/.var/lib/mysql'
  Size: 20              Blocks: 0          IO Block: 4096   symbolic link
Device: 901h/2305d      Inode: 394478      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (  105/   mysql)   Gid: (    0/    root)
Access: 2016-12-06 14:06:27.000000000 +0100
Modify: 2014-05-14 11:03:53.000000000 +0200
Change: 2014-10-01 17:09:49.000000000 +0200
 Birth: -

$ stat /var/lib/mysql-upgrade
  File: `/var/lib/mysql-upgrade'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 901h/2305d      Inode: 408247      Links: 2
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-12-06 16:32:45.000000000 +0100
Modify: 2016-09-13 14:48:36.000000000 +0200
Change: 2016-09-13 14:48:36.000000000 +0200
 Birth: -

$ stat /var/lib/mysql-upgrade/DATADIR.link
  File: `/var/lib/mysql-upgrade/DATADIR.link' -> `/home/.var/lib/mysql'
  Size: 20              Blocks: 0          IO Block: 4096   symbolic link
Device: 901h/2305d      Inode: 397993      Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-12-06 16:31:58.000000000 +0100
Modify: 2016-09-13 14:48:36.000000000 +0200
Change: 2016-09-13 14:48:36.000000000 +0200
 Birth: -

$ stat /var/lib/mysql-upgrade/DATADIR.link/mysql
  File: `/var/lib/mysql-upgrade/DATADIR.link/mysql'
  Size: 4096            Blocks: 8          IO Block: 4096   directory
Device: 902h/2306d      Inode: 56754435    Links: 2
Access: (0700/drwx------)  Uid: (  105/   mysql)   Gid: (  108/   mysql)
Access: 2016-12-06 14:06:46.000000000 +0100
Modify: 2016-11-14 16:21:15.000000000 +0100
Change: 2016-11-14 16:21:15.000000000 +0100
 Birth: -
----------8<----------

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1607651

Title:
  mysql-server-5.6.postinst fails with: "cp: impossible d'écraser le
  répertoire «/var/lib/mysql-upgrade/DATADIR.link/mysql» par un non
  répertoire"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1607651/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to