LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-03-2007, 10:26 PM   #1
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 39
Compiling recent mysql version in RHEL


Hi all,
I have installed RHEL4 with mysql-4.1.17. Now I downloaded 5.0.27-standard and installed it the server along with the previous one.
I have followd the specifications written in the INSTALL-BINARY file after untarring the mysql.
Code:
shell> groupadd mysql
shell> useradd -g mysql mysql
shell> cd /usr/local
shell> gunzip < /PATH/TO/MYSQL-VERSION-OS.tar.gz | tar xvf -
shell> ln -s FULL-PATH-TO-MYSQL-VERSION-OS mysql
shell> cd mysql
shell> scripts/mysql_install_db --user=mysql
shell> chown -R root  .
shell> chown -R mysql data
shell> chgrp -R mysql .
shell> bin/mysqld_safe --user=mysql &
Now, I stopped the previous mysql and when run new mysql after installing then it gives me this as below which means its running the new one

Code:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3 to server version: 5.0.27

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql>
Now my question is how come its getting the databases from my previous mysql or is it normal and what about my.cnf file as the default one is located at /etc? SHould I have to overrite the default one with new one?

Thanks in advance.
 
Old 09-04-2007, 02:46 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Now my question is how come its getting the databases from my previous mysql or is it normal
If you want to use your old databases, you can remove the /usr/local/mysql/data directory and create a symlink to the previous mysql database directory:
Code:
ln -s /path/to/mysql4/data /usr/local/mysql
Of course doing so mysql5 users/credentials are those created for mysql4.
Quote:
what about my.cnf file as the default one is located at /etc? SHould I have to overrite the default one with new one?
By default mysqld will use /etc/my.cnf. If you want to use a different one, you can start mysqld using:
Code:
mysqld_safe --defaults-file=/etc/my.cnf-5.0.27 --user mysql &
 
Old 09-04-2007, 08:10 AM   #3
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Original Poster
Rep: Reputation: 39
Thanks a lot. That was a great help for my understanding.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
k3b update wants a more recent version of growisofs yedidyah Linux - Software 4 07-11-2007 08:47 AM
NEWBIE: What is Mandriva's most recent version smiley_lauf Mandriva 29 02-27-2006 04:02 PM
Upgrade from FC 1 to more recent version M$Convert Fedora - Installation 5 06-23-2005 11:57 AM
Which distros have most recent ALSA version? aaaantoine Linux - Newbie 2 02-24-2005 04:45 PM
how do i upgrade kde to most recent version? webazoid Linux - Software 1 07-06-2004 05:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration