View image from browser

2002-12-26 Thread tan tan
Hi,

Is anyone know how to view image that is stored in
mysql as binary format to 
a browser ?

Thank you.



__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




php3.0.15

2002-12-26 Thread thepagelinux
oY!

I am running RH 6.2 with PHP 3.0.15 (don't ask why I do not run php 4 yet, I really 
need to install theses versions to start everything) but when I am trying to access a 
mysql function I get the following error : Fatal error: Call to unsupported or 
undefined function mysql_connect() in /home/httpd/html/test/index.php3 on line 9

And my line #9 is : mysql_connect ( ... );

What I forgot during the installation ?

P.S. : I already try dl("mysql.so"); at the begining of my pages, not able to load the 
library!

Thanx

Yannick



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Use a function?

2002-12-26 Thread Peter D Bethke
Hello all,

I'm creating a db to track a contest involving sports teams and scores.

My table "matchups" has columns for team1_id, team2_id, team1_score and
team2_score.

I can write a simple calculation using the api I use (Lasso - similar in
function to php) and display the results programmatically in the html
output, not involving MySQL, but I wonder if I can use a function, or
something similar to get a new column "winner".

Can I create a new column that will display the id of the winner of the
contest, based on a simple comparison of the scores? Or should I do this
programmatically in code?

Best,

Peter


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Joins are slow?

2002-12-26 Thread R. Hannes Niedner
Scott Ambler recommends in his publication " Mapping Objects to Relational
Databases" not to do joins but to traverse tables. He claims that 'several
small accesses are usually more efficient than one big join'.
Is that true for mysql? I am particularly interested in a scenario where I
would retrieve only one row from each table involved in the join.

Thanks/h


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Riddle Me This...

2002-12-26 Thread Jon Frisby
What you want is the FULL OUTER JOIN syntax which MySQL doesn't support.

SELECT fruit_table.date, fruit, vegetable FROM fruit_table FULL OUTER JOIN
vegetable_table ON (fruit_table.date = vegetable_table.date);

(I'm assuming that NULL is acceptable instead of the empty string for the
empty cells in your example.)

If you're using MySQL 4.0.x, you can get the same basic result by doing:

SELECT fruit_table.date, fruit, vegetable FROM fruit_table LEFT OUTER JOIN
vegetable_table ON (fruit_table.date = vegetable_table.date) UNION SELECT
fruit_table.date, fruit, vegetable FROM fruit_table RIGHT OUTER JOIN
vegetable_table ON (fruit_table.date = vegetable_table.date);

If you're using MySQL 3.23.x, you can get the same results by doing two
separate queries and simply combining the results in your program:

SELECT fruit_table.date, fruit, vegetable FROM fruit_table LEFT OUTER JOIN
vegetable_table ON (fruit_table.date = vegetable_table.date);

SELECT fruit_table.date, fruit, vegetable FROM fruit_table RIGHT OUTER JOIN
vegetable_table ON (fruit_table.date = vegetable_table.date) WHERE
fruit_table.date IS NULL;

(The WHERE clause there will prevent the duplicates from showing up...)

If for some reason you can't deal with two separate result sets and need
*one* result set:

CREATE TEMPORARY TABLE fv (date DATE NOT NULL, fruit VARCHAR(255), vegetable
VARCHAR(255));

INSERT INTO fv SELECT fruit_table.date, fruit, vegetable FROM fruit_table
LEFT OUTER JOIN vegetable_table ON (fruit_table.date =
vegetable_table.date);

INSERT INTO fv SELECT fruit_table.date, fruit, vegetable FROM fruit_table
RIGHT OUTER JOIN vegetable_table ON (fruit_table.date =
vegetable_table.date) WHERE fruit_table.date IS NULL;

SELECT * FROM fv;

Note however that if you're using InnoDB tables, both fruit_table and
vegetable_table will be locked at the *table level* during the INSERT ...
SELECT ... queries!  This is not what one might expect to happen, but Heikki
assures me it's neccesary to ensure proper transaction isolation semantics.

-JF

-Original Message-
From: Jerry Barnes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, December 26, 2002 6:32 PM
To: [EMAIL PROTECTED]
Subject: Riddle Me This...


Given the two tables: "fruit_table", and "vegetable_table", how do I get
the "Desired ResultSet" below? Thanks...

fruit_table
+-++
| date| fruit  |
+-++
| 2002-12-16 00:00:00 | Apple  |
| 2002-12-17 00:00:00 | Banana |
+-++

vegetable_table
+-+---+
| date| vegetable |
+-+---+
| 2002-12-17 00:00:00 | Carrot|
| 2002-12-18 00:00:00 | Potato|
+-+---+

Desired ResultSet
+-++---+
| date| fruit  | vegetable |
+-++---+
| 2002-12-16 00:00:00 | Apple  |   |
| 2002-12-17 00:00:00 | Banana | Carrot|
| 2002-12-18 00:00:00 || Potato|
+-++---+




SpamFilterBuster: sql


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Fw: Query request

2002-12-26 Thread geetha

> 
>   My name is Arun, I subscribed recently to the mysql
> list, but I have some problems sending my mails to
> this group(but I am receiving all mails). Also I have
> some urgent problem at hand, I wanted answer to one of
> my question. It would kind of you to post this
> question onto the mysql list([EMAIL PROTECTED]) or
> could give me the solution. 
> 
> The question is
> I have a table 'X', I want to display the record in
> this table 'X' which has occupied the maximum number
> of bytes, i.e i want to display the record with
> maximum size. I would also like to print the record
> size as well.
> 
> Any help in this front would be great.
> 
> Arun
> 
> 
> __
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Is this a MySQL error?

2002-12-26 Thread Paul DuBois
At 11:47 +0200 12/25/02, Octavian Rasnita wrote:

Hi all,

I gave the following command in the default MySQL client:

select from_days(365);

The result is -00-00 instead of 0001-00-00.

If I gave the following command:

select from_days(366);

It gives the result 0001-01-01.

If I give numbers less than 356, the result is 0 for the year, the month,
and the day.

Something's wrong I guess.


Take a look at this section of the manual:

http://www.mysql.com/doc/en/Date_and_time_functions.html

TO_DAYS() and FROM_DAYS() are intended only for dates as of the
beginning of the year 1582.



Help!

Thank you.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]


sql, query

-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Optimize InnoDB table...

2002-12-26 Thread Paul DuBois
At 11:56 +0900 12/27/02, Chung Ha-nyung wrote:

 What I'd like to do is not to alter table type but to optimize table.
 Somewhere I read that to optimize the structure of innodb type table,
I should
 alter table type two times: to MyISAM and back to InnoDB.


Uh, well, what I wrote below shows how to do that. :-)


Or dump &
load
 data.


Do that with two commands:

mysqldump --opt db_name tbl_name > dump.sql
mysql db_name < dump.sql



--
 Chung Ha-nyung 
 Sayclub 
 NeoWiz 



 -Original Message-
 From: Paul DuBois [mailto:[EMAIL PROTECTED]]
 Sent: Friday, December 27, 2002 11:50 AM
 To: ¡§ «¦„Á; [EMAIL PROTECTED]
 Subject: Re: Optimize InnoDB table...


 At 15:13 +0900 12/26/02, Chung Ha-nyung wrote:
 >  I've heard that I should periodically alter innodb table
 to MyISAM and
 >  back to InnoDB to optimize table structure.
 >  I guess only dropping index and recreating it is enough,
 but should I
 >  change table type?

 Dropping an index doesn't change a table's type.  You can change the
 type like this:

 ALTER TABLE t TYPE = MyISAM;
 ALTER TABLE t TYPE = InnoDB;

 >

 > >query.



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




RE: Optimize InnoDB table...

2002-12-26 Thread Chung Ha-nyung

 What I'd like to do is not to alter table type but to optimize table.
 Somewhere I read that to optimize the structure of innodb type table,
I should
 alter table type two times: to MyISAM and back to InnoDB. Or dump &
load 
 data.

--
 Chung Ha-nyung 
 Sayclub 
 NeoWiz 


> -Original Message-
> From: Paul DuBois [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, December 27, 2002 11:50 AM
> To: Á¤ Çϳç; [EMAIL PROTECTED]
> Subject: Re: Optimize InnoDB table...
> 
> 
> At 15:13 +0900 12/26/02, Chung Ha-nyung wrote:
> >  I've heard that I should periodically alter innodb table 
> to MyISAM and
> >  back to InnoDB to optimize table structure.
> >  I guess only dropping index and recreating it is enough, 
> but should I
> >  change table type?
> 
> Dropping an index doesn't change a table's type.  You can change the
> type like this:
> 
> ALTER TABLE t TYPE = MyISAM;
> ALTER TABLE t TYPE = InnoDB;
> 
> >
> >query.
> >
> >--
> >  Chung Ha-nyung 
> >  Sayclub 
> >  NeoWiz 
> 
> 


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Optimize InnoDB table...

2002-12-26 Thread Paul DuBois
At 15:13 +0900 12/26/02, Chung Ha-nyung wrote:

 I've heard that I should periodically alter innodb table to MyISAM and
 back to InnoDB to optimize table structure.
 I guess only dropping index and recreating it is enough, but should I
 change table type?


Dropping an index doesn't change a table's type.  You can change the
type like this:

ALTER TABLE t TYPE = MyISAM;
ALTER TABLE t TYPE = InnoDB;



query.

--
 Chung Ha-nyung 
 Sayclub 
 NeoWiz 



-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




What does this mean? : Warning: thr_alarm queue is full

2002-12-26 Thread Chung Ha-nyung
query.

  I happened to find out that the lots of following error messages are
stored
error log file:
 Warning: thr_alarm queue is full

 What's this? Is it serious problem?


--
 Chung Ha-nyung 
 Sayclub 
 NeoWiz 



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Riddle Me This...

2002-12-26 Thread Jerry Barnes
Given the two tables: "fruit_table", and "vegetable_table", how do I get
the "Desired ResultSet" below? Thanks...

fruit_table
+-++
| date| fruit  |
+-++
| 2002-12-16 00:00:00 | Apple  |
| 2002-12-17 00:00:00 | Banana |
+-++

vegetable_table
+-+---+
| date| vegetable |
+-+---+
| 2002-12-17 00:00:00 | Carrot|
| 2002-12-18 00:00:00 | Potato|
+-+---+

Desired ResultSet
+-++---+
| date| fruit  | vegetable |
+-++---+
| 2002-12-16 00:00:00 | Apple  |   |
| 2002-12-17 00:00:00 | Banana | Carrot|
| 2002-12-18 00:00:00 || Potato|
+-++---+




SpamFilterBuster: sql


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




db_stat on BDB tables in MySQL

2002-12-26 Thread Geetika Tewari

Hi, does anyone have any experience using db_stat to get statistics on BDB
tables in MySQL. How did you go about this please? Thanks.

Geetika






-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Using db_stat in MySQL

2002-12-26 Thread Geetika Tewari

Hello -- The db_stat utility displays statistics for the Berkeley DB
environment variables. I have a version of MySQL that can use Berkeley DB
tables. Does anyone know how to use db_stat in MySQL, to get BDB
statistics.

The db_stat utility can be invoked with "db_stat -h" where the -h flag
should specify the directory in which the database and database
environment files reside.  I believe this directory is
/usr/local/mysql/var.

I have so far not been able to use db_stat to get statistics on BDB
tables in MySQL. Does anyone have any experience with this? Thanks!

Geetika





-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Which version of MySql compile with gcc 3.0.3 on Solaris ?

2002-12-26 Thread Hsiao Ketung Contr 61 CS/SCBN

Hi,  Happy holiday !

I'm not happy right now.

I can't compile src distribution of mysql-3.23.54a  on Sun Solaris 8 with
gcc version 3.0.3.

Does anyone has luck with Mysql using gcc 3.0.3 ?

Is a version of Mysql other than mysql-3.23.54a  that can be compiled with 
gcc version 3.0.3 ?


I've search goole and found this
http://www.sunhelp.org/pipermail/geeks/2002-January/011003.html.
But I'm not the Unix admin on the Solaris server and I'm stuck with gcc
version 3.0.3 for now.

Can someone has good hint for this problem  ?

Thanks in advance.

>   Ketung Hsiao
>   310-363-6771
> 
> 
> 

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Replication priority / speed

2002-12-26 Thread Jeremy Zawodny
On Thu, Dec 26, 2002 at 12:17:28PM -0700, Matt Sturtz wrote:
> Hello,
> 
> We run several frontend servers (Linux/Apache/PHP) behind a load
> balancer.  Each frontend is also a MySQL slave, and all queries are
> done locally (all changes go directly to the master).  The problem
> is, whenever somebody makes a lot of changes to the database at once
> (deletes, updates, or adds a lot of rows), the slave thread loads up
> the server to the point where Apache doesn't get much CPU anymore,
> and then our sites slow way down...

Hmm.

> Is it possible to set either set the priority ('nice') of the Slave
> thread down so it doesn't do that?

The slave thread only?  No, not really.  You could nice MySQL when you
start it up.  But I'm not sure how much effect (positive or negative)
that'd have.

> Or, alternatly, is there a way to limit the slave thread to only "X"
> bin-log transactions per second?

There is not.

As a gross hack, you could monitor the speed closely and use a lot of
"SLAVE STOP" and "SLAVE START" commands to throttle it.  But that's
really quite ugly.

Are your updates already well optimized?  If you're doing enough work
to cause noticeable speed problems, I'd double-check that if you
haven't already.

Jeremy
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<[EMAIL PROTECTED]>  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 11 days, processed 442,093,184 queries (435/sec. avg)

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




LOst connection during query

2002-12-26 Thread Thorsten Lasrich
Hi @ll,

ich changed my Server from SuSE to Redhat, but now i have the following
problem, when i try to connect to my mysql database. I'm using Redhat 8.0, i
testet Mysqlfront and got the following error message

LOst connection during query 

Anyone an idea,



Gruß

Thorsten Lasrich

Warum Pinguine nicht fliegen ??

Was nicht fliegt, stürzt nicht ab !!



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




MySQL/InnoDB-4.0.7 is released

2002-12-26 Thread Heikki Tuuri
Hi!

InnoDB is a MySQL table type which offers transactions, row level locking,
foreign key constraints, and a non-free hot backup tool.

InnoDB is included in MySQL-Max-3.23 and all MySQL-4.0 downloads available
at http://www.mysql.com.

MySQL AB decided to release MySQL-4.0.7 just a week after 4.0.6 to fix a
security issue in mysql_drop_db() in 4.0.

InnoDB in 4.0.7 allows a user to define for a FOREIGN KEY constraints also
ON UPDATE actions. This new feature has been requested by several users
during the past year.

As a special Christmas present you now have 4 % more free space in your
tablespace to use for storage of tables and indexes. That is possible
because the free space margin in InnoDB was reduced from 5 % to 1 % of the
tablespace size. No conversion of tables is needed. You get the bonus space
simply by upgrading to 4.0.7.


Full changelog:

* InnoDB now supports also the SQL syntax FOREIGN KEY (...) REFERENCES
...(...) [ON UPDATE CASCADE | ON UPDATE SET NULL | ON UPDATE RESTRICT | ON
UPDATE NO ACTION].

* Tables and indexes now reserve 4 % less space in the tablespace. Also
existing tables reserve less space. By upgrading to 4.0.7 you will see more
free space in "InnoDB free" in SHOW TABLE STATUS.

* Fixed bugs: updating the PRIMARY KEY of a row would generate a foreign key
error on all FOREIGN KEYs which referenced secondary keys of the row to be
updated. Also, if a referencing FOREIGN KEY constraint only referenced the
first columns in an index, and there were more columns in that index,
updating the additional columns generated a foreign key error.

* Fixed a bug: if an index contains some column twice, and that column is
updated, the table will become corrupt. From now on InnoDB prevents creation
of such indexes.

* Fixed a bug: removed superfluous error 149 and and 150 printouts from the
.err log when a locking SELECT caused a deadlock or a lock wait timeout.


I wish a prosperous New Year to all MySQL/InnoDB users!

Heikki Tuuri
Innobase Oy
http://www.innodb.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Integration

2002-12-26 Thread Micheline Carvalho Barroso Pereira - DATAPREVPB
Does anyone know how to integrate easily MySql tables with Microsoft SQL
Server tables?

Thanks in advance,

Micheline.

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Replication priority / speed

2002-12-26 Thread Matt Sturtz
Hello,

We run several frontend servers (Linux/Apache/PHP) behind a load balancer.
 Each frontend is also a MySQL slave, and all queries are done locally
(all changes go directly to the master).  The problem is, whenever
somebody makes a lot of changes to the database at once (deletes, updates,
or adds a lot of rows), the slave thread loads up the server to the point
where Apache doesn't get much CPU anymore, and then our sites slow way
down...

Is it possible to set either set the priority ('nice') of the Slave thread
down so it doesn't do that?  Or, alternatly, is there a way to limit the
slave thread to only "X" bin-log transactions per second?  We don't much
care if the frondends aren't updated at exactly the same second (or even
the same minute, just so we have the appearance of real-time), so we'd
prefer to slow down the slave process in an effort to keep Apache fast...

Thanks for any advice,

-Matt Sturtz-



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




linux probleme compiling 4.0.7

2002-12-26 Thread Brasseur Valéry

I am trying to compile mysql (version 4.0.7 or 3.23.54a, same thing )

/usr/include/linux/autoconf.h:66: warning: `CONFIG_SMP' redefined
../include/global.h:223: warning: this is the location of the previous
definition
mysqld.cc: In function `void print_signal_warning(int)':
mysqld.cc:726: implicit declaration of function `int sigset(...)'
make[4]: *** [mysqld.o] Error 1


any help would be appreciated !

thanks
valery

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Latest Information About Air Fares

2002-12-26 Thread Air Service





mysql£ºÄúºÃ£¡

ÕâÊÇ×îлúÌؼÛÐÅÏ¢£¬»¶Ó­²éÔÄ¡£
µã»÷½øÈ룺¾Æµê²éѯ¡¢ÔÚÏ߶©Æ±¡£

ÖØÔÚ·þÎñ-¹óÔÚÆ·ÖÊ-ÖµµÃÐÅÀµ-°é¾ýÅô³Ì
http://www.zhongqi.net/special1214.htm

( REMOVE )
Èç¹ûÕâ·âÓʼþ´òÈÅÄúÁË£¬·³ÇëËæÊÖɾµô£¬²¢Çë¼ûÁ¡£ÈôÄú²»Ï£ÍûÔÙ´ÎÊÕµ½ÎÒÃǵÄÓʼþ£¬Çëµã»÷ÕâÀï


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


Re: Hiding the password

2002-12-26 Thread Nicholas Elliott
Yup, so, I guess my setup is a little off-key.  *Engage sheepish mode*

Turns out the admins for my system have apache in a development group, which
all my files belong to, with 751 permissions.  So, yeah, other users can't
read the password per se but its obviously not what I thought it was.
Ah well.  I figured that out right after I sent out my last email... turns
out 511 didn't work (551 did, of course).

Sorry! =]

Nick Elliott

- Original Message -
From: "Mark" <[EMAIL PROTECTED]>
To: "Nicholas Elliott" <[EMAIL PROTECTED]>
Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 11:26 AM
Subject: Re: Hiding the password


>
> - Original Message -
> From: "Nicholas Elliott" <[EMAIL PROTECTED]>
> To: "Mark" <[EMAIL PROTECTED]>
> Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, December 26, 2002 5:09 PM
> Subject: Re: Hiding the password
>
>
> > I chmod 511, on a CGI script owned by me. My username has access to
> > read the source code, and apache can run the cgi script, but other users
> > on the server cannot read the source themselves (minus root, etc).
>
> I am getting more curious by the minute. :)
>
> Assuming, for the argument, your username is "me", and your web-daemon is
> not running as "me", then how will your web-daemon read from the CGI to
> extract the shebang line? I do not see how this can be done.
>
> And, like I said, if your web-daemon can read from the CGI, so can
everyone
> else who can "run" web-pages on your server.
>
> - Mark

mysql, query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Spam - why?

2002-12-26 Thread Gabriele Carioli
I don't understand why I'm getting so much spam
from the mysql list...

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Hiding the password

2002-12-26 Thread Mark
- Original Message -
From: "Nicholas Elliott" <[EMAIL PROTECTED]>
To: "Mark" <[EMAIL PROTECTED]>
Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 5:09 PM
Subject: Re: Hiding the password


> I chmod 511, on a CGI script owned by me. My username has access to
> read the source code, and apache can run the cgi script, but other users
> on the server cannot read the source themselves (minus root, etc).

I am getting more curious by the minute. :)

Assuming, for the argument, your username is "me", and your web-daemon is
not running as "me", then how will your web-daemon read from the CGI to
extract the shebang line? I do not see how this can be done (unless you had
your web-daemon running as root, but I doubt you did that.)

And, like I said, if your web-daemon can read from the CGI, so can everyone
else who can "run" web-pages on your server.

Or, as someone just brought to my attention, did you "compile" your Perl
script somehow? If so, I'd be interested to know what you used.

- Mark

mysql,query


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Hiding the password

2002-12-26 Thread Nicholas Elliott
I chmod 511, on a CGI script owned by me.  My username has access to read
the source code, and apache can run the cgi script, but other users on the
server cannot read the source themselves (minus root, etc).

The original question was,

> I want to make a CGI program in Perl that queries a MySQL database, and
the
> problem is that I need to write the password for the database in the
program
> and this password can be seen by any user that has an account on that
> server.
>
> I need to gave 755 permissions to CGI scripts because they need to be
> executed by the web server account, and not by my account.

Maybe I do have a strange setup on my server, but I don't need to set my
permissions to 755 to allow apache to excecute a file owned by me.  711/511
will work, while preventing "any user that has an account on that server"
from seeing the password.

Nick Elliott

- Original Message -
From: "Mark" <[EMAIL PROTECTED]>
To: "Nicholas Elliott" <[EMAIL PROTECTED]>; "Benjamin Pflugmann"
<[EMAIL PROTECTED]>; "Brent Bailey"
<[EMAIL PROTECTED]>
Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 10:56 AM
Subject: Re: Hiding the password


> - Original Message -
> From: "Nicholas Elliott" <[EMAIL PROTECTED]>
> To: "Benjamin Pflugmann" <[EMAIL PROTECTED]>; "Brent Bailey"
> <[EMAIL PROTECTED]>
> Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, December 26, 2002 4:17 PM
> Subject: Re: Hiding the password
>
>
> > Does the CGI-script need to be world-readable, or just world-
> > executable? All my perl CGI scripts are set up that way, so while
> > anyone can run it, only I can read the source code
>
>
> What manner of http daemon do you have running that allows "chmod 111"
Perl
> CGI scripts to run? At the very least, the shebang-line needs to be read
> from the CGI. I tested it, and my test-CGI, according to my expectation,
> gives a "Permission denied" on a chmod 111 script. And I would be more
> worried if it behaved differently.
>
> And if you set ownership to the the Perl scripts to the "nobody" user (and
> run "chmod 551", for instance), then still everyone with access to running
> pages on your web-daemon, will also have read-access to your Perl CGI
> scripts.
>
> Or am I missing something?
>
> - Mark


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Hiding the password

2002-12-26 Thread Mark
- Original Message -
From: "Nicholas Elliott" <[EMAIL PROTECTED]>
To: "Benjamin Pflugmann" <[EMAIL PROTECTED]>; "Brent Bailey"
<[EMAIL PROTECTED]>
Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 4:17 PM
Subject: Re: Hiding the password


> Does the CGI-script need to be world-readable, or just world-
> executable? All my perl CGI scripts are set up that way, so while
> anyone can run it, only I can read the source code


What manner of http daemon do you have running that allows "chmod 111" Perl
CGI scripts to run? At the very least, the shebang-line needs to be read
from the CGI. I tested it, and my test-CGI, according to my expectation,
gives a "Permission denied" on a chmod 111 script. And I would be more
worried if it behaved differently.

And if you set ownership to the the Perl scripts to the "nobody" user (and
run "chmod 551", for instance), then still everyone with access to running
pages on your web-daemon, will also have read-access to your Perl CGI
scripts.

Or am I missing something?

- Mark


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Finding out the number of days from a month in MySQL

2002-12-26 Thread Bhavin Vyas
I don't think there is since MySql is a db and not so much of a scripting
language. Perl or PHP have functions that could do something like that.

Regards,
Bhavin.
- Original Message -
From: "Octavian Rasnita" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 5:44 AM
Subject: Finding out the number of days from a month in MySQL


> Hi all,
>
> I want to find out the number of days in MySQL for the current month and I
> found that I need to use something like:
>
> - getting the current date.
> - Finding the first date of the current month.
> - Finding the first date of the next month.
> - Substracting a day for finding the last day of the current month.
> - Getting the day of month for the last day of the current month.
>
> Isn't there a more simple method, or a function for finding this?
>
> Thank you.
>
> Teddy,
> Teddy's Center: http://teddy.fcc.ro/
> Email: [EMAIL PROTECTED]
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




installing RPM RedHat 8.0

2002-12-26 Thread sam

I am getting the following message when submitting the following:


how-to-repeat:

[root@localhost sam]# rpm -ivh /mnt/cdrom/MySQL-4.0.6-.0.i386.rpm

error:/mnt/cdrom/MySQl-4.0.6-.0.i386.rpm: MD5 digest : BAD 
expected(ba03cefd50c27d9d993ce693457c072d) != 
(ad8cba3b72f6ae195b93f9b1db8a481c) 
error:/mnt/cdrom/MySQl-4.0.6-.0.i386.rpm cannot be installed

I have tried several .rpm from different North America sites
sam


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Finding out the number of days from a month in MySQL

2002-12-26 Thread Octavian Rasnita
Hi all,

I want to find out the number of days in MySQL for the current month and I
found that I need to use something like:

- getting the current date.
- Finding the first date of the current month.
- Finding the first date of the next month.
- Substracting a day for finding the last day of the current month.
- Getting the day of month for the last day of the current month.

Isn't there a more simple method, or a function for finding this?

Thank you.

Teddy,
Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Securing MYSQL

2002-12-26 Thread John Chang
I have a website that uses MYSQL, PHP, IIS, WMS4.1 on a win2k box.  The 
WMS4.1 is on a separate box and uses MyODBC to connect to MySQL.  It only 
does look up.  On the other box that has MYSQL, PHP, & IIS there is insert, 
delete, select, etc.  How do I secure MYSQL with NTFS permissions so that 
it doesn't break anything?  I tried using authenticated users, and other 
users but can't seem to get the right configuration.  Since the D: drive 
had the MySQL & PHP folder I wanted to tighten it down.  Right now it is 
set to everyone full control.  Thank you.


-
Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



Re: Hiding the password

2002-12-26 Thread Nicholas Elliott
Does the CGI-script need to be world-readable, or just world-executable?
All my perl CGI scripts are set up that way, so while anyone can run it,
only I can read the source code

- Original Message -
From: "Benjamin Pflugmann" <[EMAIL PROTECTED]>
To: "Brent Bailey" <[EMAIL PROTECTED]>
Cc: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 9:38 AM
Subject: Re: Hiding the password


> Hello.
>
> On Thu 2002-12-26 at 09:26:09 -0500, [EMAIL PROTECTED]
wrote:
> > i would try using php to have you page connect to the mysql database..
The code gets parsed
> > first then is loaded into the browser...so the user & pass for the
database is never seen.. i
> > would use something like:
> >
> > $db = mysql_connect("localhost", "mysql-user", "mysql-user-password");
> >  mysql_select_db("whatever-database-name",$db);
>
> Huh? How does this differ from the original problem with Perl? The
> script has to be world-readable in order to allow the web server
> account to read it in[1] and therefore anyone with shell access or access
> to write CGI scripts can read it.
>
> Bye,
>
> Benjamin
>
>
> [1] in the scenary presented by the original poster.
>
>
> [...]
> > > On Wed 2002-12-25 at 13:15:58 +0200, [EMAIL PROTECTED] wrote:
> > > > Hi all,
> > > >
> > > > I want to make a CGI program in Perl that queries a MySQL database,
and the
> > > > problem is that I need to write the password for the database in the
program
> > > > and this password can be seen by any user that has an account on
that
> > > > server.
> > > >
> > > > I need to gave 755 permissions to CGI scripts because they need to
be
> > > > executed by the web server account, and not by my account.
> > > >
> > > > Do you have any tips for hiding the password,
> > >
> > > Not really. Whereever you put it, the web server account has be able
> > > to access it, so the problem stays. Even if you could arrange that
> > > only the web server account can read it (e.g. by changing the owner of
> > > a file containing the password), every user with permission to create
> > > CGI scripts can still write a script to read the data.
> [...]
>
> --
> [EMAIL PROTECTED]
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: failing to connect to /tmp/mysql.sock

2002-12-26 Thread Bhavin Vyas
You are missing the socket file. Make sure 'mysqld' is up.
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 26, 2002 9:57 AM
Subject: failing to connect to /tmp/mysql.sock


> I am failing to connect to the mysql database, the error is failing to
connect to /tmp/mysql.sock What should i do?
>
>
> Harry
>
> ___
> NOCC, http://nocc.sourceforge.net
>
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




failing to connect to /tmp/mysql.sock

2002-12-26 Thread chaonsa
I am failing to connect to the mysql database, the error is failing to connect to 
/tmp/mysql.sock What should i do?


Harry

___
NOCC, http://nocc.sourceforge.net



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




No Database Selected

2002-12-26 Thread Ritesh Nadhani
Greetings

When I try to execute a query in SQLYOG( last query I have executed 2 Hours
before ), it is giving no database selected, evenif in databases combo box
the database is already selected. I am not understanding ? Does MySQL lose
the current DB status after a long time of idleness ?

Insane




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Hiding the password

2002-12-26 Thread Benjamin Pflugmann
Hello.

On Thu 2002-12-26 at 09:26:09 -0500, [EMAIL PROTECTED] wrote:
> i would try using php to have you page connect to the mysql database.. The code gets 
>parsed
> first then is loaded into the browser...so the user & pass for the database is never 
>seen.. i
> would use something like:
> 
> $db = mysql_connect("localhost", "mysql-user", "mysql-user-password");
>  mysql_select_db("whatever-database-name",$db);

Huh? How does this differ from the original problem with Perl? The
script has to be world-readable in order to allow the web server
account to read it in[1] and therefore anyone with shell access or access
to write CGI scripts can read it.

Bye,

Benjamin


[1] in the scenary presented by the original poster.


[...]
> > On Wed 2002-12-25 at 13:15:58 +0200, [EMAIL PROTECTED] wrote:
> > > Hi all,
> > >
> > > I want to make a CGI program in Perl that queries a MySQL database, and the
> > > problem is that I need to write the password for the database in the program
> > > and this password can be seen by any user that has an account on that
> > > server.
> > >
> > > I need to gave 755 permissions to CGI scripts because they need to be
> > > executed by the web server account, and not by my account.
> > >
> > > Do you have any tips for hiding the password,
> >
> > Not really. Whereever you put it, the web server account has be able
> > to access it, so the problem stays. Even if you could arrange that
> > only the web server account can read it (e.g. by changing the owner of
> > a file containing the password), every user with permission to create
> > CGI scripts can still write a script to read the data.
[...]

-- 
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Hiding the password

2002-12-26 Thread Brent Bailey
i would try using php to have you page connect to the mysql database.. The code gets 
parsed
first then is loaded into the browser...so the user & pass for the database is never 
seen.. i
would use something like:

$db = mysql_connect("localhost", "mysql-user", "mysql-user-password");
 mysql_select_db("whatever-database-name",$db);


Brent

Benjamin Pflugmann wrote:

> Hello.
>
> On Wed 2002-12-25 at 13:15:58 +0200, [EMAIL PROTECTED] wrote:
> > Hi all,
> >
> > I want to make a CGI program in Perl that queries a MySQL database, and the
> > problem is that I need to write the password for the database in the program
> > and this password can be seen by any user that has an account on that
> > server.
> >
> > I need to gave 755 permissions to CGI scripts because they need to be
> > executed by the web server account, and not by my account.
> >
> > Do you have any tips for hiding the password,
>
> Not really. Whereever you put it, the web server account has be able
> to access it, so the problem stays. Even if you could arrange that
> only the web server account can read it (e.g. by changing the owner of
> a file containing the password), every user with permission to create
> CGI scripts can still write a script to read the data.
>
> > or accessing MySQL from CGI scripts is not secure at all?
>
> Well, it is as secure as the server is set up. E.g. one can set up
> Apache so that it executes CGIs as the user to whom the script
> belongs. I know this has its own problems... it was only intended as
> example that it is a question of the server configuration.
>
> The "best" way is always a compromise and depends on how the server is
> used. If the server configuration is not in your hands, I don't there
> is much you can do, except asking the admin which way she suggests.
>
> HTH,
>
> Benjamin.
>
> --
> [EMAIL PROTECTED]
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

--
Brent Bailey CCNA
High Speed Data Services
MetroCast Cablevision
603-332-8629 ext:242
[EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: 4 billion record + 6 Gigabytes text fie

2002-12-26 Thread Benjamin Pflugmann
Hello.

On Wed 2002-12-25 at 20:06:22 -0800, [EMAIL PROTECTED] wrote:

> My company is currently upgrade our company'database from PICK, an
> old database system to mysql..
> 
> Our company database got 1 table where the record is more than 40
> million records, and the other table also got about i million record
> each..
> 
> what i found is i only can use the simple sql query to select the
> data from database and can't use the query like left join,equi-join
> and even a global variable also can make our server(2G RAM, 40G
> hardisk, Pentium 4) take a long time to respond..maybe this is a
> limitation of mysql i think..can't store such huge data..

No, 40 million records is no particular problem for MySQL. Most
probably some indexes are missing.

You need to be far more specific.

Which version of MySQL do you use? (SELECT VERSION())
Which OS do you use? Which version?
What is (one of) the slow query(ies)?
What shows EXPLAIN for that query?
What does "a long time" mean, in seconds?
And so on. Provide anything else you think could matter.

Please post the result of SHOW TABLE STATUS and SHOW CREATE TABLE for
the relevant tables.

HTH,

Benjamin.


-- 
[EMAIL PROTECTED]

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




recover databases

2002-12-26 Thread Vincent . Badier
Sorry to post again, i've simply forgot to give some details :

mysql> show databases;
+--+
| Database
+--+
| mysql
| test
+--+
2 rows in set (0.00 sec)

However, i still have databases files present on the system :

syst@datasrv:/var/mysql$ ls -al
total 40
drwxr-xr-x8 mysqlmysql4096 Dec 23 10:55 .
drwxr-xr-x   17 root root 4096 Oct  9 08:33 ..
drwx--2 mysqlmysql4096 Dec 23 10:02 SDD
drwx--2 mysqlmysql4096 Dec 23 10:01 cnam
-rw-rw1 mysqlmysql2767 Dec 26 14:03 connections.log
-rw-r--r--1 mysqlmysql 781 Oct  7 15:33 datasrv.err
drwx--2 mysqlmysql4096 Sep 30 16:56 menagerie
drwx--2 mysqlmysql4096 Dec 23 10:04 mysql
drwxr-xr--2 root mysql4096 Sep 12 14:43 test
drwx--2 mysqlmysql4096 Dec 23 10:06 tiatest

and all files are present in subdir, for exemple
datasrv:/var/mysql# ls -al SDD
total 224
drwx--2 mysqlmysql4096 Dec 23 10:02 .
drwxr-xr-x8 mysqlmysql4096 Dec 23 10:55 ..
-rw-rw1 mysqlmysql2424 Dec 23 10:02 depl_mep.MYD
-rw-rw1 mysqlmysql2048 Dec 23 10:02 depl_mep.MYI
-rw-rw1 mysqlmysql9226 Oct  9 18:06 depl_mep.frm
-rw-rw1 mysqlmysql   14832 Dec 23 10:02 etat_pc.MYD
-rw-rw1 mysqlmysql   13312 Dec 23 10:02 etat_pc.MYI
-rw-rw1 mysqlmysql8688 Oct 11 11:50 etat_pc.frm
-rw-rw1 mysqlmysql   99092 Dec 23 10:02 liste_pc.MYD
-rw-rw1 mysqlmysql   19456 Dec 23 10:02 liste_pc.MYI
-rw-rw1 mysqlmysql8881 Oct  9 17:55 liste_pc.frm
-rw-rw1 mysqlmysql   0 Dec 23 10:02 temp.MYD
-rw-rw1 mysqlmysql1024 Dec 23 10:02 temp.MYI
-rw-rw1 mysqlmysql8604 Oct  9 17:55 temp.frm

So, if anyone can tell me why mysql doesn't see all thoses databases
anymore,
it woud be great.
Tank's in advance.

Vincent


__

Hello all,

I'm quite newbie with MySql, so i apologize if this is a trivial question.

I did a small database, but fortunately not yet in production.
This Week-End happened a power cut and I didn't made any backup of my
databases :(

When i restarted Mysql, i could not log in as any user i allowed before.
I had to log on as root, and i saw the user table was empty (only the root
user and an empty user).
the SHOW databases tell me only about the mysql and test one. None of mines
appears.

I then re-created one user, and then quit mysql to check all databases with
myisamchk.
it then successfully recovers all *.MYI

However, when restarting mysql, it didn't so much more databases.


I don't know if i'm clear enought, but if anybody could help me recover my
databases, this vould be great.

Thanks a lot

 Vincent




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Counting results using 2 tables.

2002-12-26 Thread ed

Oops! I guess it doesn't work fine. The query returns 1 as the count for
agents that do not have any listings. How can I remedy that?

Thanks,

Ed

> 
> > SELECT name,COUNT(listings.*) as cnt  from agents LEFT OUTER JOIN
> > listings ON agents.name=listings.agent GROUP BY name;
> > 
> > IMO, joining by name is a real bad idea.
> 
> Thanks for the help. The above query provided gives the follwing error.
> 
> ERROR 1064: You have an error in your SQL syntax near '*) as cnt  from
> agents LEFT OUTER JOIN listings ON agents.name=listings.agent ' at line
> 1
> 
> If I leave off the (listings.*) and make it just (*) it works just fine.
> 
> Ed


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: Counting results using 2 tables.

2002-12-26 Thread ed

> SELECT name,COUNT(listings.*) as cnt  from agents LEFT OUTER JOIN
> listings ON agents.name=listings.agent GROUP BY name;
> 
> IMO, joining by name is a real bad idea.

Thanks for the help. The above query provided gives the follwing error.

ERROR 1064: You have an error in your SQL syntax near '*) as cnt  from
agents LEFT OUTER JOIN listings ON agents.name=listings.agent ' at line
1

If I leave off the (listings.*) and make it just (*) it works just fine.

Ed




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




re: Problems

2002-12-26 Thread Egor Egorov
On Saturday 09 November 2002 14:17, Elegant Systems wrote:

> To The Mysql Support Team, We are stuck in a problem while installing mysql
> in linux.This is exactly what the error shows :
>
> 021109 12:59:10 mysqld started 021109 12:59:10
> /usr/local/src/mysql/bin/mysqld: Can't create/write to file
> '/usr/local/src/mysql/data/localhost.localdomain.pid' (Errcode: 13) 021109
> 12:59:10 /usr/local/src/mysql/bin/mysqld: Can't find file:
> './mysql/host.frm' (errno: 13) 021109 12:59:10
> /usr/local/src/mysql/bin/mysqld: Error on delete of
> '/usr/local/src/mysql/data/localhost.localdomain.pid' (Errcode: 2) 021109
> 12:59:10 mysqld ended
>
> Kindly suggest as to what should be done in this aspect.The host.frm is
> getting listed in the directory but is unable to execute.Is this a version
> problem or is it an installation problem.
>

$ perror 13
Error code  13:  Permission denied

MySQL must be owner of the MySQL data dir.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
   <___/   www.mysql.com




-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




上网兼职,月赚万元!!

2002-12-26 Thread 普光网络
MySQL Reference Manual for version 3.23.7-alpha. -  ...:ÄúºÃ!

ÆÕ¹âÍøÂç:http://218.5.79.211/soho/?mid=extraterres

Ò»¸öÄÜÁîÄã³ÉΪ¸»Î̵ĺÃÍøÕ¾£º¿´¿´×Ü¿ÉÒÔ°É£¡£¡£¡

¡Ñ 
»úÓöÖ»ÇàíùÇڷܵÄÈË£¬ÕâÊÇÒ»´Î»úÓö£¬²»ÊÇÃâ·ÑµÄÎç²Í£¡http://218.5.79.211/soho/?mid=extraterres
¡Ñ ÎÒÃÇÊÇÒ»¸ö¿ª·ÅʽµÄÍøÂçÉÌÎñƽ̨£¬ÌØÉ«ÊÇ»áÔ±¿ÉÒÔÔÚÕâÀï´Óʵç×ÓÉÌÎñ¼°ÍøÉϼæÖ°¡£
¡Ñ 
ÎÒÃÇËùÓеķþÎñ½«Í¨¹ý»áÔ±Çø½øÐйÜÀí£¬»áÔ±Ö»ÓÐƾ±¾Õ¾¼¤»îÄúµÄÕʺŲÅÄܽøÈë»áÔ±Çø£¬ÏêÇéä¯ÀÀ»áÔ±Çø£¬´Óʵç×ÓÉÌÎñ»î¶¯¼°ÍøÉϼæÖ°¡£


¡ú µã´ËÉêÇë³ÉΪ»áÔ±:http://218.5.79.211/soho/?mid=extraterres 


ÖÂ
Àñ!
   ÆÕ¹âÍøÂç
   [EMAIL PROTECTED]
   2002-12-26

-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Strange [Access denied for user], please help !!!

2002-12-26 Thread David Bordas
Hi all,

I've some problem with my Mysql servers since the beginning of last week :(

I've upgrade mysql from 3.23.53a to 3.23.54a and i still have same errors :(

I've got plenty of error like this :
Failed to connect to database: Error: Access denied for user:
´[EMAIL PROTECTED]´ to database ´DB1´
MySQL server has gone away

I connect from web servers which are on the same 100Mb LAN that mysql
servers.
I try during a ping during at least 2 hours and i didn't find anything, 0
packet loss ...

OS : linux

I tried check table extended on the table and status is ok, I try a new
flush privileges and this didn't change anything ...

Thanks.
David

Original message :
Subject : [Error] Mysql server has gone away && 3.23.53a

Hi all,

I've some problem with my Mysql servers since the beginning of this week.

I've got plenty of error like this :
Failed to connect to database: Error: Access denied for user:
´[EMAIL PROTECTED]´ to database ´DB1´
MySQL server has gone away
Error Nø1, please contact webmaster ...

In fact, clients are C cgi compiled with libmysql ( in this package
MySQL-devel-3.23.49-1.i386.rpm )
The Cgi is ok and have worked well since several mounths.

Error Nø1 : connection mysql ok, can't execute my query

It seems that mysql disconnect me before i can execute my query.
But query is just after the connection in the code ... :(

Server : Linux Redhat
2 * PIII 1 Ghz
1Go ram
Scsi raid 5
mysql-3.23.53a-pc-linux-gnu-i686.tar.gz ( binary )

As you can see, i connect to my server via a 100Mb LAN.
The LAN is ok, all ethernet card are 100Mb Full Duplex without any collision
or packet dropped.
Exemple :

RX packets:259950587 errors:0 dropped:0 overruns:0 frame:0
TX packets:1809122347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:100
RX bytes:3130833186 (2985.7 Mb)  TX bytes:1637489037 (1561.6 Mb)

Here's the my.cnf :
# The MySQL server
[mysqld]
port= 3306
socket = /tmp/mysql.sock
skip-locking
skip-name-resolve
set-variable= key_buffer=256M
set-variable= back_log=150
set-variable= record_buffer=1M
set-variable= sort_buffer=1M
set-variable= max_allowed_packet=1M
set-variable= thread_stack=128K
set-variable= max_connections=700
set-variable= max_connect_errors=100
set-variable= table_cache=512
set-variable= net_read_timeout=180
set-variable= net_write_timeout=180
set-variable= wait_timeout=3600
set-variable= thread_concurrency=4

I can't see anything in the error log.

Mysqld is still alive and still responding 99% of the time.

Status : Threads: 3  Questions: 3065350  Slow queries: 46  Opens: 91  Flush
tables: 1  Open tables: 66 Queries per second avg: 9.052

Show Status :
Aborted_clients   4401
Aborted_connects374
Bytes_received332129641
Bytes_sent  1691254415
[...]
Created_tmp_disk_tables   0
Created_tmp_tables211
Created_tmp_files 1290
Handler_delete   | 11135  |
Handler_read_first   | 226|
Handler_read_key | 2005755|
Handler_read_next| 1714626349 |
Handler_read_prev| 0  |
Handler_read_rnd | 2613047|
Handler_read_rnd_next| 62634691   |
Handler_update   | 357300 |
Handler_write| 304440 |
Key_blocks_used  | 62869  |
Key_read_requests| 97082717   |
Key_reads| 60114  |
Key_write_requests   | 487582 |
Key_writes   | 392106 |
Max_used_connections | 23 |
Not_flushed_key_blocks   | 0  |
Not_flushed_delayed_rows | 0  |
Open_tables  | 66 |
Open_files   | 102|
Open_streams | 0  |
Opened_tables| 91
Questions| 3065612|
Select_full_join | 0  |
Select_full_range_join   | 0  |
Select_range | 600|
Select_range_check   | 0  |
Select_scan  | 51701  |
Slave_running| OFF|
Slave_open_temp_tables   | 0  |
Slow_launch_threads  | 0  |
Slow_queries | 46 |
Sort_merge_passes| 645|
Sort_range   | 99887  |
Sort_rows| 2613047|
Sort_scan| 20030  |
Table_locks_immediate| 1841001|
Table_locks_waited   | 1977   |
Threads_cached   | 0  |
Threads_created  | 1226346|
Threads_connected| 2  |
Threads_running  | 1  |
Uptime   | 338664

Extract of the mysql.db table :
192.168.10.4 | DB1 | JForvC15 | Y ( select priv ... )

Thanks to all.
David


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <

reg mysql unreachability from hostname

2002-12-26 Thread geetha
sir/madam

   while in our script trying to reach a particular hostname related
mysql_data to monitor the calls . we get an error database connect failure

 please advice us how to proceed further .

eagerly waiting for ur earliest reply

regards

Geetha
Sr.Engineer [VAS]
vsnl/chennai
contact no - 5366740 ext  4088
direct no - 5360125
email  :  [EMAIL PROTECTED]



-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: SOLVED! (was: Re: What is wrong with this query?)

2002-12-26 Thread Mark
- Original Message -
From: "Mike Wexler" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, December 25, 2002 6:43 PM
Subject: Re: SOLVED! (was: Re: What is wrong with this query?)


> This is getting a little bit away from mysql

You are right, Mike, and, after this post, I will take the Perl argument
off-list. Just FYI, for those who thought my method of daemonizing was all
wrong, here is the documented way I used, and have been using for years.

http://www.perldoc.com/perl5.6/pod/perlipc.html#Complete-Dissociation-of-Chi
ld-from-Parent

They gave the following example, which is exactly what I do:

use POSIX 'setsid';

sub daemonize {
chdir '/'  or die "Can't chdir to /: $!";
open STDIN, '/dev/null' or die "Can't read /dev/null: $!";
open STDOUT, '>/dev/null' or die "Can't write to /dev/null: $!";
defined(my $pid = fork) or die "Can't fork: $!";
exit if $pid;
setsid   or die "Can't start a new session: $!";
open STDERR, '>&STDOUT' or die "Can't dup stdout: $!";
}

> but the easy way to
> do this is:
>
> use Proc::Daemon;# Available at a CPAN near you :-)
> 
> Proc::Daemon::Init;

I will have a look at that. Thanks. :)

> But this still doesn't explain (at least to me) the lost connection.
>
> Unless the $dbh was created before daemonizing and the child
> process closed the connection on exiting.

No, $dbh is created inside the child. Basically the only purpose of my
parent is to fork and to write a PID.

I found another interesting article, at:

http://artsandtechnology.humber.ac.uk/~dcobham/Teaching/CMC041/unixproc.html

What is interesting about it, that they use a "sleep 5" too, directly after
the fork () call. Apparently they reason Perl needs just a wee time to gets
its signals / pipes in order for the child. And that may just really be all
there is to it. Though it took me a darn while to figure out. :)

- Mark


-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Conflict with 2 different database servers ?

2002-12-26 Thread kayamboo
Hello Folks
(B I am building a C/S application with Delphi. I am now placing all my
(Bmain databases in MySql 4.0.3(InnodB) Server. The temporary databases for
(Bindividual users are kept as text files and as *Paradox db* files.
(B There are cases when both the connections are active and I execute
(Bqueries in MySql, getting some WHERE clause variables from Paradox . Will
(Bthis lead to any conflict ? or Crash ?
(B
(BNote :
(BI am not sure about the default port for Paradox
(B
(BAny help is appreciated
(B
(Bregards & happy new year to all
(B
(BKayambooSuresh
(B
(B
(B-
(BBefore posting, please check:
(B   http://www.mysql.com/manual.php   (the manual)
(B   http://lists.mysql.com/   (the list archive)
(B
(BTo request this thread, e-mail <[EMAIL PROTECTED]>
(BTo unsubscribe, e-mail <[EMAIL PROTECTED]>
(BTrouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php