FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 07-29-2010, 03:17 PM
Alan McKinnon
 
Default mysql use flag witout server, using only client libaries

On Thursday 29 July 2010 16:54:45 Tomas Krasnican wrote:
> Hi list,
>
> I'm sorry for my bad english..
>
> I would like to emerge some packages using mysql use flag (and mysql flag
> features, for example. php, dovecot, postfix, ...), but without mysql
> database server (applications will connecting to the mysql database on the
> another (remote) server). Problem is, when I set the mysql use flag at
> some package, and I try to emerge that, mysql database is in the
> dependencies list.
>
> I want to emerge that without mysql database server, using mysql client
> libraries only. How can I define that?
>
> Thanks,
> Regards,
> Tomas Krasnican


Short answer: you can't.

Long answer: you might but the devs are not going to help you

Huge answer: a mysql client has support for connecting to a server on
localhost. Apps like dovecot etc therefore assume the same. So the ebuilds
install mysql if you ask for mysql support and you get everything.

There is no exact meaning for the mysql USE flag, it is interpreted (mostly)
in whatever way the dev thinks it makes sense. Maybe this should not be like
this. Doesn't matter - right now that's how it is. So you could inspect each
ebuild you use for stuff that has mysql support and rip it apaprt to make it
do what you want. Repeat for every version bump.



Or, you could just do the sane thing:

# equery size mysql
* dev-db/mysql-5.1.46
Total files : 403
Total size : 45.03 MiB

It's 45M, not a train smash. Most of that is docs, support configs, other
weird shit that Sun thought was a good idea, client libs, common libs. And the
server binary.


You are running php, dovecot and postfix on the box. Therefore apache too.

Trust me, the extra 2M the mysql server takes up is not disk space you are
short off. Not worth the effort.

--
alan dot mckinnon at gmail dot com
 
Old 07-29-2010, 04:19 PM
Tomas Krasnican
 
Default mysql use flag witout server, using only client libaries

Alan McKinnon wrote:
> On Thursday 29 July 2010 16:54:45 Tomas Krasnican wrote:
>> Hi list,
>>
>> I'm sorry for my bad english..
>>
>> I would like to emerge some packages using mysql use flag (and mysql flag
>> features, for example. php, dovecot, postfix, ...), but without mysql
>> database server (applications will connecting to the mysql database on the
>> another (remote) server). Problem is, when I set the mysql use flag at
>> some package, and I try to emerge that, mysql database is in the
>> dependencies list.
>>
>> I want to emerge that without mysql database server, using mysql client
>> libraries only. How can I define that?
>>
>> Thanks,
>> Regards,
>> Tomas Krasnican
>
>
> Short answer: you can't.
>
> Long answer: you might but the devs are not going to help you
>
> Huge answer: a mysql client has support for connecting to a server on
> localhost. Apps like dovecot etc therefore assume the same. So the ebuilds
> install mysql if you ask for mysql support and you get everything.
>
> There is no exact meaning for the mysql USE flag, it is interpreted (mostly)
> in whatever way the dev thinks it makes sense. Maybe this should not be like
> this. Doesn't matter - right now that's how it is. So you could inspect each
> ebuild you use for stuff that has mysql support and rip it apaprt to make it
> do what you want. Repeat for every version bump.
>
>
>
> Or, you could just do the sane thing:
>
> # equery size mysql
> * dev-db/mysql-5.1.46
> Total files : 403
> Total size : 45.03 MiB
>
> It's 45M, not a train smash. Most of that is docs, support configs, other
> weird shit that Sun thought was a good idea, client libs, common libs. And the
> server binary.
>
>
> You are running php, dovecot and postfix on the box. Therefore apache too.
>
> Trust me, the extra 2M the mysql server takes up is not disk space you are
> short off. Not worth the effort.
>

Thanks for your reply.

When I'll install the mysql database server on the box, the lot of "gentoo-like" things will require it localy.

For example, when I emerge php with mysql support, the apache rc script will contains something like "use mysql ....", or "need mysql" in that depend part. When I emerge something else with mysql support too, it will containts this thing too. And when I try to restart some of that, or when I wanna to restart the box, the mysql server will be started and it will take more time, as is realy needed. I wouldn't like that...

I can edit this scripts and remove the mysql dependency manually...but Why I must do it using this way? I wouldn't like to edit lot of rc scripts after every update. I am too lazy (and many admins too, I think) for doing this...

For "daily" modifying are designed the configuration files, but not rc (and not only rc) scripts. I think that developers are able to edit this scripts, when is it needed, but not end-user.

And I haven't see any reason to run mysql server localy, when all of applications are using external box as the database server. So, I looking for the another solution of this "problem".

Any ideas about this "problem"?

Thanks
Tomas Krasnican
 
Old 07-29-2010, 05:54 PM
Neil Bothwick
 
Default mysql use flag witout server, using only client libaries

On Thu, 29 Jul 2010 16:54:45 +0200, Tomas Krasnican wrote:

> I want to emerge that without mysql database server, using mysql client
> libraries only. How can I define that?

Set the minimal USE flag for mysql, do not set it globally.

dev-db/mysql:minimal - Install client programs only, no server


--
Neil Bothwick

WYTYSYDG - What you thought you saw, you didn't get.
 
Old 07-29-2010, 06:36 PM
Peter Humphrey
 
Default mysql use flag witout server, using only client libaries

On Thursday 29 July 2010 17:19:09 Tomas Krasnican wrote:

> I haven't see any reason to run mysql server localy, when all of
> applications are using external box as the database server. So, I
> looking for the another solution of this "problem".

As Alan said, installing the server doesn't cost a lot, especially
compared with the personal cost of finding a way to exclude it while
still keeping the client. And as long as you don't add mysqld to any run
level, it doesn't consume any CPU cycles: it just sits there on your
disk being ignored.

You were right to put "problem" in quotation marks.

--
Rgds
Peter. Linux Counter 5290, 1994-04-23.
 
Old 07-29-2010, 07:47 PM
Peter Humphrey
 
Default mysql use flag witout server, using only client libaries

On Thursday 29 July 2010 18:54:54 Neil Bothwick wrote:

> Set the minimal USE flag for mysql, do not set it globally.
>
> dev-db/mysql:minimal - Install client programs only, no server

Eek! I wish I'd seen this before my other post.

--
Rgds
Peter. Linux Counter 5290, 1994-04-23.
 
Old 07-29-2010, 08:37 PM
Tomas Krasnican
 
Default mysql use flag witout server, using only client libaries

Neil Bothwick wrote:
> Set the minimal USE flag for mysql, do not set it globally.
> dev-db/mysql:minimal - Install client programs only, no server

Thanks you! This is what I looking for..

Peter Humphrey wrote:
> As Alan said, installing the server doesn't cost a lot, especially
> compared with the personal cost of finding a way to exclude it while
> still keeping the client. And as long as you don't add mysqld to any run
> level, it doesn't consume any CPU cycles: it just sits there on your
> disk being ignored.

I'd like to doing things minimally, if is it possible. Simply is clever.. But, when is the mysql in the depend part of rc script (for example, when you emerge syslog-ng with mysql enabled flag, that will be puted here automaticly), the running localy database is required for start this service. It is not required to have it rc-enabled the mysql database, because you have already enabled another service, which it requires.. And at this point it could consume some CPU cycles... Yes minimally, thats true.

So, I don't want to see the running mysql in my proccess list..

--
Regards
Tomas Krasnican
 
Old 07-31-2010, 08:58 AM
Stroller
 
Default mysql use flag witout server, using only client libaries

On 29 Jul 2010, at 21:37, Tomas Krasnican wrote:
... But, when is the mysql in the depend part of rc script (for
example, when you emerge syslog-ng with mysql enabled flag, that
will be puted here automaticly), the running localy database is
required for start this service. It is not required to have it rc-
enabled the mysql database, because you have already enabled another
service, which it requires..


Surely the rc-scripts should use "before" and "after" instead of
"needs" or "depends". I haven't looked at this recently, but I'm
pretty sure there used to be such a distinction.


Stroller.
 
Old 07-31-2010, 10:01 PM
kashani
 
Default mysql use flag witout server, using only client libaries

On 7/31/2010 1:58 AM, Stroller wrote:


On 29 Jul 2010, at 21:37, Tomas Krasnican wrote:

... But, when is the mysql in the depend part of rc script (for
example, when you emerge syslog-ng with mysql enabled flag, that will
be puted here automaticly), the running localy database is required
for start this service. It is not required to have it rc-enabled the
mysql database, because you have already enabled another service,
which it requires..


Surely the rc-scripts should use "before" and "after" instead of "needs"
or "depends". I haven't looked at this recently, but I'm pretty sure
there used to be such a distinction.

Stroller.


For grins I compiled sql support into syslog-ng. Here's the new rc script.

depend() {
need net
use mysql dns logger netmount postgresql
after sshd
}

It'll load after Mysql only if it exists in the current runlevel. As
other people have said, there isn't any problem to solve here.


kashani
 

Thread Tools




All times are GMT. The time now is 08:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org