Re: Problem with MySQL 3.23.40 Install..Source Compiled

2001-09-17 Thread jim barchuk

Hi Bob!

 I use Caldera Linux and have a 4 machine LAN.
 The Lan includes 3 Linux and 1 WinNT install.

  Now, no matter what I do  safe_Mysqld continues to start
 version: 3.22.32-log ..

This is more of a *nix question than a mysql question but whatever. :) I
use redhat but the concepts are the same.

 Here are the steps I took to compile and install ver 3.23.40.
 to the same directory as ver. 3.22.32 which I hoped would be
 overwritten. I installed both versions to /usr/share/mysql..

.42 is 'current'.

What got me started with learning this trick was when Apache used to
change its -entire- directory structure every few minor releases. The
answer is to define your own directory structure in a small shell script
rather than on a command line. That way you don't have to fool with all
your other support files such as rc.d just to upgrade someone else's
software.

My /root/bin/build.mysql-3.23.42 looks like this:

cd /usr/local/src/mysql-3.23.42
./configure \
--prefix=/home/mysql\
--with-mysqld-user=mysql\
--with-debug\
--bindir=/usr/local/sbin\
--sbindir=/usr/local/sbin

(I do make, make test, make install, and restarting manually. You can add
those lines if you like.) The point is to have the same Makefile for each
release.

(Now that I look at that I'm not sure why I set bindir and sbindir to the
same place but that was at least a year ago that I started using this
method.)

In any case with each new release I create a new /root/bin/build.*, edit
the cd line, and run it. That way I can keep previous source trees and
build files for one or two releases.

After restarting if anything screws up I can quickly cd to
/usr/local/src/mysql-[previous release] and make install and restart and
there's minimal downtime.

It -is- a good idea, after each new build.[version], to run a line like

diff Makefile ../[previous.version]/Makefile

...just to double check that -previous- configs are maintained and see
what -new- options you might/should deal with.

 basedir=/usr/share/mysql/libexec
 bindir=/usr/share/mysql/bin
 pid_file=/var/lib/mysql/mysqld.pid

Exactly. But rather than editing Makefile or configure.in and -forgetting-
some detail once in a while it's easier to edit -your- script to maintain
your directory structure. And I'm particularly lazy so I always take the
easier route. :)

 Also I expected the prefix= switch in the ./configure to overwrite
 version 3.22.32..Instead it created a sub/sub directory like SO..
 /usr/share/mysql/share/mysql   Whats That

Never seen it do anything like that.

 I have a lot of house cleaning to do...

OK the trick is to clean out everything and have a fresh start. Run this
command line:

find /* |grep mysql  /root/bin/remove.mysql

(Or redirect to someplace that you're comfortable.)

Edit that file and remove lines that relate to your current **DATABASE**
and rc.d and such files. Add rm -f to the start of each line for each file
that was found. Make -sure- you are not deleting your *database* tree!
Change permissions to make that script executable. *Triple* check it
*again* to make sure you don't delete anything you need.

Yes, I keep using those !*stars*! to emphasise disabling the 'shoot self
in foot' feature while the 'foot nailed to floor' option is still enabled.
:)  Actually, running a backup just before doing anything serious like
this is a PGI.

Run mysqladmin -p shutdown. Run that remove.mysql script and blip, your
system is clean. Untar the source again and rebuild from a script to
retain -your- directory structure and preferences.

I also use similar techniques to 'convert' from the rpm system to a
'compiled' version of an application because redhat is often several
months to a year to 'forever' behind in upgrades.

HTH. Have a :) day!

jb

-- 
jim barchuk
[EMAIL PROTECTED]






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Problem with MySQL 3.23.40 Install..Source Compiled

2001-09-16 Thread rjtalbo


Can someone help me??
I have been trying out MySQL beginning in June of 2001.
I use Caldera Linux and have a 4 machine LAN.
The Lan includes 3 Linux and 1 WinNT install.
I compiled the Source and installed version: 3.22.32-log on
all machines. This runs fine but I was needing the newer
features of version 3.23.40. So, I downloaded and installed
to the first Linux machine.

 Now, no matter what I do  safe_Mysqld continues to start
version: 3.22.32-log ..

Here are the steps I took to compile and install ver 3.23.40.
to the same directory as ver. 3.22.32 which I hoped would be
overwritten. I installed both versions to /usr/share/mysql..

cd /usr/src/OpenLinux/SOURCES/
tar zxvf mysql-3.23.40.tar.gz
cd /usr/src/OpenLinux/SOURCES/mysql-3.23.40
./configure --prefix=/usr/share/mysql
make
make install
 ( I did not run scripts as I had a previous installation, Right??)

I noticed 3.23.40 installed mysqld to a libexec directory, not bin..
Also 3.23.40 did not make a mysql/var directory, by but continued to
use /var/lib/mysql for data and pid..

In an effort to get 3.23.40 to load at boot I changed
/etc/rc.d/init.d/mysql  and /etc/rc.d/init.d/mysql_server  and
it's link /etc/rc5.d/S35mysql..  Like So

basedir=/usr/share/mysql/libexec
bindir=/usr/share/mysql/bin
pid_file=/var/lib/mysql/mysqld.pid


 Still comes up 3.22.32. I've obviously missed Something.
Also I expected the prefix= switch in the ./configure to overwrite
version 3.22.32..Instead it created a sub/sub directory like SO..
/usr/share/mysql/share/mysql   Whats That

I have a lot of house cleaning to do...
Please IF someone can shed some light on all or some of this mess..

BOb T.


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php