Recently I met this error «Error: Failed while fetching Server version! Could be due to unauthorized access.» when I have upgrade mysql to a new version and run «mysql_upgrade», which version doesn’t matter here.
# mysql_upgrade -uroot -p
Enter password:
Looking for ‘mysql’ as: mysql
Looking for ‘mysqlcheck’ as: mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
How to fix the error? Let’s start troubleshooting.
The first clue is «Failed while fetching Server version», so we skip version check and see how.
# mysql_upgrade —skip-version-check -uroot -p
Enter password:
Looking for ‘mysql’ as: mysql
Looking for ‘mysqlcheck’ as: mysqlcheck
Running ‘mysqlcheck with default connection arguments
mysqlcheck: Got error: 2002: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) when trying to connect
FATAL ERROR: Error during call to mysql_check for fixing the db/tables names.
OK, the problem is much clearer, it’s can not connect through socket, so we check the socket file.
# ll /var/lib/mysql/mysql.sock
ls: cannot access /var/lib/mysql/mysql.sock: No such file or directory
The socket file doesn’t exist in /var/lib/mysql.
Let’s check mysql process.
# ps axu |grep mysql
root 6098 0.0 0.0 11440 1536 ? S 17:24 0:00 /bin/sh /usr/bin/mysqld_safe —datadir=/data/mysql/ —pid-file=/data/mysql/mysql.pid
mysql 6931 3.0 7.7 20851736 2544580 ? Sl 17:24 7:21 /usr/sbin/mysqld —basedir=/usr —datadir=/data/mysql/ —plugin-dir=/usr/lib64/mysql/plugin —user=mysql —log-error=/data/mysql/mysql-error.log —open-files-limit=65535 —pid-file=/data/mysql/mysql.pid —socket=/data/mysql/mysql.sock —port=3306
See? The socket file is under /data/mysql. This is because in my.cnf
datadir = /data/mysql
So we create a soft link /data/mysql to /var/lib/mysql
#ln -s /data/mysql /var/lib/mysql
Problem solved.
Материал из Wiki — Iphoster — the best ever hosting and support. 2005 — 2023
Перейти к:навигация, поиск
MySQL ошибка — Error: Failed while fetching Server version! Could be due to unauthorized access. FATAL ERROR: Upgrade failed
После обновления mysql через atomic репозиторий при запуске mysql_upgrade возникает ошибка:
# mysql_upgrade Looking for 'mysql' as: mysql Looking for 'mysqlcheck' as: mysqlcheck *** glibc detected *** /usr/libexec/mysqld: double free or corruption (fasttop): 0x00007f1c98004a60 *** ======= Backtrace: ========= /lib64/libc.so.6(+0x75e66)[0x7f1cbc1f0e66] /usr/libexec/mysqld(_ZN16Security_context7destroyEv+0xb4)[0x562ba4] /usr/libexec/mysqld(_ZN3THDD1Ev+0x13d)[0x5667bd] /usr/libexec/mysqld(_ZN3THDD0Ev+0x9)[0x566b99] /usr/libexec/mysqld(_Z10unlink_thdP3THD+0xfa)[0x51883a] /usr/libexec/mysqld(_Z29one_thread_per_connection_endP3THDb+0x16)[0x5188a6] /usr/libexec/mysqld(_Z24do_handle_one_connectionP3THD+0x139)[0x621af9] /usr/libexec/mysqld(handle_one_connection+0x5b)[0x621bdb] /lib64/libpthread.so.0(+0x79d1)[0x7f1cbdd5f9d1] /lib64/libc.so.6(clone+0x6d)[0x7f1cbc2639dd] ======= Memory map: ======== 00400000-00c73000 r-xp 00000000 08:02 16633186 /usr/libexec/mysqld 00e72000-00f8a000 rw-p 00872000 08:02 16633186 /usr/libexec/mysqld 00f8a000-0197c000 rw-p 00000000 00:00 0 [heap] 7f1c98000000-7f1c98030000 rw-p 00000000 00:00 0 7f1c98030000-7f1c9c000000 ---p 00000000 00:00 0 7f1ca0000000-7f1ca0021000 rw-p 00000000 00:00 0 7f1ca0021000-7f1ca4000000 ---p 00000000 00:00 0 7f1ca5e4a000-7f1ca5e4b000 ---p 00000000 00:00 0 7f1ca5e4b000-7f1ca664b000 rw-p 00000000 00:00 0 [stack:4415] 7f1ca664b000-7f1ca664c000 ---p 00000000 00:00 0 7f1ca664c000-7f1ca6e4c000 rw-p 00000000 00:00 0 [stack:4414] 7f1ca6e4c000-7f1ca6e4d000 ---p 00000000 00:00 0 7f1ca6e4d000-7f1ca764d000 rw-p 00000000 00:00 0 [stack:4413] 7f1ca764d000-7f1ca764e000 ---p 00000000 00:00 0 7f1ca764e000-7f1ca80db000 rw-p 00000000 00:00 0 [stack:4416] 7f1ca8477000-7f1ca8478000 ---p 00000000 00:00 0 7f1ca8478000-7f1ca84b8000 rw-p 00000000 00:00 0 [stack:4429] 7f1ca84b8000-7f1ca84b9000 ---p 00000000 00:00 0 7f1ca84b9000-7f1ca84f9000 rw-p 00000000 00:00 0 [stack:4417] 7f1ca84f9000-7f1ca84fa000 ---p 00000000 00:00 0 7f1ca84fa000-7f1ca8cfa000 rw-p 00000000 00:00 0 [stack:4411] 7f1ca8cfa000-7f1ca8cfb000 ---p 00000000 00:00 0 7f1ca8cfb000-7f1ca94fb000 rw-p 00000000 00:00 0 [stack:4410] 7f1ca94fb000-7f1ca94fc000 ---p 00000000 00:00 0 7f1ca94fc000-7f1ca9cfc000 rw-p 00000000 00:00 0 [stack:4409] 7f1ca9cfc000-7f1ca9cfd000 ---p 00000000 00:00 0 7f1ca9cfd000-7f1caa4fd000 rw-p 00000000 00:00 0 [stack:4408] 7f1caa4fd000-7f1caa4fe000 ---p 00000000 00:00 0 7f1caa4fe000-7f1caacfe000 rw-p 00000000 00:00 0 [stack:4407] 7f1caacfe000-7f1caacff000 ---p 00000000 00:00 0 7f1caacff000-7f1cab4ff000 rw-p 00000000 00:00 0 [stack:4406] 7f1cab4ff000-7f1cab500000 ---p 00000000 00:00 0 7f1cab500000-7f1cb4000000 rw-p 00000000 00:00 0 [stack:4405] 7f1cb4000000-7f1cb4021000 rw-p 00000000 00:00 0 7f1cb4021000-7f1cb8000000 ---p 00000000 00:00 0 7f1cb803d000-7f1cb803e000 ---p 00000000 00:00 0 7f1cb803e000-7f1cb883e000 rw-p 00000000 00:00 0 [stack:4404] 7f1cb883e000-7f1cb883f000 ---p 00000000 00:00 0 7f1cb883f000-7f1cba351000 rw-p 00000000 00:00 0 [stack:4403] 7f1cba351000-7f1cba35d000 r-xp 00000000 08:02 44302436 /lib64/libnss_files-2.12.so 7f1cba35d000-7f1cba55d000 ---p 0000c000 08:02 44302436 /lib64/libnss_files-2.12.so 7f1cba55d000-7f1cba55e000 r--p 0000c000 08:02 44302436 /lib64/libnss_files-2.12.so 7f1cba55e000-7f1cba55f000 rw-p 0000d000 08:02 44302436 /lib64/libnss_files-2.12.so 7f1cba55f000-7f1cba560000 ---p 00000000 00:00 0 7f1cba560000-7f1cbad60000 rw-p 00000000 00:00 0 [stack:4402] 7f1cbad60000-7f1cbad7d000 r-xp 00000000 08:02 44302668 /lib64/libselinux.so.1 7f1cbad7d000-7f1cbaf7c000 ---p 0001d000 08:02 44302668 /lib64/libselinux.so.1 7f1cbaf7c000-7f1cbaf7d000 r--p 0001c000 08:02 44302668 /lib64/libselinux.so.1 7f1cbaf7d000-7f1cbaf7e000 rw-p 0001d000 08:02 44302668 /lib64/libselinux.so.1 7f1cbaf7e000-7f1cbaf7f000 rw-p 00000000 00:00 0 7f1cbaf7f000-7f1cbaf95000 r-xp 00000000 08:02 44302740 /lib64/libresolv-2.12.so 7f1cbaf95000-7f1cbb195000 ---p 00016000 08:02 44302740 /lib64/libresolv-2.12.so 7f1cbb195000-7f1cbb196000 r--p 00016000 08:02 44302740 /lib64/libresolv-2.12.so 7f1cbb196000-7f1cbb197000 rw-p 00017000 08:02 44302740 /lib64/libresolv-2.12.so 7f1cbb197000-7f1cbb199000 rw-p 00000000 00:00 0 7f1cbb199000-7f1cbb19b000 r-xp 00000000 08:02 44302716 /lib64/libkeyutils.so.1.3 7f1cbb19b000-7f1cbb39a000 ---p 00002000 08:02 44302716 /lib64/libkeyutils.so.1.3 7f1cbb39a000-7f1cbb39b000 r--p 00001000 08:02 44302716 /lib64/libkeyutils.so.1.3 7f1cbb39b000-7f1cbb39c000 rw-p 00002000 08:02 44302716 /lib64/libkeyutils.so.1.3 7f1cbb39c000-7f1cbb3a6000 r-xp 00000000 08:02 44302741 /lib64/libkrb5support.so.0.1 7f1cbb3a6000-7f1cbb5a5000 ---p 0000a000 08:02 44302741 /lib64/libkrb5support.so.0.1 7f1cbb5a5000-7f1cbb5a6000 r--p 00009000 08:02 44302741 /lib64/libkrb5support.so.0.1 7f1cbb5a6000-7f1cbb5a7000 rw-p 0000a000 08:02 44302741 /lib64/libkrb5support.so.0.1 7f1cbb5a7000-7f1cbb5d0000 r-xp 00000000 08:02 44302444 /lib64/libk5crypto.so.3.1 7f1cbb5d0000-7f1cbb7d0000 ---p 00029000 08:02 44302444 /lib64/libk5crypto.so.3.1 7f1cbb7d0000-7f1cbb7d1000 r--p 00029000 08:02 44302444 /lib64/libk5crypto.so.3.1 7f1cbb7d1000-7f1cbb7d2000 rw-p 0002a000 08:02 44302444 /lib64/libk5crypto.so.3.1 7f1cbb7d2000-7f1cbb7d3000 rw-p 00000000 00:00 0 7f1cbb7d3000-7f1cbb7d6000 r-xp 00000000 08:02 44302726 /lib64/libcom_err.so.2.1 7f1cbb7d6000-7f1cbb9d5000 ---p 00003000 08:02 44302726 /lib64/libcom_err.so.2.1 7f1cbb9d5000-7f1cbb9d6000 r--p 00002000 08:02 44302726 /lib64/libcom_err.so.2.1 7f1cbb9d6000-7f1cbb9d7000 rw-p 00003000 08:02 44302726 /lib64/libcom_err.so.2.1 7f1cbb9d7000-7f1cbbab2000 r-xp 00000000 08:02 44302690 /lib64/libkrb5.so.3.3 7f1cbbab2000-7f1cbbcb2000 ---p 000db000 08:02 44302690 /lib64/libkrb5.so.3.3 7f1cbbcb2000-7f1cbbcbc000 r--p 000db000 08:02 44302690 /lib64/libkrb5.so.3.3 7f1cbbcbc000-7f1cbbcbe000 rw-p 000e5000 08:02 44302690 /lib64/libkrb5.so.3.3 7f1cbbcbe000-7f1cbbcff000 r-xp 00000000 08:02 44302705 /lib64/libgssapi_krb5.so.2.2 7f1cbbcff000-7f1cbbeff000 ---p 00041000 08:02 44302705 /lib64/libgssapi_krb5.so.2.2 7f1cbbeff000-7f1cbbf00000 r--p 00041000 08:02 44302705 /lib64/libgssapi_krb5.so.2.2 7f1cbbf00000-7f1cbbf02000 rw-p 00042000 08:02 44302705 /lib64/libgssapi_krb5.so.2.2 7f1cbbf02000-7f1cbbf75000 r-xp 00000000 08:02 44302343 /lib64/libfreebl3.so 7f1cbbf75000-7f1cbc174000 ---p 00073000 08:02 44302343 /lib64/libfreebl3.so 7f1cbc174000-7f1cbc176000 r--p 00072000 08:02 44302343 /lib64/libfreebl3.so 7f1cbc176000-7f1cbc177000 rw-p 00074000 08:02 44302343 /lib64/libfreebl3.so 7f1cbc177000-7f1cbc17b000 rw-p 00000000 00:00 0 7f1cbc17b000-7f1cbc305000 r-xp 00000000 08:02 44302662 /lib64/libc-2.12.so 7f1cbc305000-7f1cbc505000 ---p 0018a000 08:02 44302662 /lib64/libc-2.12.so 7f1cbc505000-7f1cbc509000 r--p 0018a000 08:02 44302662 /lib64/libc-2.12.so 7f1cbc509000-7f1cbc50a000 rw-p 0018e000 08:02 44302662 /lib64/libc-2.12.so 7f1cbc50a000-7f1cbc50f000 rw-p 00000000 00:00 0 7f1cbc50f000-7f1cbc525000 r-xp 00000000 08:02 44302685 /lib64/libgcc_s-4.4.7-20120601.so.1 7f1cbc525000-7f1cbc724000 ---p 00016000 08:02 44302685 /lib64/libgcc_s-4.4.7-20120601.so.1 7f1cbc724000-7f1cbc725000 rw-p 00015000 08:02 44302685 /lib64/libgcc_s-4.4.7-20120601.so.1 7f1cbc725000-7f1cbc7a8000 r-xp 00000000 08:02 44302638 /lib64/libm-2.12.so 7f1cbc7a8000-7f1cbc9a7000 ---p 00083000 08:02 44302638 /lib64/libm-2.12.so 7f1cbc9a7000-7f1cbc9a8000 r--p 00082000 08:02 44302638 /lib64/libm-2.12.so 7f1cbc9a8000-7f1cbc9a9000 rw-p 00083000 08:02 44302638 /lib64/libm-2.12.so 7f1cbc9a9000-7f1cbca91000 r-xp 00000000 08:02 16517046 /usr/lib64/libstdc++.so.6.0.13 7f1cbca91000-7f1cbcc91000 ---p 000e8000 08:02 16517046 /usr/lib64/libstdc++.so.6.0.13 7f1cbcc91000-7f1cbcc98000 r--p 000e8000 08:02 16517046 /usr/lib64/libstdc++.so.6.0.13 7f1cbcc98000-7f1cbcc9a000 rw-p 000ef000 08:02 16517046 /usr/lib64/libstdc++.so.6.0.13 7f1cbcc9a000-7f1cbccaf000 rw-p 00000000 00:00 0 7f1cbccaf000-7f1cbce68000 r-xp 00000000 08:02 16516989 /usr/lib64/libcrypto.so.1.0.1e 7f1cbce68000-7f1cbd067000 ---p 001b9000 08:02 16516989 /usr/lib64/libcrypto.so.1.0.1e 7f1cbd067000-7f1cbd082000 r--p 001b8000 08:02 16516989 /usr/lib64/libcrypto.so.1.0.1e 7f1cbd082000-7f1cbd08e000 rw-p 001d3000 08:02 16516989 /usr/lib64/libcrypto.so.1.0.1e 7f1cbd08e000-7f1cbd092000 rw-p 00000000 00:00 0 7f1cbd092000-7f1cbd0f4000 r-xp 00000000 08:02 16517086 /usr/lib64/libssl.so.1.0.1e 7f1cbd0f4000-7f1cbd2f3000 ---p 00062000 08:02 16517086 /usr/lib64/libssl.so.1.0.1e 7f1cbd2f3000-7f1cbd2f7000 r--p 00061000 08:02 16517086 /usr/lib64/libssl.so.1.0.1e 7f1cbd2f7000-7f1cbd2fe000 rw-p 00065000 08:02 16517086 /usr/lib64/libssl.so.1.0.1e 7f1cbd2fe000-7f1cbd300000 r-xp 00000000 08:02 44302737 /lib64/libdl-2.12.so 7f1cbd300000-7f1cbd500000 ---p 00002000 08:02 44302737 /lib64/libdl-2.12.so 7f1cbd500000-7f1cbd501000 r--p 00002000 08:02 44302737 /lib64/libdl-2.12.so 7f1cbd501000-7f1cbd502000 rw-p 00003000 08:02 44302737 /lib64/libdl-2.12.so 7f1cbd502000-7f1cbd509000 r-xp 00000000 08:02 44302622 /lib64/libcrypt-2.12.so 7f1cbd509000-7f1cbd709000 ---p 00007000 08:02 44302622 /lib64/libcrypt-2.12.so 7f1cbd709000-7f1cbd70a000 r--p 00007000 08:02 44302622 /lib64/libcrypt-2.12.so 7f1cbd70a000-7f1cbd70b000 rw-p 00008000 08:02 44302622 /lib64/libcrypt-2.12.so 7f1cbd70b000-7f1cbd739000 rw-p 00000000 00:00 0 7f1cbd739000-7f1cbd740000 r-xp 00000000 08:02 44302634 /lib64/librt-2.12.so 7f1cbd740000-7f1cbd93f000 ---p 00007000 08:02 44302634 /lib64/librt-2.12.so 7f1cbd93f000-7f1cbd940000 r--p 00006000 08:02 44302634 /lib64/librt-2.12.so 7f1cbd940000-7f1cbd941000 rw-p 00007000 08:02 44302634 /lib64/librt-2.12.so 7f1cbd941000-7f1cbd956000 r-xp 00000000 08:02 44302721 /lib64/libz.so.1.2.3 7f1cbd956000-7f1cbdb55000 ---p 00015000 08:02 44302721 /lib64/libz.so.1.2.3 7f1cbdb55000-7f1cbdb56000 r--p 00014000 08:02 44302721 /lib64/libz.so.1.2.3 7f1cbdb56000-7f1cbdb57000 rw-p 00015000 08:02 44302721 /lib64/libz.so.1.2.3 7f1cbdb57000-7f1cbdb58000 r-xp 00000000 08:02 44302812 /lib64/libaio.so.1.0.1 7f1cbdb58000-7f1cbdd57000 ---p 00001000 08:02 44302812 /lib64/libaio.so.1.0.1 7f1cbdd57000-7f1cbdd58000 rw-p 00000000 08:02 44302812 /lib64/libaio.so.1.0.1 7f1cbdd58000-7f1cbdd6f000 r-xp 00000000 08:02 44302558 /lib64/libpthread-2.12.so 7f1cbdd6f000-7f1cbdf6f000 ---p 00017000 08:02 44302558 /lib64/libpthread-2.12.so 7f1cbdf6f000-7f1cbdf70000 r--p 00017000 08:02 44302558 /lib64/libpthread-2.12.so 7f1cbdf70000-7f1cbdf71000 rw-p 00018000 08:02 44302558 /lib64/libpthread-2.12.so 7f1cbdf71000-7f1cbdf75000 rw-p 00000000 00:00 0 7f1cbdf75000-7f1cbdf95000 r-xp 00000000 08:02 44302673 /lib64/ld-2.12.so 7f1cbdf9b000-7f1cbe18e000 rw-p 00000000 00:00 0 7f1cbe18e000-7f1cbe194000 rw-p 00000000 00:00 0 7f1cbe194000-7f1cbe195000 r--p 0001f000 08:02 44302673 /lib64/ld-2.12.so 7f1cbe195000-7f1cbe196000 rw-p 00020000 08:02 44302673 /lib64/ld-2.12.so 7f1cbe196000-7f1cbe197000 rw-p 00000000 00:00 0 7fffdb464000-7fffdb485000 rw-p 00000000 00:00 0 [stack] 7fffdb5ff000-7fffdb600000 r-xp 00000000 00:00 0 [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] Error: Failed while fetching Server version! Could be due to unauthorized access. FATAL ERROR: Upgrade failed
Решение — это переставить mysql с remi репозитория:
# yum remove mysql-* # yum install mysql mysql-devel mysql-libs mysql-server # /etc/init.d/mysqld stop # mysqld_safe --skip-grant-tables & # mysql_upgrade # /etc/init.d/mysqld stop # /etc/init.d/mysqld start
Комментарии
-
#1
I have followed this guide to upgrade MySQL:
All looks good but the last step does not want to complete:
7. Upgrade MySQL databases:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
This is the message I get when trying to run this command:
sudo MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql_upgrade -uadmin
cat: /etc/psa/.psa.shadow: Permission denied
Looking for ‘mysql’ as: mysql
Looking for ‘mysqlcheck’ as: mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
-
#3
Ah didnt see the 2 commands. Root user disabled, this user is in the root group. When I run the command without sudo it is not working. Also tried the command as suggested. Please see message below:
sudo] password for stephangriesel: cat: /etc/psa/.psa.shadow: Permission denied
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
-
#5
Ah got it thank you. When I enter the shadow command, is that whole line the password?
-
#1
system information:
Apache 2.4.18
DirectAdmin 1.49.1
MySQL 5.6.29
Php 5.5.33
After updating Mysql with the following commands
cd /usr/local/directadmin/custombuild
./build set mysql 5.5
./build set mysql_inst mysql
./build set mysql_backup yes
./build update
./build mysql
I get the following errors….
Starting MySQL…… ERROR! The server quit without updating PID file (/var/lib/mysql/*******.***.*****.pid).
Giving mysqld a few seconds to start up…
Looking for ‘mysql’ as: /usr/bin/mysql
Looking for ‘mysqlcheck’ as: /usr/bin/mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
/usr/bin/mysqlcheck: Got error: 2002: Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2) when trying to connect
cp: `/usr/lib/libmysqlclient.so’ and `/usr/lib/mysql/libmysqlclient.so’ are the same file
Restarting MySQL.
ERROR! MySQL server PID file could not be found!
Starting MySQL… ERROR! The server quit without updating PID file (/var/lib/mysql/*******.***.*****.pid).
Errors in /var/lib/mysql/*******.err
160309 12:02:03 mysqld_safe mysqld from pid file /var/lib/mysql/*****.******.pid ended
160309 12:02:09 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
2016-03-09 12:02:09 0 [Warning] ‘THREAD_CONCURRENCY’ is deprecated and will be removed in a future release.
2016-03-09 12:02:09 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use —explicit_defaults_for_timestamp server option (see documentation for more details).
2016-03-09 12:02:09 0 [Note] /usr/sbin/mysqld (mysqld 5.6.29-log) starting as process 2439 …
2016-03-09 12:02:09 2439 [Note] Plugin ‘FEDERATED’ is disabled.
2016-03-09 12:02:09 2439 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-03-09 12:02:09 2439 [Note] InnoDB: The InnoDB memory heap is disabled
2016-03-09 12:02:09 2439 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2016-03-09 12:02:09 2439 [Note] InnoDB: Memory barrier is not used
2016-03-09 12:02:09 2439 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-03-09 12:02:09 2439 [Note] InnoDB: Using Linux native AIO
2016-03-09 12:02:09 2439 [Note] InnoDB: Not using CPU crc32 instructions
2016-03-09 12:02:09 2439 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-03-09 12:02:09 2439 [Note] InnoDB: Completed initialization of buffer pool
2016-03-09 12:02:09 2439 [Note] InnoDB: Highest supported file format is Barracuda.
2016-03-09 12:02:09 2439 [Note] InnoDB: 128 rollback segment(s) are active.
2016-03-09 12:02:09 2439 [Note] InnoDB: Waiting for purge to start
2016-03-09 12:02:09 2439 [Note] InnoDB: 5.6.29 started; log sequence number 20034292
2016-03-09 12:02:09 2439 [ERROR] /usr/sbin/mysqld: unknown variable ‘table_cache=1M’
2016-03-09 12:02:09 2439 [ERROR] Aborting
Seems there is something not compatible with Innodb but do not know what…..
Please help.
Regards,
-
#3
my.cnf setting removed
zEitEr THX
i did not read the error file correctly.
I commented out the table_cache=1M variable in the my.cnf file, and mysql started perfectly…..
-
#1
After pkg update
/ pkg upgrade
for myjail ( pkg -j myjail up...
)I got a reminder from MySQL:
Code:
* * * * * * * * * * * * * * * * * * * * * * * *
Message from mysql56-server-5.6.32:
************************************************************************
Remember to run mysql_upgrade the first time you start the MySQL server
after an upgrade from an earlier version.
However when I do this, this happens.
Code:
root@myjail:/ # mysql_upgrade
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Error: Failed while fetching Server version! Could be due to unauthorized access
.
FATAL ERROR: Upgrade failed
root@myjail:/ #
What could I have done wrong?
-
Thread Starter
-
#2
It turned out that mysql_upgrade wants to be run with the option -u root -p.
If one omits this option it throws this misleading error message.
When run this way, this happened:
Code:
root@myjail:/ # mysql_upgrade --verbose -u root -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Error: Server version (5.6.30) does not match with the version of
the server (5.6.32) with which this program was built/distributed. You can
use --skip-version-check to skip this check.
FATAL ERROR: Upgrade failed
root@myjail:/ #
What a surprise! Did pkg downgrade mysql? Apparently no.
Code:
root@myjail:/ # mysql -V
mysql Ver 14.14 Distrib 5.6.32, for FreeBSD11.0 (amd64) using EditLine wrapper
root@myjail:/ #
When run with the option —skip-version-check mysql_upgrade worked.
But it turned out that there was no point in updating mysql:
Code:
root@myjail:/ # pkg audit
mysql56-server-5.6.32 is vulnerable:
mysql -- Remote Root Code Execution
CVE: CVE-2016-6662
WWW: https://vuxml.FreeBSD.org/freebsd/856b88bf-7984-11e6-81e7-d050996490d0.html
1 problem(s) in the installed packages found.
root@myjail:/ # pkg update
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
root@myjail:/ #
Code:
Message from mysql56-client-5.6.32:
* * * * * * * * * * * * * * * * * * * * * * * *
Please be aware the database client is vulnerable
to CVE-2015-3152 - SSL Downgrade aka "BACKRONYM".
You may find more information at the following URL:
http://www.vuxml.org/freebsd/36bd352d-299b-11e5-86ff-14dae9d210b8.html
Although this database client is not listed as
"affected", it is vulnerable and will not be
receiving a patch. Please take note of this when
deploying this software.
«it is vulnerable and will not be receiving a patch.»
Looks like it is advisable to better avoid oracleware in future.
-
#3
I would avoid MySQL. It is better to use MariaDB or Percona. Both of them are a fork of MySQL.
-
#4
There’s no need to run the upgrade scripts for minor updates. It’s intended use is for upgrading major versions (5.5 -> 5.6 for example).
-
#5
There’s no need to run the upgrade scripts for minor updates. It’s intended use is for upgrading major versions (5.5 -> 5.6 for example).
Interesting that percona57 isn’t listed in the ports.