December 31st, 2001, 05:35 PM
[Plesk] mysql upgrade and gcc 2.96
Okay i have yet to grab myself a Plesk server but am already trying to write up a guide for how i'm going to upgrade mysql from 3.23.36 to 3.23.47 compiling from source.
While writing this guide on how i'm going to upgrade mysql i came across a few issues.
1) according MySQL.com gcc version 2.96 compiler may result in problems with the compiled mysql binary and they recommend using gcc version >= 2.95.2 but NOT 2.96. Plesk uses gcc version 2.96.81 on RH 7.1 which may cause problems with mysql if i upgrade from source. Also redhat.com says there's bugs in 2.96.81 which 2.96.85 has fixed. Even gcc authors say the same http://gcc.gnu.org/gcc-2.96.html
2) i tried looking at down grading gcc to 2.95.3 but stuck on the instructions to do so. GCC web site said to install it into a version directory of it's own since it doesn't support make uninstall command so that simply removing that directory when you do not need that specific version of GCC any longer, and, if shared libraries are installed there as well, no more binaries exist that use them.
3) if with your help i figure out how to down grade gcc to 2.95.3, how do you tell it to use that version in it's own directory as opposed to the default one located at /usr/bin/gcc ??
So how does one downgrade from 2.96.81 to 2.95.3 ?
Below is the thread containing partially completed guide and with your folks help and can finish the guide
December 31st, 2001, 05:37 PM
note incomplete guide
1) I do not yet have a plesk powered web server, this guide is wholy based on theory - in other words what SHOULD work not what HAS worked.
2) This guide assumes you have Plesk standard installation and NOT Plesk rpm version installed. And was written mainly for me planning to get one of Rackshack.net's Intel based Plesk web servers.
4) # denotes the shell/telnet prompt
5) to find out which version of gcc compiler you have type
Rackshack.net's Intel based Plesk web servers with RH 7.1 seem to use gcc version 2.96 which according to MySQL.com may cause problems with the mysql binary that gets compiled.
You need the following tools to build and install MySQL from source:
[*] GNU gunzip to uncompress the distribution. [*] A reasonable tar to unpack the distribution. GNU tar is known to work. Sun tar is known to have problems. [*] A working ANSI C++ compiler. gcc >= 2.95.2, egcs >= 1.0.2 or egcs 2.91.66, SGI C++, and SunPro C++ are some of the compilers that are known to work.[*] A good make program, GNU make 3.75 or newer
Several of our users have reported random crashes and table corruption with MySQL binaries compiled with gcc 2.96 on the x86 Linux platform. Although we were unable to duplicate the problems ourselves or understand their exact cause, we suspect with a great degree of confidence that the problem was compiler related. Replacing the faulty binary with our binary always eliminated the problem.
We recommend that MySQL be compiled with gcc 2.95 if you have to compile your own binary at all. It is also acceptable to compile it with gcc 2.91 - builds with these compilers have been tested extensively. We would suggest, however, that you stay away from gcc 3.0 series until we have had some time to do some more extensive testing.
To determine if you should be concerned about this compiler issue, execute gcc -v from the command prompt on your system. If the compiler reports version 2.96, then there is a problem (this is the case, for example on RH 7.x series or Mandrake 8.x). In this case, you should not try to compile your own binary before downgrading to one of the compilers mentioned above. You should also NOT use the MySQL server provided with your distribution -- as this copy of MySQL was compiled with the same ill-advised compiler version.
Downgrade gcc compiler from 2.96 20000731 to 2.95.3
Since MySQL.com has warned that gcc 2.96 compiler may result in problems with the MySQL compiled binary, we might need to down grade to gcc 2.95.3 compiler.
a) Download gcc 2.95.3 from one of the following mirrors at http://www.gnu.org/order/ftp.html
b) To be completed soon
1. log into telnet and switch to root user
2. using wget grab the latest MySQL source tarball from one of the mirror download sites at http://www.mysql.com/Downloads/MySQL-3.23/
for convenience try
to download the source tarball straight to your plesk web server.
# cd /usr/local/src
# wget http://mysql.valueclick.com/Download...3.23.47.tar.gz
wait for your server to download the source tarball.
3. type the following commands at prompt # still in /usr/local/src as root user to begin with where VERSION is the mysql version number of the source tarball in this case 3.23.47
# groupadd mysql
# useradd -g mysql mysql
# gunzip < mysql-VERSION.tar.gz | tar -xvf -
# cd mysql-VERSION
# CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/psa/mysql --localstatedir=/usr/local/psa/mysql/var --with-unix-socket-path=/usr/local/psa/mysql/var/mysql.sock --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static --with-innodb --with-berkeley-db
# strip sql/mysqld
# make install
# chown -R root /usr/local/psa/mysql
# chown -R mysql /usr/local/psa/mysql/var
# chgrp -R mysql /usr/local/psa/mysql
# cp support-files/my-large.cnf /etc/my.cnf
# /usr/local/psa/mysql/bin/safe_mysqld --user=mysql &
Note this guide is written with Rackshack.net's Intel Plesk based standard install servers in mind and is based on theory and not practise.
as you can see the gcc down grading part is blank right now.. any help is appreciated
Happy New Year 2002!
December 31st, 2001, 05:45 PM
I haven't read all of your guide, but here's one thing:
No. This is disabled on 99.9% of all POSIX-like systems for many good reasons. Replace "telnet" by "ssh" everywhere in the guide.