mysql_upgrade: cannot execute binary file

panosru

Verified User
Joined
Oct 8, 2006
Messages
80
Location
Greece
Hello, I tried to upgrade to the latest mysql version but the installation failed and then when I tried to install the old version again I took this error:

Code:
server:/usr/local/directadmin/custombuild# ./build mysql
Stopping mysqld ...
Stopping mysqld:		[ FAILED ]
Starting mysqld:		[ OK ]
Giving mysqld a few seconds to start up...
/usr/local/mysql/bin/mysqld_safe: line 315: /usr/local/mysql/bin/my_print_defaults: cannot execute binary file
/usr/local/mysql/bin/mysqld_safe: line 321: /usr/local/mysql/bin/my_print_defaults: cannot execute binary file
./build: line 2697: /usr/local/mysql/bin/mysql_upgrade: cannot execute binary file
./build: line 2703: /usr/local/mysql/bin/mysqlcheck: cannot execute binary file
Restarting MySQL.
Stopping mysqld:		[ FAILED ]
Starting mysqld:		[ OK ]
It is recommended to do "./build php n" after MySQL update.
/usr/local/mysql/bin/mysqld_safe: line 315: /usr/local/mysql/bin/my_print_defaults: cannot execute binary file
/usr/local/mysql/bin/mysqld_safe: line 321: /usr/local/mysql/bin/my_print_defaults: cannot execute binary file
server:/usr/local/directadmin/custombuild#

Does anyone knows any solution for that? I had mysql 5.1.41 I run the ./build update_versions and it downloaded mysql 5.1.43 along with some other updates which installed successfully...

Thanks

EDIT:
Also when I try to build php I'm getting:
Code:
/usr/local/bin/php: error while loading shared libraries: libmysqlclient.so.16: wrong ELF class: ELFCLASS64
/usr/local/bin/php: error while loading shared libraries: libmysqlclient.so.16: wrong ELF class: ELFCLASS64
/usr/local/bin/php: error while loading shared libraries: libmysqlclient.so.16: wrong ELF class: ELFCLASS64
/usr/local/bin/php: error while loading shared libraries: libmysqlclient.so.16: wrong ELF class: ELFCLASS64
/usr/local/bin/php: error while loading shared libraries: libmysqlclient.so.16: wrong ELF class: ELFCLASS64

EDIT2:
When I try to restart mysql manually I'm getting this error:
Code:
server:/usr/local# /etc/init.d/mysqld restart
Stopping mysqld:		[ FAILED ]
Starting mysqld:		[ OK ]
server:/usr/local# /usr/local/mysql/bin/mysqld_safe: line 315: /usr/local/mysql/bin/my_print_defaults: cannot execute binary file
/usr/local/mysql/bin/mysqld_safe: line 321: /usr/local/mysql/bin/my_print_defaults: cannot execute binary file

Is there a way to reinstall mysql somehow?
 
Last edited:
Someone please help me or at least send me a pm and tell me a charge on fixing this issue. thanks.
 
I'm having the same issue. Has anyone found a solution for this?

Keefe
 
I think I found the problem. Custombuild is trying to install the 64 bit version, mysql-5.1.44-linux-x86_64, instead of mysql-5.1.44-linux-i686.

Someone please help!

Keefe
 
ls /usr/lib64/

crt0-efi-x86_64.o elf_x86_64_efi.lds libefi.a libgnuefi.a
 
I've the same problem here,

apachje wont start because of a php_admin_flag not found
so i want te rebuild php, but got the same error as above

I made symlinks etc, downloaded so.16 again of DA but nothing works

who can help me
 
Problem solved, so far.

Im running a 64bits Debian but the software is still 32bits... so I took the 32bits version of mysql and he compiled again
 
Same here, trying to install the old version again and getting a similar error. Are there any videos showing how to sort this problem?
 
Found it - I assume everyone else was using an amd64 kernel with i686 userland?

comment the following out from build:

Code:
#if [ "$B64COUNT" -eq 1 ]; then
#       B64=0
#       LD_LIBRARY_PATH=/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib
#       export LD_LIBRARY_PATH
#fi
 
Found it - I assume everyone else was using an amd64 kernel with i686 userland?

comment the following out from build:

Code:
#if [ "$B64COUNT" -eq 1 ]; then
#       B64=0
#       LD_LIBRARY_PATH=/lib64:/usr/lib64:/usr/local/lib64:/lib:/usr/lib:/usr/local/lib
#       export LD_LIBRARY_PATH
#fi

Where did you find these lines? You should have B64=1, not 0 here.
 
Back
Top