plainblack.com
Username Password
search
Bookmark and Share

    
Goto page «Previous Page   1 2    Next Page»

WRE self-contained my.cnf

User pwrightson
Date 8/1/2009 9:45 am
Views 2458
Rating -1    Rate [
|
]
Previous · Next
User Message
pwrightson

Hi guys,

I remember some talk about WRE 1.0 having its own location for MY.CNF removing the need to copy it to /etc (or wherever on a Win box). The secondary benefit is that it would not conflict with any other MySQL instances running on the same machine - for example, if you also have to run Plesk or cPanel etc.

I am part-way through a hack that allows for this, but I wondered if this had already been completed in WRE 0.93 or earlier.

Thanks

Paul W



Back to Top
Rate [
|
]
 
 
JT
Since WRE 0.8 the MySQL that comes with WRE puts its config file in /
data/wre/etc. However, if you put a config file in /etc/my.cnf it will  
override the one in the WRE. Not sure where your read the thing you're  
referring to. It isn't on my todo list. However, patches are always  
welcome.


Back to Top
Rate [
|
]
 
 
pwrightson

However, if you put a config file in /etc/my.cnf it will  
override the one in the WRE. Not sure where your read the thing you're  
referring to. It isn't on my todo list. However, patches are always  
welcome.

OK - let me re-check that. I am runnning wre-0.8.5 (upgraded from earlier versions) and I do have /etc/my.cnf for a Plesk install which I don't want to mess with.

My hack adds a  --defaults-file=... to WRE::Mysql to force it to use a specific my.cnf but I need to finish off the hack for the webgui service start/stop.

The hack is currently a fixed file, but maybe it should be something like wreConfig->get("mysql/defaultsfile")

A patch will be forthcoming.

Paul W



Back to Top
Rate [
|
]
 
 
pwrightson

OK - its time for a status on this.

A brief history - I was moving my WebGUI and Plesk-based hosting onto a new server (CentOS5, 1and1 Internet). The deal is that Plesk uses the standard MySQL and I wanted to keep that separate from the WebGUI/WRE install.

So, I added a 2nd IP to the server, hacked the Plesk Apache to listen only to the first IP and hacked the modproxy and modperl settings in WebGUI to listen only to the second IP.

So far, so good. The Plesk control panel listens to all IPs at port 8443 - does not conflict with WebGUI. But the MySQL installs do conflict.

Now, I want plesk and WebGUI to come up cleanly when the server boots without messing with /etc/my.cnf between plesk/MySQL starting and WebGUI/MySQL starting.

Now, I have not gotten to the bottom of this yet, but regardless of the --defaults-file settings I hit mysql_safe with (through mysql.server), it still picks up /etc/my.cnf.

As JT said, if there is no /etc/my.cnf, the WRE MySQL will pick up the right defaults file. So, I renamed the Plesk /etc/my.cnf file and added a "--defaults-file=" to the init script for Plesk. I am sure that this will break the next time I upgrade Plesk - and I really wanted something that was upgrade-proof.


When I finally get this nailed, I will let you know.

Given that I had already moved the Plesk my.cnf - I also added skip-networking to the [mysqld] section. This turned off port 3306. I could have changed the WebGUI/MySQL port just as easily instead.

Paul W



Back to Top
Rate [
|
]
 
 
JT
The other option would be to use the default mysql and skip wre mysql. But you could only do that if the default mysql is 5.0

JT
On Aug 4, 2009, at 10:57 PM, <pwrightson@invictaservices.net> wrote:

pwrightson wrote:

OK - its time for a status on this.

A brief history - I was moving my WebGUI and Plesk-based hosting onto a new server (CentOS5, 1and1 Internet). The deal is that Plesk uses the standard MySQL and I wanted to keep that separate from the WebGUI/WRE install.

So, I added a 2nd IP to the server, hacked the Plesk Apache to listen only to the first IP and hacked the modproxy and modperl settings in WebGUI to listen only to the second IP.

So far, so good. The Plesk control panel listens to all IPs at port 8443 - does not conflict with WebGUI. But the MySQL installs do conflict.

Now, I want plesk and WebGUI to come up cleanly when the server boots without messing with /etc/my.cnf between plesk/MySQL starting and WebGUI/MySQL starting.

Now, I have not gotten to the bottom of this yet, but regardless of the --defaults-file settings I hit mysql_safe with (through mysql.server), it still picks up /etc/my.cnf.

As JT said, if there is no /etc/my.cnf, the WRE MySQL will pick up the right defaults file. So, I renamed the Plesk /etc/my.cnf file and added a "--defaults-file=" to the init script for Plesk. I am sure that this will break the next time I upgrade Plesk - and I really wanted something that was upgrade-proof.


When I finally get this nailed, I will let you know.

Given that I had already moved the Plesk my.cnf - I also added skip-networking to the [mysqld] section. This turned off port 3306. I could have changed the WebGUI/MySQL port just as easily instead.

Paul W



http://www.webgui.org/develop/forum/wre-self-contained-my_cnf/3


--

WebGUI
http://www.webgui.org


Back to Top
Rate [
|
]
 
 
Graham
If I'm reading the startup scripts correctly, the only way it's possible
to do this without making alterations to the mysql.server script is to
have my.cnf in either /data/wre/prereqs/ or /data/wre/var/mysqldata/.
The best solution given that would be to have a symbolic link
/data/wre/var/mysqldata/my.cnf pointing to /data/wre/etc/my.cnf.
Alternatively there are a variety of places in the source or the startup
scripts alterations could be made to do this.

On 8/4/09 4:57 PM, pwrightson@invictaservices.net wrote:
> pwrightson wrote:
>
> OK - its time for a status on this.
>
> A brief history - I was moving my WebGUI and Plesk-based hosting onto a new
> server (CentOS5, 1and1 Internet). The deal is that Plesk uses the standard MySQL
> and I wanted to keep that separate from the WebGUI/WRE install.
>
> So, I added a 2nd IP to the server, hacked the Plesk Apache to listen only to
> the first IP and hacked the modproxy and modperl settings in WebGUI to listen
> only to the second IP.
>
> So far, so good. The Plesk control panel listens to all IPs at port 8443 - does
> not conflict with WebGUI. But the MySQL installs do conflict.
>
> Now, I want plesk and WebGUI to come up cleanly when the server boots without
> messing with /etc/my.cnf between plesk/MySQL starting and WebGUI/MySQL starting.
>
> Now, I have not gotten to the bottom of this yet, but regardless of the
> --defaults-file settings I hit mysql_safe with (through mysql.server), it
> /still/ picks up /etc/my.cnf.
>
> As JT said, if there is no /etc/my.cnf, the WRE MySQL will pick up the right
> defaults file. So, I renamed the Plesk /etc/my.cnf file and added a
> "--defaults-file=" to the init script for Plesk. I am sure that this will break
> the next time I upgrade Plesk - and I really wanted something that was
> upgrade-proof.
>
>
> When I finally get this nailed, I will let you know.
>
> Given that I had already moved the Plesk my.cnf - I also added skip-networking
> to the [mysqld] section. This turned off port 3306. I could have changed the
> WebGUI/MySQL port just as easily instead.
>
> Paul W
>
>
>
> http://www.webgui.org/develop/forum/wre-self-contained-my_cnf/3
>
>
> ------------------------------------------------------------------------
>
>
>



Back to Top
Rate [
|
]
 
 
pwrightson

As JT said, if there is no /etc/my.cnf, the WRE MySQL will pick up the right defaults file. So, I renamed the Plesk /etc/my.cnf file and added a "--defaults-file=" to the init script for Plesk. I am sure that this will break the next time I upgrade Plesk - and I really wanted something that was upgrade-proof.

I just wanted to let you all know, I did an upgrade of Plesk 9.0.1 to 9.2 and it did not break the hack Laughing



Back to Top
Rate [
|
]
 
 
koen

I would prefer the WRE mysql to not use the /etc/my.cnf ever, if there is a RFE for this I would gladly implement it.

Koen de Jonge - ProcoliX
http://www.procolix.com
Hosting - WebGUI - Virtualization



Back to Top
Rate [
|
]
 
 
cap10morgan
This might be crazy, impossible, or just unhelpful, but what if you
ran MySQL in a chroot in the WRE? So that inside the chroot, the WRE's
my.cnf *was* in /etc, but other MySQL instances could run outside it
just fine w/ a my.cnf in the real /etc. You'd have to run it on a
different port (or disable networking altogether).

Wes

On Wed, Aug 5, 2009 at 3:33 AM,  wrote:
> koen wrote:
>
> I would prefer the WRE mysql to not use the /etc/my.cnf ever, if there is a
> RFE for this I would gladly implement it.
>
> Koen de Jonge - ProcoliX
> http://www.procolix.com
> Hosting - WebGUI - Virtualization
>
> http://www.webgui.org/develop/forum/wre-self-contained-my_cnf/6
>
>
> --
>
> WebGUI
> http://www.webgui.org
>
>



--
"Small acts of humanity amid the chaos of inhumanity provide hope. But
small acts are insufficient."

- Paul Rusesabagina, Rwandan and former hotel manager whose actions
inspired the movie Hotel Rwanda


Back to Top
Rate [
|
]
 
 
JT
I haven't put any time in on this topic in quite a while, but when I  
built the WRE I did try to figure out what compiler flags/etc that I  
could use to make it so MySQL never checked /etc/my.cnf. I was never  
successful in my efforts. However, I agree with Koen. If there is a  
way to eliminate the possibility of reading from /etc/my.cnf it would  
be good to get that done.


Back to Top
Rate [
|
]
 
 
     Goto page «Previous Page   1 2    Next Page»



© 2012 Plain Black Corporation | All Rights Reserved