[debian-mysql] mysql upgrade did it again, chaingin some file to root in /var/log/mysql and /var/lib/mysql
Ghislain
gadnet at aqueos.com
Thu Jul 31 08:48:40 UTC 2014
hi,
Following the upgrade in :
Start-Date: 2014-07-30 06:11:20
Commandline: apt-get -y upgrade
Upgrade: libxml2-utils:amd64 (2.8.0+dfsg1-7+nmu3, 2.8.0+dfsg1-7+wheezy1),
mysql-server:amd64 (5.5.37-0+wheezy1, 5.5.38-0+wheezy1),
mysql-server-core-5.5:amd64 (5.5.37-0+wheezy1, 5.5.38-0+wheezy1),
mysql-server-5.5:amd64 (5.5.37-0+wheezy1, 5.5.38-0+wheezy1)
libpostproc52:amd64 (0.8.12-1, 0.8.13-1),
linux-libc-dev:amd64 (3.2.60-1+deb7u1, 3.2.60-1+deb7u3),
php5-dev:amd64 (5.4.4-14+deb7u11, 5.4.4-14+deb7u12),
End-Date: 2014-07-30 06:12:35
the mysql files were altered by the upgrade in the following way:
GUEST:tissot02:/root%(root)> find /var/log/mysql /var/lib/mysql/ ! -user
mysql -ls
7078026 4 drwx------ 2 root root 4096 Jul 30 06:12
/var/lib/mysql/performance_schema
7078586 12 -rw-rw---- 1 root root 8650 Jul 30 06:12
/var/lib/mysql/performance_schema/threads.frm
7078062 12 -rw-rw---- 1 root root 8878 Jul 30 06:12
/var/lib/mysql/performance_schema/events_waits_summary_by_instance.frm
7078543 12 -rw-rw---- 1 root root 8650 Jul 30 06:12
/var/lib/mysql/performance_schema/setup_timers.frm
7078436 12 -rw-rw---- 1 root root 8840 Jul 30 06:12
/var/lib/mysql/performance_schema/file_summary_by_instance.frm
7078296 12 -rw-rw---- 1 root root 8654 Jul 30 06:12
/var/lib/mysql/performance_schema/file_instances.frm
7078404 12 -rw-rw---- 1 root root 8800 Jul 30 06:12
/var/lib/mysql/performance_schema/file_summary_by_event_name.frm
7078030 4 -rw-rw---- 1 root root 61 Jul 30 06:12
/var/lib/mysql/performance_schema/db.opt
7078039 12 -rw-rw---- 1 root root 9220 Jul 30 06:12
/var/lib/mysql/performance_schema/events_waits_current.frm
7078526 12 -rw-rw---- 1 root root 8637 Jul 30 06:12
/var/lib/mysql/performance_schema/setup_instruments.frm
7078041 12 -rw-rw---- 1 root root 9220 Jul 30 06:12
/var/lib/mysql/performance_schema/events_waits_history.frm
7078437 12 -rw-rw---- 1 root root 8684 Jul 30 06:12
/var/lib/mysql/performance_schema/mutex_instances.frm
7078037 12 -rw-rw---- 1 root root 8624 Jul 30 06:12
/var/lib/mysql/performance_schema/cond_instances.frm
7078083 12 -rw-rw---- 1 root root 8854 Jul 30 06:12
/var/lib/mysql/performance_schema/events_waits_summary_by_thread_by_event_name.frm
7078468 12 -rw-rw---- 1 root root 8758 Jul 30 06:12
/var/lib/mysql/performance_schema/rwlock_instances.frm
7078467 12 -rw-rw---- 1 root root 8776 Jul 30 06:12
/var/lib/mysql/performance_schema/performance_timers.frm
7078084 12 -rw-rw---- 1 root root 8814 Jul 30 06:12
/var/lib/mysql/performance_schema/events_waits_summary_global_by_event_name.frm
7078058 12 -rw-rw---- 1 root root 9220 Jul 30 06:12
/var/lib/mysql/performance_schema/events_waits_history_long.frm
7078504 12 -rw-rw---- 1 root root 8605 Jul 30 06:12
/var/lib/mysql/performance_schema/setup_consumers.frm
performance schema file where changed to root:root again. The command
used for the upgrade was:
bash -c 'TMPDIR=/var/cache/apt/extracttemplates
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade'
the directory /var/cache/apt/extracttemplates is ( my /tmp is mounted
noexec):
drwxr-x--- 2 root root 4096 Jul 30 06:12 extracttemplates
This is not général as i made the upgrade on at least twice the servers of servers and i got 8 server this morning that had this problem. All used the same command as root
again before the upgrade the files had the right owner. I tried to find
the source but i could not find what make this problem appear. THe nodes
using perconna did not have this issue so i guess there is something
here that is different or my perconna servers are particulary lucky.
I made a diff of the postinst and find one difference that can be the
issue. Here is the patch:
diff -Naur mysql-server-5.5.postinst mysql-server-5.5.postinst.ok
--- mysql-server-5.5.postinst 2014-07-19 16:29:11.000000000 +0200
+++ mysql-server-5.5.postinst.ok 2014-07-31 10:44:41.183631261 +0200
@@ -143,7 +143,7 @@
# Debian: beware of the bashisms...
# Debian: can safely run on upgrades with existing databases
set +e
- bash /usr/bin/mysql_install_db --rpm 2>&1 | $ERR_LOGGER
+ bash /usr/bin/mysql_install_db --user=mysql --rpm 2>&1 | $ERR_LOGGER
if [ "$?" != "0" ]; then
echo "ATTENTION: An error has occured. More info is in the syslog!"
fi
regards,
Ghislain.
More information about the pkg-mysql-maint
mailing list