Re: my.cnf search order revisited
Logan, David (DBA - Adelaide) wrote:
> 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
Hello David.
Thanks for your reply.
I thought of --defaults-path, but how do I get the "mysql" command-line
client to point to my private server and use all the configuration
information that pertains to it? That client doesn't take any kind
of --defaults-path argument. The same goes for "mysqladmin" and
"mysqldump". Don't all of these clients look in /etc/my.cnf first
for their configuration information?
Or am I missing something simple here? Do these clients just go through
the socket (I want to run non-networked) to talk to mysqld, which then
uses the --defaults-path argument to get the configuration information,
which it then returns to the client? If so, then this is indeed a
trivial solution to my problem.
> -----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: > > 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. >
--
MySQL Internals Mailing List
For list archives:
http://lists.mysql.com/internals
To unsubscribe:
http://lists.mysql.com/internals?unsub=lists@pantek.com
Received on Sun Sep 16 00:12:14 2007
This archive was generated by hypermail 2.1.8
: Sun Oct 07 2007 - 07:59:29 EDT
|