Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

RE: my.cnf search order revisited

From: Logan, David (DBA - Adelaide) <David.Logan(at)hp.com>
Date: Sat Sep 15 2007 - 23:42:41 EDT


Hi Lloyd,

You can always start the instance using the --defaults-file=<path to private my.cnf> option on mysqld_safe. I use this when I have multiple instances and it works fine. Allows you to put anything you wish in that particular my.cnf without it infringing on the other instances.

Also you can also use the script mysql_multi in the <basedir>/scripts directory

Regards


  • _/ ********** David Logan ******* _/ ******* ITO Delivery Specialist - Database ***** _/ ***** Hewlett-Packard Australia Ltd **** _/_/_/ _/_/_/ **** E-Mail: david.logan@hp.com **** _/ _/ _/ _/ **** Desk: +61 8 8408 4273 **** _/ _/ _/_/_/ **** Mobile: +61 414 207 458 ***** _/ ****** ****** _/ ******** Postal: 148 Frome Street, ******** _/ ********** Adelaide SA 5001 Australia i n v e n t

-----Original Message-----
From: news [mailto:news@sea.gmane.org] On Behalf Of Lloyd Zusman Sent: Sunday, 16 September 2007 12:44 PM To: internals@lists.mysql.com
Subject: my.cnf search order revisited

I've read the other threads here about the search order for my.cnf, but I have encountered a problem that doesn't seem to be addressed in any of the discussions that I could find:

I'm running mysql-5.0.46 under a linux system that has been configured using yum to manage its rpm packages. Various other system components are dependent
on this instance of mysql, and yum keeps them all in sync.

However, for various reasons, I need to bring up a second, completely separate
version of mysql on this system in a way that doesn't depend on the package manager. Therefore, I decided to build mysql from source and to change all of the paths so that every directory that is uses is under a private file system that I created: /usr/private. In order to perform the build, I did the
configuration as follows:

Do you need help?X

  dir=/usr/private

  ./configure                      \
    --prefix=${dir}                \
    --exec-prefix=${dir}           \
    --program-suffix="_${suffix}"  \
    --bindir=${dir}/bin            \
    --sbindir=${dir}/sbin          \
    --libexecdir=${dir}/libexec    \
    --datadir=${dir}/share         \
    --sysconfdir=${dir}/etc        \
    --sharedstatedir=${dir}/var    \
    --localstatedir=${dir}/var     \
    --libdir=${dir}/lib            \
    --includedir=${dir}/include    \
    --oldincludedir=${dir}/include \
    --infodir=${dir}/info          \

    --mandir=${dir}/man

I then did a "make" followed by a "make install", and everything properly got
installed under the completely separate /usr/private directory.

However, there is one fly in the ointment. This new version still wants to look in /etc/my.cnf for its configuration, but since the standard yum-based version is also using /etc/my.cnf, I can't keep the two versions separated in the way I intend.

In reading the other discussions here, it seems that a conscious, deliberate decision was made to always have mysql and its utilities look in /etc/my.cnf first, before looking in any of the other locations. This feature prevents me from having these two, completely separate versions running on a single machine.

Is it true that my only option is to patch the source code to my private mysql version, so that it looks somewhere other than /etc/my.cnf first? Or is there some other way for me to accomplish what I want to do?

Thanks in advance.

-- 
 Lloyd Zusman
 ljz@asfast.com
 God bless you.



-- 
MySQL Internals Mailing List
For list archives: 
http://lists.mysql.com/internals
To unsubscribe:    
http://lists.mysql.com/internals?unsub=david.logan@hp.com
  • application/x-pkcs7-signature attachment: smime.p7s
Received on Sat Sep 15 23:43:08 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:29 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library