Upgrade MySQL to 5.6 with many errors

saosangmo

Verified User
Joined
Oct 3, 2012
Messages
114
Location
Hanoi
hi,
I just upgraded mysql to version 5.6.
In the mysqld.log, there are the thousands of lines:

Code:
2014-04-28 20:28:53 7f1b8103c700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2014-04-28 20:28:53 7f1b8103c700 InnoDB: Error: Fetch of persistent statistics requested for table "electro_vina"."wp_term_taxonomy" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.

How can I fix it?

thanks
 
Please try:
Code:
mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
 
thank for your quick reply but I get the problem:

[root@csrv01 ~]# mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Can't execute 'mysqlcheck'
 
Please post the output of:
Code:
ls -l [COLOR=#000000]/usr/local/mysql/bin/mysqlcheck
[/COLOR]ls -l /usr/bin/mysqlcheck
 
the output:

[root@csrv01 custombuild]# ls -l /usr/local/mysql/bin/mysqlcheck
ls: cannot access /usr/local/mysql/bin/mysqlcheck: No such file or directory
[root@csrv01 custombuild]# ls -l /usr/bin/mysqlcheck
ls: cannot access /usr/bin/mysqlcheck: No such file or directory


[root@csrv01 custombuild]# locate mysqlcheck
/usr/bin/mysqlcheck
/usr/share/man/man1/mysqlcheck.1.gz
[root@csrv01 custombuild]#

There are something wrong with permission or I get mysql 5.6 package corrupted?
 
Last edited:
It seems that your mlocate database is old. Please run "updatedb" before using locate :) It would be great to get the output of:
Code:
rpm -qa | grep MySQL
 
Yes, that is old database.

This is my output:
[root@csrv01 bin]# rpm -qa | grep MySQL
MySQL-server-5.6.17-1.linux_glibc2.5.x86_64
MySQL-devel-5.6.17-1.linux_glibc2.5.x86_64
MySQL-shared-5.6.17-1.linux_glibc2.5.x86_64
 
You seem to be missing MySQL-client-5.6.17-1.linux_glibc2.5.x86_64, which provides /usr/bin/mysqlcheck package. Please try:
Code:
rpm -ihv /usr/local/directadmin/custombuild/mysql/MySQL-client-5.6.17-1.linux_glibc2.5.x86_64.rpm --force
cd /usr/local/directadmin/custombuild
./build mysql
mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
 
No luck for me, ;(

rpm -ihv /usr/local/directadmin/custombuild/mysql/MySQL-client-5.6.17-1.linux_glibc2.5.x86_64.rpm --force
Preparing... ########################################### [100%]
installing package MySQL-client-5.6.17-1.linux_glibc2.5.x86_64 needs 30MB on the / filesystem
[root@csrv01 bin]# cd /usr/local/directadmin/custombuild
[root@csrv01 custombuild]# ./build mysql
Found /usr/local/directadmin/custombuild/mysql/MySQL-client-5.6.17-1.linux_glibc2.5.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-devel-5.6.17-1.linux_glibc2.5.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-server-5.6.17-1.linux_glibc2.5.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.6.17-1.linux_glibc2.5.x86_64.rpm
Stopping mysqld ...
Shutting down MySQL.... [ OK ]
Updating MySQL 5.6.17 to 5.6.17
Preparing... ########################################### [100%]
package MySQL-shared-5.6.17-1.linux_glibc2.5.x86_64 is already installed
package MySQL-server-5.6.17-1.linux_glibc2.5.x86_64 is already installed
package MySQL-devel-5.6.17-1.linux_glibc2.5.x86_64 is already installed
installing package MySQL-client-5.6.17-1.linux_glibc2.5.x86_64 needs 30MB on the / filesystem
Starting MySQL....The server quit without updating PID file[FAILED]ib/mysql/csrv01.osd.vn.pid).
Giving mysqld a few seconds to start up...
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: /usr/bin/mysql
Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
FATAL ERROR: Can't execute '/usr/bin/mysqlcheck'
cp: `/usr/lib/libmysqlclient.so' and `/usr/lib/mysql/libmysqlclient.so' are the same file
Restarting MySQL.
MySQL server PID file could not be found! [FAILED]
Starting MySQL....The server quit without updating PID file[FAILED]ib/mysql/csrv01.osd.vn.pid).
[root@csrv01 custombuild]# mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Can't execute 'mysqlcheck'
[root@csrv01 custombuild]# mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Can't execute 'mysqlcheck'
[root@csrv01 custombuild]# service mysqld restart
MySQL server PID file could not be found! [FAILED]
Starting MySQL...The server quit without updating PID file [FAILED]b/mysql/csrv01.osd.vn.pid).
 
I have started my server. But can not excute mysql_upgrade

Code:
mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Can't execute 'mysqlcheck'
 
The problem is that you do not have enough of the free disk space on your system. Please clean it up and do MySQL reinstallation again. Please check "df -h" for your current usage.
 
hi,
I have a lot of free space.
But when I run ./build clean and ./build update, get this message:
*** MD5 Checksum for php-no.tar.gz failed *again*.***
I wonder if it's related my issue?
 
1. Please post the output of "df -h". / must be getting a shortage of space.
2. Please post the output of "cat /usr/local/directadmin/custombuild/options.conf".
 
Thank smtalk for your help.
I have solved my issue.
My terrible network causes mysql client package corrupted. I just try re-download and follow your steps.

but I still get the error: *** MD5 Checksum for php-no.tar.gz failed *again*.***

cat /usr/local/directadmin/custombuild/options.conf
#PHP settings.
Default version of PHP is always php1_release. Possible values for php1/php2_release: 5.3, 5.4, no. php1/php2_mode: cli, cgi (mod_php or FPM)
php1_release=5.4
php2_release=5.5
php1_mode=mod_php
php2_mode=suphp
php_ini=yes
#Possible values - production or development
php_ini_type=production
ioncube=no
zend=yes

#Possible values - 5.1, 5.5
mysql=5.6
mysql_inst=yes
mysql_backup=no
mysql_backup_dir=/usr/local/directadmin/custombuild/mysql_backups

#Possible value: 2.4
apache_ver=2.4
mod_ruid2=yes
secure_htaccess=no
harden-symlinks-patch=yes

#Web applications
phpmyadmin=yes
squirrelmail=no
roundcube=yes

#Mail options
exim=no
eximconf=no
clamav=yes
spamassassin=no
dovecot=yes

#Statistics
awstats=no
webalizer=yes

#FTP options
proftpd=no
pureftpd=no

#Jailed shell
jail=no

#Autoconf/automake/libtool options
autoconf=yes
automake=yes
libtool=yes
curl=yes

#new version of zlib and libxml2 (experts only)
zlib=yes
new_zlib=no
new_xml2=yes

#Custombuild options
custombuild=2.0
autover=no
bold=yes
clean=yes
cleanapache=no
clean_old_tarballs=no
clean_old_webapps=yes
downloadserver=files1.directadmin.com

#Cron settings
cron=no
cron_frequency=daily
[email protected]
notifications=yes
da_autoupdate=no
updates=no
webapps_updates=yes

#Cloudlinux settings
cloudlinux=no
ftpd=pureftpd
new_pcre=no
webserver=apache
redirect_host=csrv01.osd.vn
redirect_host_https=no
php_timezone=ICT
old_apr_util=no
use_hostname_for_alias=no
cagefs=no
pigeonhole=no
phpmyadmin_ver=4
htscanner=yes
x-mail-header=yes
new_suphp=no
harden_symlinks_patch=yes
x_mail_header=yes
suhosin=no
 
Please execute:
Code:
cd /usr/local/directadmin/custombuild
./build update_script

And try again :)
 
Im also having the problem

mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Can't execute 'mysqlcheck'

MySQL client is there in can see the rpm

But that's as far as it goes.

Upgraded from 5.5 to 5.6. now my logs are filled with;

2014-09-30 14:49:25 7ff0445af700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2014-09-30 14:49:25 7ff0445af700 InnoDB: Error: Fetch of persistent statistics requested for table "tracking_cpvlabs"."columncategories" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.
2014-09-30 14:49:25 7ff0445af700 InnoDB: Error: Table "mysql"."innodb_table_stats" not found.
2014-09-30 14:49:25 7ff0445af700 InnoDB: Error: Fetch of persistent statistics requested for table "tracking_cpvlabs"."mmisps" but the required system tables mysql.innodb_table_stats and mysql.innodb_index_stats are not present or have unexpected structure. Using transient stats instead.

etc

Already ran ./update MySQL a second time.

[root@la1010 custombuild]# ./build mysql
Found /usr/local/directadmin/custombuild/mysql/MySQL-client-5.6.21-1.linux_glibc2.5.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-devel-5.6.21-1.linux_glibc2.5.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-server-5.6.21-1.linux_glibc2.5.x86_64.rpm
Found /usr/local/directadmin/custombuild/mysql/MySQL-shared-5.6.21-1.linux_glibc2.5.x86_64.rpm
Stopping mysqld ...
Shutting down MySQL... SUCCESS!
Updating MySQL 5.6.21 to 5.6.21
Preparing... ########################################### [100%]
package MySQL-shared-5.6.21-1.linux_glibc2.5.x86_64 is already installed
package MySQL-server-5.6.21-1.linux_glibc2.5.x86_64 is already installed
package MySQL-devel-5.6.21-1.linux_glibc2.5.x86_64 is already installed
package MySQL-client-5.6.21-1.linux_glibc2.5.x86_64 is already installed
Starting MySQL.... SUCCESS!
Giving mysqld a few seconds to start up...
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: /usr/bin/mysql
Looking for 'mysqlcheck' as: /usr/bin/mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.

Running 'mysql_fix_privilege_tables'...
Warning: Using a password on the command line interface can be insecure.
ERROR 29 (HY000) at line 1619: File '/var/log/mysql-slow.log' not found (Errcode: 13 - Permission denied)
Warning 1642 Pre-4.1 password hash found. It is deprecated and will be removed in a future release. Please upgrade it to a new format.
FATAL ERROR: Upgrade failed
Warning: Using a password on the command line interface can be insecure.
cp: `/usr/lib/libmysqlclient.so' and `/usr/lib/mysql/libmysqlclient.so' are the same file

[root@la1010 custombuild]# mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`
Warning: Using a password on the command line interface can be insecure.
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
FATAL ERROR: Upgrade failed
 
Last edited:
Does mysql_upgrade work fine with a default my.cnf file?

Code:
[mysqld]
local-infile=0
 
It finally worked.

mysql_upgrade -u root -p
Enter password:
Looking for 'mysql' as: mysql
Looking for 'mysqlcheck' as: mysqlcheck
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
Running 'mysqlcheck with default connection arguments
Warning: Using a password on the command line interface can be insecure.
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.general_log OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.ndb_binlog_index OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.servers OK
mysql.slave_master_info OK
mysql.slave_relay_log_info OK
mysql.slave_worker_info OK
mysql.slow_log OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK


It does not like this command

mysql_upgrade -user=da_admin -password=`cat /usr/local/directadmin/conf/mysql.conf | grep passwd | cut -d= -f2`

instead it should be run like this;

mysql_upgrade -u root -p
 
Does mysql_upgrade work fine with a default my.cnf file?

Code:
[mysqld]
local-infile=0

I didn't try it with those two lines.

I had to recreate my.cnf for 5.6 because it bombed after I upgraded so I created a new my.cnf populated.
 
Back
Top