newbie question on variable length records.

2001-05-01 Thread sagar tamhane

Hi,

I am a newbie to Mysql. 

I would like to know how to create a table with
variable length records?

i have an object with following variables:
varchar v, int a, int b, int c.

and i want to store variable number of such objects
into the rows.
varchar v is the primary key.

the entries in the table would look like:
v11,a11,b11,c11,a12,b12,c12,a1,b13,c13
v21,a21,b21,c21,a22,b22,c22

Can you please help me with my problem?

Thanx in advance.

-Sagar




__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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




Computer Exploded!!!

2001-05-01 Thread Selvin Sakal

My computer didn't explode i just wrote that to get attention. My question
is this - I have a database with a table which looks like this -

CREATE TABLE sites
(
ID INT NOT NULL AUTO_INCREMENT,
name VARCHAR(30) NOT NULL,
keywords VARCHAR(200) NOT NULL DEFAULT 0,
description VARCHAR(200) NOT NULL DEFAULT 0,
url VARCHAR(50) NOT NULL,
rank blob NOT NULL,
PRIMARY KEY (ID)
);

there is a index on keywords and description

what i would like to know is how to search description to see if it contains 
a word like 'web'.

i would also like to know how to search description and keyword for specific
words like this -

say description has 'the best search engine on the net'

i want to search for all the descriptions that contain 'best' and 'net'.

If i don't get help soon my computer might explode.

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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




problem

2001-05-01 Thread aditya shanker

hi 
i am attaching a log file which was generated by the server in starting up mysql 
could any please tell me what exactlly the problen is 


log file 
=
010427 18:25:29  mysqld started
010427 18:25:29  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010427 18:25:29  mysqld ended

010427 18:26:05  mysqld started
010427 18:26:05  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010427 18:26:05  mysqld ended

010427 18:34:12  mysqld started
/usr/local/mysql/bin/mysqld: ready for connections
010427 20:23:30  Aborted connection 10 to db: 'unconnected' user: 'root' host: 
`localhost' (Got an error reading communication packets)
010427 20:27:15  Aborted connection 17 to db: 'unconnected' user: 'root' host: 
`localhost' (Got an error writing communication packets)
010427 20:27:15  /usr/local/mysql/bin/mysqld: Normal shutdown

010427 20:27:15  /usr/local/mysql/bin/mysqld: Shutdown Complete

010427 20:27:15  mysqld ended

010430 12:10:00  mysqld started
010430 12:10:01  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010430 12:10:01  mysqld ended

010430 15:45:30  mysqld started
010430 15:45:30  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010430 15:45:30  mysqld ended

010430 15:46:20  mysqld started
010430 15:46:20  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010430 15:46:20  mysqld ended

010501 10:29:42  mysqld started
010501 10:29:42  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010501 10:29:42  mysqld ended

010501 10:30:34  mysqld started
010501 10:30:34  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010501 10:30:34  mysqld ended

010501 10:41:05  mysqld started
010501 10:41:05  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010501 10:41:05  mysqld ended

010501 11:06:18  mysqld started
010501 11:06:18  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010501 11:06:18  mysqld ended

010501 11:42:37  mysqld started
010501 11:42:37  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010501 11:42:37  mysqld ended

010501 11:52:29  mysqld started
010501 11:52:29  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
010501 11:52:29  mysqld ended

010501 12:37:43  mysqld started
Fatal error: Can't change to run as user 'ser=mysql' ;  Please check that the user 
exists!
010501 12:37:43  Aborting

010501 12:37:43  mysqld ended

010501 12:47:05  mysqld started
/usr/local/mysql/bin/mysqld: ready for connections




Re: Query Question

2001-05-01 Thread sagar tamhane

Hi,

Since you have over 10,000 member ids it depends on
the exact appln that you have.

If the length of the SQL query increases above a
certain length (i am not sure abt the exact figure),
an error is thrown saying  query too complex.

such wont be the case in your former method.

but,
if there are n member ids to be updated, the former
update query will have to be executed n number of
times, giving n disk accesses from your VB program,
while the later query would need just 1.

So if you can guarentee that the query string will not
become too long, then the later update statement is
good.
If you are not sure, its better to go for the former
update stmt and forget abt disk write time(at least ur
program wont crash).

-Sagar


__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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




Help MySQL on website...

2001-05-01 Thread Mads Andersen

Hi can anyone, please help me!!!

I need to put a MySQL database onto my website???

What do I have to do to make this work???

Is it just 1 file that I have to upload, or do I
have to do something more?

My web-service-provider, have enabled my
website, so that it can run a MySQL database???

Please Help!

Cheers,

Mads

PS: the server administrator told me thta they installed a mysql-adon or something???




Re: MERGE Tables

2001-05-01 Thread Basil Hussain

Hi,

 Ok, the first bug (incorrect COUNT, etc. for MERGE and individual tables)
 was fixed some time ago. Though, it is possible that you found another bug,
 the probability is low.

I thought I might be encountering actual bugs in the code in my 3.23.32
version. I'd taken a look at the changelog to see if any fixes seemed to
apply to this situation, but it wasn't very clear.

 As for the second - ALTER TABLE ... UNION = () is absolutely legal syntax
 and MySQL does support it (if you have source distribution, look at
 mysql-test/t/merge.test). So, let's upgrade now, and then we'll see.

I had no doubt it was supported - so I knew MySQL must've been lying when it
said it didn't support that operation... :) I assume this has been fixed
also in later versions, yes?

So, it looks like I need to upgrade my server. I've just been looking at the
changelog again and I notice there are some entries for 3.23.38 - is there a
new release imminent? Should I wait for this, or just upgrade to 3.23.37
now?

Regards,


Basil Hussain ([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




Mysql server grant privileges problem

2001-05-01 Thread Tom Cheung

Hello everyone:
After I have successfully installed mysql server 3.23.37 and connect 
to it and do some operations.but I have found that there is a security 
hole that other users can use mysql database !!!.

And I have started the server like that:
bin/safe_mysqld -Sg 

then
mysqlgrant all privileges on *.* to root@localhost
  identified by the_new_password
  \G
ERROR 1047: Unknown command

So would anyone explain to me how can I setup up a good privileges of 
mysql server.Thx


-
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: To install MySQL, where can free download Lunix?

2001-05-01 Thread Jon Haworth

http://www.slackware.com/ (IMHO the best distro)

Other distros:
http://www.suse.com/
http://www.debian.com/
http://www.mandrake.com/
http://www.redhat.com/
etc

A google for download linux would have answered the question for you, BTW.

HTH
Jon


-Original Message-
From: johnd [mailto:[EMAIL PROTECTED]]
Sent: 30 April 1999 18:04
To: [EMAIL PROTECTED]
Subject: To install MySQL, where can free download Lunix?


Hi, 

I would like to install MySQL. I want to setup Lunix on IBM compatible
computer. Do you know where I can get free download Lunix recent version?

Thank you very much.

John Ding


**
'The information included in this Email is of a confidential nature and is 
intended only for the addressee. If you are not the intended addressee, 
any disclosure, copying or distribution by you is prohibited and may be 
unlawful. Disclosure to any party other than the addressee, whether 
inadvertent or otherwise is not intended to waive privilege or confidentiality'

**

-
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: Mysql server grant privileges problem

2001-05-01 Thread B. van Ouwerkerk



So would anyone explain to me how can I setup up a good privileges of 
mysql server.Thx

Take a look at the manual. It's all there.. as far as I remember..

Bye,


B.


-
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: To install MySQL, where can free download Lunix?

2001-05-01 Thread Freaked Personality

I agree with u slack rules, you download slackware and I believe some
other distros too at ftp.cdrom.com

have fun


On Tue, 1 May 2001, Jon Haworth wrote:

 http://www.slackware.com/ (IMHO the best distro)
 
 Other distros:
 http://www.suse.com/
 http://www.debian.com/
 http://www.mandrake.com/
 http://www.redhat.com/
 etc
 
 A google for download linux would have answered the question for you, BTW.
 
 HTH
 Jon
 
 
 -Original Message-
 From: johnd [mailto:[EMAIL PROTECTED]]
 Sent: 30 April 1999 18:04
 To: [EMAIL PROTECTED]
 Subject: To install MySQL, where can free download Lunix?
 
 
 Hi, 
 
 I would like to install MySQL. I want to setup Lunix on IBM compatible
 computer. Do you know where I can get free download Lunix recent version?
 
 Thank you very much.
 
 John Ding
 
 
 **
 'The information included in this Email is of a confidential nature and is 
 intended only for the addressee. If you are not the intended addressee, 
 any disclosure, copying or distribution by you is prohibited and may be 
 unlawful. Disclosure to any party other than the addressee, whether 
 inadvertent or otherwise is not intended to waive privilege or confidentiality'
 
 **
 
 -
 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: What can I do to help the mysql developers to get mysql to work on OS X?

2001-05-01 Thread Sinisa Milivojevic

[EMAIL PROTECTED] writes:
 So, I'd really like to have mysql working on OS X and while there were a 
 few people trying it out and having difficulty, I have yet to see any 
 posts of total success.
 
 I'm an experienced MacOS programmer, but I have little experience on 
 Unix --  so I'm way behind the curve on looking at the source and 
 figuring it out.  My only thought is to try to dive in and run mysqld 
 via gdb and then try to figure out the source tree sufficiently to see 
 where the shutdown (HUP?) message is getting handled and then set a 
 breakpoint to see if that code is ever getting called and watch where it 
 gets stuck by tracing from there.
 
 Unfortunately, I don't know how to use gdb (yet), and there is a LOT of 
 source to slog through to find where the shutdown code is.Perhaps a 
 more experienced unix hack could recommend some starting places; perhaps 
 someone more experienced with the mysql source could point me to the 
 locations of signal handling code (I hope it's not too obvious, since I 
 haven't even looked yet... :-(  Got to get gdb working first... ).
 
 
 So, if there is something I can do here to help get the issues resolved, 
 I'd like to do so.  Please feel free to email me directly with 
 suggestions, staring points etc.,  if that helps.
 
 Thanks,
 Tyler
 [EMAIL PROTECTED]
 
 
 P.S.  The problems I have seen posted and experienced myself are:
 
 1) the small edit to get it to compile (not a big deal, but should get 
 fixed)
 
 2) The mysqld cannot be stopped short of kill -9
 
 3) trying to use mysqladmin shutdown to stop mysqld (and safe_mysql) 
 fails (hangs, requires kill -9 to halt)
 
 4) the tests do not work.
   4a) make test fails
   4b) mysql-test-run   fails
 


Hi!

Yes, you can help MySQL being better ported to OS X.

You should first learn to use gdb ... ;o)

It is truly not so difficult.

There are also some GUI interfaces for it. I do not know which ones
work on OS X.

Regarding a diff to make it compile, if you have not sent it to us,
please do.

Regarding second and third problem, you should take a deeper look at
OS X signals and try to see what goes on. Signal handling is all done
in mysqld.cc in sql/ subdir.

Regarding failing tests, you should examine the error log.


Regards,

Sinisa

    __ _   _  ___ ==  MySQL AB
 /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaca, Cyprus
  /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
  /*/^^^\*\^^^
 /*/ \*\Developers Team

-
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




memory leaks problem

2001-05-01 Thread munish-gupta

hi,
i have a process running in daemon
to maintain a database connection
i am using mysql_ping
before every query
the program is having large memory leaks
is it because of mysql_ping
what happens to previous mysql handler
is it freed or re used

pls reply
munish


-
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 with mysqlshow under linux

2001-05-01 Thread Gerald Clark

Start the server.

Siomara Pantarotto wrote:

 Hi all,
 
 When I try to execute mysqlshow under linux I get this message:
 
 $ mysqlshow
 mysqlshow: Can't connect to local MySQL server through socket 
 '/tmp/mysqld.sock'
 (111)
 $
 
 However when I do the same under NT it works fine
 
 E:\Program Files\mysql\binmysqlshow
 +---+
 | Databases |
 +---+
 | BUGUNISON |
 | mysql |
 | test  |
 +---+
 
 Can someone help me with this issue???
 
 Thanks so much
 
 Siomara
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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


-- 
Gerald L. Clark
[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: MATCH AGAINST 2-3 tables

2001-05-01 Thread Gerald Clark

You need to add the table joining information the the where clause so 
the join only returns properly joined records.

EX: where ta.id=tb.id

Paul Van Slyke wrote:

 Thanks for the response!
 
 The two tables contain different types of information which are related
 by a foreign key (orginally designed that way).However, there is no
 reason that there can't be a single table that contains both (actually 3
 seperate tables) sets of data.  Unfortunately, building the
 FULLTEXT index on the third table is incredibly slow on tables sizes
 500Megs or more.
 
 So, it sounds like we don't have much of a choice.  Your suggestion to
 have one table for the FULLTEXT searches seems the best way to go.
 
 What we decided to do is to compile mysql-4.0, build a combined table of
 the three (which will be over a GIG) and index it under 4.0.  Then move
 the tables over to 3.23 for production use.
 
 Thanks!  Off to compile 4.0!
 
 Paul
 
 
 
 I've got two seperate tables that I would like to query using a MATCH
 
 ...
 
 AGAINST() syntax.
 
 
 Why are they two separate tables?
 
 
 If I run the query individually on one table, the
 speed of the returned results is great!  Very fast, indeed.  However,
 when I try and use the following statement for querying both tables at
 the same time, it is painfully slow.  Too slow to use in a production
 environment.
 
 
 SELECT DISTINCT * from tA, tB WHERE MATCH tA.aName AGAINST ('name') ||
 MATCH tB.bName AGAINST ('name');
 
 
 You are doing a join between two tables.  This means that if table A
 has 100 matches and table B has 400 matches, you get 40,000 results
 (before applying DISTINCT).  *SLOW* !!!
 
 I don't know the structure of your tables, but if they are identical,
 why aren't these in one table (with an extra column for which table
 they belong in) ?
 
 
 The fast queries are
 SELECT DISTINCT * from tAWHERE MATCH tA.aName AGAINST ('name');
 SELECT DISTINCT * from tBWHERE MATCH tB.bName AGAINST ('name');
 
 
 Gordon L. Burditt
 
 
 -
 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


-- 
Gerald L. Clark
[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: Computer Exploded!!!

2001-05-01 Thread Gerald Clark

1. Read the manual
2. Read the manual
3. get a book on SQL


Selvin Sakal wrote:

 My computer didn't explode i just wrote that to get attention. My question
 is this - I have a database with a table which looks like this -
 
 CREATE TABLE sites
 (
 ID INT NOT NULL AUTO_INCREMENT,
 name VARCHAR(30) NOT NULL,
 keywords VARCHAR(200) NOT NULL DEFAULT 0,
 description VARCHAR(200) NOT NULL DEFAULT 0,
 url VARCHAR(50) NOT NULL,
 rank blob NOT NULL,
 PRIMARY KEY (ID)
 );
 
 there is a index on keywords and description
 
 what i would like to know is how to search description to see if it 
 contains a word like 'web'.
 
 i would also like to know how to search description and keyword for 
 specific
 words like this -
 
 say description has 'the best search engine on the net'
 
 i want to search for all the descriptions that contain 'best' and 'net'.
 
 If i don't get help soon my computer might explode.
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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


-- 
Gerald L. Clark
[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: Help MySQL on website...

2001-05-01 Thread Gerald Clark

Well, if you have to ask, then you are not ready.

You need to discuss this with your ISP.
Thay may have an implementation doc that shows you what you need to do.

In the mean time, get a box, Linux, MySQL, Apache, and PHP.

Read the manuals on all these, and pay special attention to the apache
installation instructions.

You may want to buy one of the Web-in-a-box packages that walk you
through it.

At any rate you have some reading to do.

Mads Andersen wrote:

 Hi can anyone, please help me!!!
 
 I need to put a MySQL database onto my website???
 
 What do I have to do to make this work???
 
 Is it just 1 file that I have to upload, or do I
 have to do something more?
 
 My web-service-provider, have enabled my
 website, so that it can run a MySQL database???
 
 Please Help!
 
 Cheers,
 
 Mads
 
 PS: the server administrator told me thta they installed a mysql-adon or something???


-- 
Gerald L. Clark
[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: Is my table hosed?

2001-05-01 Thread Gerald Clark

Stop the server, then myisamchk the index.

Carina C. Zona wrote:

 MySQL 3.23.33:
 
 This morning, one of my tables suddenly reported index corruption.  I locked
 the table, fixed with myisamchk -o, unlocked, and thought the problem was
 solved.  But it keeps on re-corrupting (I'm not even writing anything to it
 first).  Plus any query on that table which uses a where clause takes an
 *extremely long time to execute.  Queries that normally take .01 seconds are
 taking 10-15 *minutes*.  Or more.
 
 DESC TABLE shows that the indexes are all still in place.  I even tried
 dropping and re-creating an index, but that didn't seem to make a
 difference.  EXPLAIN on the queries shows that MySQL still knows to use the
 indexes that are there.  Yet obviously something is quite wrong.  One other
 odd thing: after one of the (many) repair operations, I started getting
 disk quota filled errors.  It turned out that a 142M file with the prefix
 #sql had surfaced in /tmp.  I deleted it, and things went back to
 semi-normal after that (everything working, but the table still extra slow).
 Where did that big file come from?  My whole db is only 8M, the corrupted
 table is only 4M, so does it sound right that a 142M temp file was somehow
 generated..?
 
 Odd.  Anyway, I'm hoping someone recognizes this problem and can point me
 toward the right section of the manual to learn how to fix it.  fingers
 crossed that the table is still recoverable...
 
 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


-- 
Gerald L. Clark
[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: ORDER BY DESC optimization

2001-05-01 Thread Gerald Clark

First, you don't have an index on 'b', and second, you don't have 'b' in 
the where clause, so it would not use it if it had one.

It needs to sort the result set before it can apply the limit.

ryc wrote:

 I have a fairly large table (greater than 4mil rows) that I would to preform
 a query like:
 
 SELECT col1,col2 FROM table WHERE a=1, c=2 ORDER BY b DESC LIMIT 50;
 
 I have an index on the table INDEX1( a,b,c );
 
 When running the query as is, it takes around 4seconds. If I omit the DESC
 part the query runs in a fraction of a second.
 
 I would like the query to run faster when I use DESC. I looked at
 myisamchk -R to sort by the 'b' index but I want to be sure it will speed up
 my query since it may take a while to sort all 4million rows.
 
 Does anyone have guidance on how to accomplish this? is myisamchk -R what I
 want?
 
 Thanks.
 
 ryan
 
 
 -
 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


-- 
Gerald L. Clark
[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: Computer Exploded!!!

2001-05-01 Thread Ravi Raman

hi.

a link to the relevant section of the manual might be more helpful.
http://www.mysql.com/doc/F/u/Fulltext_Search.html

-ravi.

-Original Message-
From: Gerald Clark [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 9:25 AM
To: Selvin Sakal
Cc: [EMAIL PROTECTED]
Subject: Re: Computer Exploded!!!


1. Read the manual
2. Read the manual
3. get a book on SQL


Selvin Sakal wrote:

 My computer didn't explode i just wrote that to get attention. My question
 is this - I have a database with a table which looks like this -

 CREATE TABLE sites
 (
 ID INT NOT NULL AUTO_INCREMENT,
 name VARCHAR(30) NOT NULL,
 keywords VARCHAR(200) NOT NULL DEFAULT 0,
 description VARCHAR(200) NOT NULL DEFAULT 0,
 url VARCHAR(50) NOT NULL,
 rank blob NOT NULL,
 PRIMARY KEY (ID)
 );

 there is a index on keywords and description

 what i would like to know is how to search description to see if it
 contains a word like 'web'.

 i would also like to know how to search description and keyword for
 specific
 words like this -

 say description has 'the best search engine on the net'

 i want to search for all the descriptions that contain 'best' and 'net'.

 If i don't get help soon my computer might explode.

 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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


--
Gerald L. Clark
[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: Computer Exploded!!!

2001-05-01 Thread AJDIN BRANDIC

On Tue, 1 May 2001, Gerald Clark wrote:

 1. Read the manual
 2. Read the manual
 3. get a book on SQL
 
 
 Selvin Sakal wrote:
 
  My computer didn't explode i just wrote that to get attention. My question
  is this - I have a database with a table which looks like this -
  
  CREATE TABLE sites
  (
  ID INT NOT NULL AUTO_INCREMENT,
  name VARCHAR(30) NOT NULL,
  keywords VARCHAR(200) NOT NULL DEFAULT 0,
  description VARCHAR(200) NOT NULL DEFAULT 0,
  url VARCHAR(50) NOT NULL,
  rank blob NOT NULL,
  PRIMARY KEY (ID)
  );
  
  there is a index on keywords and description
  
  what i would like to know is how to search description to see if it 
  contains a word like 'web'.

select * from sites where description like '%web%'

  
  i would also like to know how to search description and keyword for 
  specific
  words like this -
  
  say description has 'the best search engine on the net'
  
  i want to search for all the descriptions that contain 'best' and 'net'.
  

select * from sites where description like '%best%' AND description  like 
'%net%'

  If i don't get help soon my computer might explode.
  

Uf,

Ajdin

  _
  Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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
 
 
 -- 
 Gerald L. Clark
 [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: problem

2001-05-01 Thread Gerald Clark

Mysql does not own its own files, so it can't open them
chown -R mysql /usr/local/mysql/var
or
chown -R mysql /var/mysql

whichever is correct for your system.


aditya shanker wrote:

 hi 
 i am attaching a log file which was generated by the server in starting up mysql 
 could any please tell me what exactlly the problen is 
 
 
 log file 
 =
 010427 18:25:29  mysqld started
 010427 18:25:29  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010427 18:25:29  mysqld ended
 
 010427 18:26:05  mysqld started
 010427 18:26:05  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010427 18:26:05  mysqld ended
 
 010427 18:34:12  mysqld started
 /usr/local/mysql/bin/mysqld: ready for connections
 010427 20:23:30  Aborted connection 10 to db: 'unconnected' user: 'root' host: 
`localhost' (Got an error reading communication packets)
 010427 20:27:15  Aborted connection 17 to db: 'unconnected' user: 'root' host: 
`localhost' (Got an error writing communication packets)
 010427 20:27:15  /usr/local/mysql/bin/mysqld: Normal shutdown
 
 010427 20:27:15  /usr/local/mysql/bin/mysqld: Shutdown Complete
 
 010427 20:27:15  mysqld ended
 
 010430 12:10:00  mysqld started
 010430 12:10:01  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010430 12:10:01  mysqld ended
 
 010430 15:45:30  mysqld started
 010430 15:45:30  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010430 15:45:30  mysqld ended
 
 010430 15:46:20  mysqld started
 010430 15:46:20  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010430 15:46:20  mysqld ended
 
 010501 10:29:42  mysqld started
 010501 10:29:42  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 10:29:42  mysqld ended
 
 010501 10:30:34  mysqld started
 010501 10:30:34  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 10:30:34  mysqld ended
 
 010501 10:41:05  mysqld started
 010501 10:41:05  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 10:41:05  mysqld ended
 
 010501 11:06:18  mysqld started
 010501 11:06:18  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 11:06:18  mysqld ended
 
 010501 11:42:37  mysqld started
 010501 11:42:37  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 11:42:37  mysqld ended
 
 010501 11:52:29  mysqld started
 010501 11:52:29  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 11:52:29  mysqld ended
 
 010501 12:37:43  mysqld started
 Fatal error: Can't change to run as user 'ser=mysql' ;  Please check that the user 
exists!
 010501 12:37:43  Aborting
 
 010501 12:37:43  mysqld ended
 
 010501 12:47:05  mysqld started
 /usr/local/mysql/bin/mysqld: ready for connections


-- 
Gerald L. Clark
[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




Empty Set Query question

2001-05-01 Thread Erica B. Tanner

Hello everyone.  I am new to this list and hope it's the right one for
my question.  This may be really obvious, but I can't seem to figure it
out...so here's the problem:

I have a table that stores network incident report information, IP
address, dates, type of incident, report name, etc.  I am trying to
query the table for a specific ip address that's in the source_ip
field.  I can see that the record is there when I query all of the
records, but when I query for one specific ip, I get the empty set
result! :(

Here is my query

select * from IDReport where source_ip=xxx.xxx.xxx.xxx;

The field type is char(16).  Any ideas why mysql is not finding that
record??

I appreciate ANY help on this matter!!! :)
Thanks,
Erica

--
Erica B. Tanner
Naval Surface Warfare Center, Dahlgren Division
Advanced Computation Technology Group
[EMAIL PROTECTED]
540.653.5796




-
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: Computer Exploded!!!

2001-05-01 Thread Gerald Clark


Why not start with the table of contents.
I might have been more helpful, but
I don't think trying to cover lazy with cute is a good approach to life.

Ravi Raman wrote:

 hi.
 
 a link to the relevant section of the manual might be more helpful.
 http://www.mysql.com/doc/F/u/Fulltext_Search.html
 
 -ravi.
 
 -Original Message-
 From: Gerald Clark [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, May 01, 2001 9:25 AM
 To: Selvin Sakal
 Cc: [EMAIL PROTECTED]
 Subject: Re: Computer Exploded!!!
 
 
 1. Read the manual
 2. Read the manual
 3. get a book on SQL
 
 
 Selvin Sakal wrote:
 
 
 My computer didn't explode i just wrote that to get attention. My question
 is this - I have a database with a table which looks like this -
 
 CREATE TABLE sites
 (
 ID INT NOT NULL AUTO_INCREMENT,
 name VARCHAR(30) NOT NULL,
 keywords VARCHAR(200) NOT NULL DEFAULT 0,
 description VARCHAR(200) NOT NULL DEFAULT 0,
 url VARCHAR(50) NOT NULL,
 rank blob NOT NULL,
 PRIMARY KEY (ID)
 );
 
 there is a index on keywords and description
 
 what i would like to know is how to search description to see if it
 contains a word like 'web'.
 
 i would also like to know how to search description and keyword for
 specific
 words like this -
 
 say description has 'the best search engine on the net'
 
 i want to search for all the descriptions that contain 'best' and 'net'.
 
 If i don't get help soon my computer might explode.
 
 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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
 
 
 
 --
 Gerald L. Clark
 [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


-- 
Gerald L. Clark
[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




bug report

2001-05-01 Thread Aurelian Dumitru




Please record the following bug identified on the MySQL server:

1. Hardware: SUN Ultra 10
2. Operating system: Sun Solaris 2.7
2. MySQL server version: 3.23.33
3. Error description:
 - The following SQL statement returns incorrect results when is executed
using the 'mysql' client: SELECT @myvar := ( CURRENT_DATE - 1) ;
 - I ran this query every day. It worked fine untill May 1st, 2001, when the
above query returned the following value: 20010500 . It should have returned
20010430.

Aurelian Dumitru
[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: problem

2001-05-01 Thread Thalis A. Kalfigopoulos

Your mysql database (a system db with the access privileges) has a table called host 
which has amongst other files, one called host.frm
It seems that mysqld doesn't have permission to read this file.
Check that the mysqld owner and this file's owner are the same and change accordingly.

regards,
thalis

p.s. in general do a:
$ perror error_code 
to see what the error you are getting means. Eg your error gave:
Error code  13:  Permission denied


On Tue, 1 May 2001, aditya shanker wrote:

 hi 
 i am attaching a log file which was generated by the server in starting up mysql 
 could any please tell me what exactlly the problen is 
 
 
 log file 
 =
 010427 18:25:29  mysqld started
 010427 18:25:29  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010427 18:25:29  mysqld ended
 
 010427 18:26:05  mysqld started
 010427 18:26:05  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010427 18:26:05  mysqld ended
 
 010427 18:34:12  mysqld started
 /usr/local/mysql/bin/mysqld: ready for connections
 010427 20:23:30  Aborted connection 10 to db: 'unconnected' user: 'root' host: 
`localhost' (Got an error reading communication packets)
 010427 20:27:15  Aborted connection 17 to db: 'unconnected' user: 'root' host: 
`localhost' (Got an error writing communication packets)
 010427 20:27:15  /usr/local/mysql/bin/mysqld: Normal shutdown
 
 010427 20:27:15  /usr/local/mysql/bin/mysqld: Shutdown Complete
 
 010427 20:27:15  mysqld ended
 
 010430 12:10:00  mysqld started
 010430 12:10:01  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010430 12:10:01  mysqld ended
 
 010430 15:45:30  mysqld started
 010430 15:45:30  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010430 15:45:30  mysqld ended
 
 010430 15:46:20  mysqld started
 010430 15:46:20  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010430 15:46:20  mysqld ended
 
 010501 10:29:42  mysqld started
 010501 10:29:42  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 10:29:42  mysqld ended
 
 010501 10:30:34  mysqld started
 010501 10:30:34  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 10:30:34  mysqld ended
 
 010501 10:41:05  mysqld started
 010501 10:41:05  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 10:41:05  mysqld ended
 
 010501 11:06:18  mysqld started
 010501 11:06:18  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 11:06:18  mysqld ended
 
 010501 11:42:37  mysqld started
 010501 11:42:37  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 11:42:37  mysqld ended
 
 010501 11:52:29  mysqld started
 010501 11:52:29  /usr/local/mysql-3.23.36-pc-linux-gnu-i686/bin/mysqld: Can't find 
file: './mysql/host.frm' (errno: 13)
 010501 11:52:29  mysqld ended
 
 010501 12:37:43  mysqld started
 Fatal error: Can't change to run as user 'ser=mysql' ;  Please check that the user 
exists!
 010501 12:37:43  Aborting
 
 010501 12:37:43  mysqld ended
 
 010501 12:47:05  mysqld started
 /usr/local/mysql/bin/mysqld: ready for connections
 
 


-
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: newbie question on variable length records.

2001-05-01 Thread Tim


This is straight from 7.7.1 of the MySQL manual:

*
If any column in a table has a variable length, the entire row is
variable-length as a result. Therefore, if a table contains any
variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR columns longer
than three characters are changed to VARCHAR columns. This doesn't affect
how you use the columns in any way; in MySQL, VARCHAR is just a different
way to store characters. MySQL performs this conversion because it saves
space and makes table operations faster. See section 8 MySQL Table Types.
*

http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html

- TIM FRASER

 Hi,

 I am a newbie to Mysql.

 I would like to know how to create a table with
 variable length records?

 i have an object with following variables:
 varchar v, int a, int b, int c.

 and i want to store variable number of such objects
 into the rows.
 varchar v is the primary key.

 the entries in the table would look like:
 v11,a11,b11,c11,a12,b12,c12,a1,b13,c13
 v21,a21,b21,c21,a22,b22,c22

 Can you please help me with my problem?

 Thanx in advance.

 -Sagar




 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.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




-
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: ORDER BY DESC optimization

2001-05-01 Thread Thalis A. Kalfigopoulos

On Mon, 30 Apr 2001, ryc wrote:

 I have a fairly large table (greater than 4mil rows) that I would to preform
 a query like:
 
 SELECT col1,col2 FROM table WHERE a=1, c=2 ORDER BY b DESC LIMIT 50;
 
 I have an index on the table INDEX1( a,b,c );
 
 When running the query as is, it takes around 4seconds. If I omit the DESC
 part the query runs in a fraction of a second.
 
 I would like the query to run faster when I use DESC. I looked at
 myisamchk -R to sort by the 'b' index but I want to be sure it will speed up
 my query since it may take a while to sort all 4million rows.

To improve things I'd suggest you drop the (a,b,c) index and create two new ones:
one on (a,c)
and another on (b)
and then do the myisamchk -R on the second index
You might also consider the --sort-records=# option

regards,
thalis


-
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: trouble installing mysql rpm on Linux

2001-05-01 Thread Nathaniel Hekman

I installed only mysql-3.23.32-1.7.i386.rpm -- at
ftp://ftp.redhat.com/redhat/linux/7.0/en/os/i386/RedHat/RPMS/ there is no
mysql-client, so I thought maybe the client was included in the same
package.  Now that you mention it, I just noticed that in the 7.1 directory
there is a mysqlclient9-3.23.22-4.i386.rpm, as well as a newer version of
whatever I had before, mysql-3.23.36-1.i386.rpm.  There's also a
mysql-server-3.23.36-1.i386.rpm, which makes me think the other does indeed
contain both client and server.  Anyway, I'll give those a try...  

What is this post installation you mention?  Where are those steps
documented?  I'll re-check the mysql docs, but from what I read earlier it
looked to me like with an rpm all I had to do was install.  Obviously I'll
have to set up some users and such, but I thought at least the daemon should
be running.

Thanks for your help.


Nate

-Original Message-
From: Rolf Hopkins [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 9:27 PM
To: Nathaniel Hekman; [EMAIL PROTECTED]
Subject: Re: trouble installing mysql rpm on Linux


Did you download and install both client and server? Have you gone through
post installation?

- Original Message -
From: Nathaniel Hekman [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 01, 2001 6:45
Subject: trouble installing mysql rpm on Linux


 I'm having trouble installing the MySQL RPM on Linux.  I've got
 mysql-3.23.32-1.7.i386.rpm and I'm on RH Linux 7.0.  I run 'rpm -i
 mysql-3.23.32-1.7.i386.rpm' and it shows no errors, but then I try running
 'mysql' (the client) and get this error:

 ERROR 2002: Can't connect to local MySQL server through socket
 '/var/lib/mysql/mysql.sock' (111)

 It's not too difficult to figure out why:  the mysql daemon isn't running.
 'ps a | grep -i mysql' comes up empty; there's nothing in /etc/rc.d to
start
 mysql.  I found a file /usr/share/mysql/mysql.server which is a script
that
 says it's supposed to be run from /etc/rc.d, but it's 644 (not
executable),
 and definitely not linked to rc.d.  There are a lot of mysql* files in
 /usr/bin...

 What am I missing?  Did the rpm get installed correctly and there's just
 some other step I'm supposed to do?  Or did it not install correctly?  How
 can I tell?

 Any help would be appreciated.  Thanks in advance.


 Nate

 -
 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: bug report

2001-05-01 Thread Simon Windsor

Hi

Try

 select from_days(to_days(curdate())-1);

+-+
| from_days(to_days(curdate())-1) |
+-+
| 2001-04-30  |
+-+
1 row in set (0.00 sec)


Simon


On Tuesday 01 May 2001 14:45, Aurelian Dumitru wrote:
 Please record the following bug identified on the MySQL server:

 1. Hardware: SUN Ultra 10
 2. Operating system: Sun Solaris 2.7
 2. MySQL server version: 3.23.33
 3. Error description:
  - The following SQL statement returns incorrect results when is
 executed using the 'mysql' client: SELECT @myvar := ( CURRENT_DATE - 1) ;
  - I ran this query every day. It worked fine untill May 1st, 2001,
 when the above query returned the following value: 20010500 . It should
 have returned 20010430.

 Aurelian Dumitru
 [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

-- 
Simon Windsor

CricInfo http://www.cricinfo.com/
Tel: +44 (0) 1249 700744
Fax: +44 (0) 1249 700725
Email: mailto:[EMAIL PROTECTED]

This email message is for the sole use of the intended recipient(s) and may contain
confidential and privileged information.  Any unauthorized review, use, disclosure or
distribution is prohibited.  If you are not the intended recipient, please contact the
sender by reply email and destroy all copies of the original message.  Thank you for 
your
cooperation and assistance. 

-
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: Empty Set Query question

2001-05-01 Thread Gerald Clark

You are doing a text compare, and they have to match exactly,
including leading zeros after the dots.

You might look at storing them as integers. MySQL has to functions
INET_ATON() and INET_NTOA() to convert them back and forth to strings.

Erica B. Tanner wrote:

 Hello everyone.  I am new to this list and hope it's the right one for
 my question.  This may be really obvious, but I can't seem to figure it
 out...so here's the problem:
 
 I have a table that stores network incident report information, IP
 address, dates, type of incident, report name, etc.  I am trying to
 query the table for a specific ip address that's in the source_ip
 field.  I can see that the record is there when I query all of the
 records, but when I query for one specific ip, I get the empty set
 result! :(
 
 Here is my query
 
 select * from IDReport where source_ip=xxx.xxx.xxx.xxx;
 
 The field type is char(16).  Any ideas why mysql is not finding that
 record??
 
 I appreciate ANY help on this matter!!! :)
 Thanks,
 Erica
 
 --
 Erica B. Tanner
 Naval Surface Warfare Center, Dahlgren Division
 Advanced Computation Technology Group
 [EMAIL PROTECTED]
 540.653.5796
 
 
 
 
 -
 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


-- 
Gerald L. Clark
[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: Problem with LAST_INSERT_ID();

2001-05-01 Thread Fredrick Bartlett

This works for me.  You will have to translate the javascript to whatever you are using
...

 SQL = insert into myTable(field2, field3, field4) values(dat2, dat3, dat4)
 var dataConn = Server.CreateObject(ADODB.Connection);
 dataConn.open(MM_soCalData_STRING);
 var rs1 = dataConn.Execute(SQL); // Here my record is inserted
 rs1 = null;

  SQL = select field1 from myTable where field1 = last_insert_id(); //field1 is the
auto_increment field
  var rs2 = dataConn.Execute(SQL)
  if (rs2.Eof==false){
   lastIDvar = rs2(field1);
   rs2 = null;
  }

Fred van Engen wrote:

 On Sun, Apr 29, 2001 at 03:38:07PM +0200, [EMAIL PROTECTED] wrote:
  My insert query look like your
  'INSERT INTO ordinit(ID_ordine, Cod_Cliente) VALUES (NULL, 10);';
  after the query I look into the table 'ordinit' and always looks fine: the value of
  ID_ordine is really incremented.
  But the following 'select LAST_INSERT_ID()' return zero :-((

 Weird. I've used them often (on ISAM tables) and it works just fine.

 Do you use the same connection for the 'LAST_INSERT_ID' query as for
 the INSERT query? The LAST_INSERT_ID is kept per connection and until
 another INSERT is done.

 Regards,

 Fred.

  What does your INSERT query look like? It should specify NULL
  for ID_ordine, e.g.:
 
  INSERT INTO ordinit(ID_ordine, Cod_Cliente) VALUES (NULL, 10);
 
  Any other value for ID_ordine will not assign an auto_increment
  value.
 
 

 --
 Fred van Engen  XO Communications B.V.
 email: [EMAIL PROTECTED] Televisieweg 2
 tel: +31 36 5462400 1322 AC  Almere
 fax: +31 36 5462424 The Netherlands

 -
 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: newbie question on variable length records.

2001-05-01 Thread Rick Pasotto

I think he may be trying to put a variable number of *fields* in each
record. This of course cannot be done directly. If that is what he wants
he will need to have his own program merge/parse the data into a fixed
number of MySQL fields (columns).

On Tue, May 01, 2001 at 09:53:21AM -0400, Tim wrote:
 
 This is straight from 7.7.1 of the MySQL manual:
 
 *
 If any column in a table has a variable length, the entire row is
 variable-length as a result. Therefore, if a table contains any
 variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR columns longer
 than three characters are changed to VARCHAR columns. This doesn't affect
 how you use the columns in any way; in MySQL, VARCHAR is just a different
 way to store characters. MySQL performs this conversion because it saves
 space and makes table operations faster. See section 8 MySQL Table Types.
 *
 
 http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html
 
 - TIM FRASER
 
  Hi,
 
  I am a newbie to Mysql.
 
  I would like to know how to create a table with
  variable length records?
 
  i have an object with following variables:
  varchar v, int a, int b, int c.
 
  and i want to store variable number of such objects
  into the rows.
  varchar v is the primary key.
 
  the entries in the table would look like:
  v11,a11,b11,c11,a12,b12,c12,a1,b13,c13
  v21,a21,b21,c21,a22,b22,c22
 
  Can you please help me with my problem?
 
  Thanx in advance.
 
  -Sagar
 
 
 
 
  __
  Do You Yahoo!?
  Yahoo! Auctions - buy the things you want at great prices
  http://auctions.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
 
 
 
 
 -
 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
 

-- 
Tyranny is any political system (whether absolute monarchy or fascism
or communism) that does not recognize individual rights (which
necessarily include property rights).  The over-throw of a political
system by force is justified only when it is directed against tyranny;
it is an act of self-defense against those who rule by force.  For
example, the American Revolution.
-- Ayn Rand
   Rick Pasotto 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: ORDER BY DESC optimization

2001-05-01 Thread Thalis A. Kalfigopoulos

On Tue, 1 May 2001, Thalis A. Kalfigopoulos wrote:

 On Mon, 30 Apr 2001, ryc wrote:
 
  I have a fairly large table (greater than 4mil rows) that I would to preform
  a query like:
  
  SELECT col1,col2 FROM table WHERE a=1, c=2 ORDER BY b DESC LIMIT 50;
  
  I have an index on the table INDEX1( a,b,c );
  
  When running the query as is, it takes around 4seconds. If I omit the DESC
  part the query runs in a fraction of a second.
  
  I would like the query to run faster when I use DESC. I looked at
  myisamchk -R to sort by the 'b' index but I want to be sure it will speed up
  my query since it may take a while to sort all 4million rows.
 
 To improve things I'd suggest you drop the (a,b,c) index and create two new ones:
 one on (a,c)
 and another on (b)
 and then do the myisamchk -R on the second index
 You might also consider the --sort-records=# option

Sorry --sort-records is -R. I meant --sort-index.


regards,
thalis


-
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 performance

2001-05-01 Thread Raf Geusens

Hi,

I'm currently writing my final year thesis and i'm in need for some 
information on the efficiency of MySQL. If anyone knows a good site, book, 
paper etc ... pls let me know. I'm wondering how many request MySQL server 
can resolve per second and that kind of things.

Thanks in advance,
Raf
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.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: bug report

2001-05-01 Thread Steve Werby

Aurelian Dumitru [EMAIL PROTECTED] wrote:
 Please record the following bug identified on the MySQL server:

 1. Hardware: SUN Ultra 10
 2. Operating system: Sun Solaris 2.7
 2. MySQL server version: 3.23.33
 3. Error description:
  - The following SQL statement returns incorrect results when is
executed
 using the 'mysql' client: SELECT @myvar := ( CURRENT_DATE - 1) ;
  - I ran this query every day. It worked fine untill May 1st, 2001

I gues every day didn't include April 1, 2001 b/c that won't work either.

, when the
 above query returned the following value: 20010500 . It should have
returned
 20010430.

No, it returned the right value.  current_date returns a date of the format
'2001-05-01'.  When you do arithmetic on it, it's converted to an integer.
20010501 - 1 = 20010500 so it gave the currect value.  If you want to
subtract one day from a date do this:

SELECT DATE_SUB( current_date, INTERVAL 1 DAY );

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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: bug report

2001-05-01 Thread Steve Ruby



For over a year the topic of mathematical operations on date values
has been disussed. It has never been possible to perform such math
on a date value without using DATE_ADD or converting the to days or
seconds first.

Why is this now all the sudden a reasonable bug?

Aurelian:
I suggest that you use DATE_ADD, I'm quite sure what you have found
is not a bug 
20010501 - 1 = 20010500

MySQL sees CURRENT_DATE as the value 20010501 and performs your subtraction
as requested, if you want to subtract a day from today I suggest
DATE_ADD( CURRENT_DATE, INTERVAL -1 DAY )

Or the previously suggested TO_DAYS, FROM_DAYS method.




Sinisa Milivojevic wrote:
 
 Aurelian Dumitru writes:
 
 
 
  Please record the following bug identified on the MySQL server:
 
  1. Hardware: SUN Ultra 10
  2. Operating system: Sun Solaris 2.7
  2. MySQL server version: 3.23.33
  3. Error description:
   - The following SQL statement returns incorrect results when is executed
  using the 'mysql' client: SELECT @myvar := ( CURRENT_DATE - 1) ;
   - I ran this query every day. It worked fine untill May 1st, 2001, when the
  above query returned the following value: 20010500 . It should have returned
  20010430.
 
  Aurelian Dumitru
  [EMAIL PROTECTED]
 
 Hi!
 
 Thank you for a repeatable bug report.
 
 Regards,
 
 Sinisa
 
     __ _   _  ___ ==  MySQL AB
  /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
 /*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
/*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaca, Cyprus
   /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
   /*/^^^\*\^^^
  /*/ \*\Developers Team
 
 -
 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: bug report

2001-05-01 Thread Sinisa Milivojevic

Steve Ruby writes:
 
 
 For over a year the topic of mathematical operations on date values
 has been disussed. It has never been possible to perform such math
 on a date value without using DATE_ADD or converting the to days or
 seconds first.
 
 Why is this now all the sudden a reasonable bug?
 
 Aurelian:
 I suggest that you use DATE_ADD, I'm quite sure what you have found
 is not a bug 
 20010501 - 1 = 20010500
 
 MySQL sees CURRENT_DATE as the value 20010501 and performs your subtraction
 as requested, if you want to subtract a day from today I suggest
 DATE_ADD( CURRENT_DATE, INTERVAL -1 DAY )
 
 Or the previously suggested TO_DAYS, FROM_DAYS method.
 


You are right, of course !


Regards,

Sinisa

    __ _   _  ___ ==  MySQL AB
 /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaca, Cyprus
  /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
  /*/^^^\*\^^^
 /*/ \*\Developers Team

-
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




Newbie group/count query question

2001-05-01 Thread Graham Nichols

I have a table which contains a date column and an order_number column. I
need to formulate a query syntax to return the total number of orders for
each day in a given month (if any). Can someone help me with the syntax
please as I've been stumbling around with it all day without success.

Many thanks,   Graham



-
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




how to insert the contents of a file into a column

2001-05-01 Thread bringuet

pls don't tell me how I could do this with perl; there's a req for sh.
Have got a bunch of small multi line files that I thought I was reading in ok:
/usr/local/apache/htdocs/rpts/rvd
The first word of ea file is the only thing that makes it in.
Cheers...

pushcontent()
{
SECTIONID=4
THETITLE=$1
THECONTENT=$2
THECOUNTER=1
mysql -u root -D nuke EOF
INSERT INTO seccont(artid,secid,title,content,counter)
VALUES
('max(artid)','$SECTIONID','$THETITLE','$THECONTENT','$THECOUNTER');
EOF
}
x=`ls /usr/local/apache/htdocs/rpts/rvd`
for a in $x
do
y=`cat /usr/local/apache/htdocs/rpts/rvd/$a`
pushcontent $a $y
done

-
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: bug report

2001-05-01 Thread meyer

Hello Aurelian, 

I do the same thing but use the following code and it works fine. 

SELECT @myvar := DATE_SUB( CURRENT_DATE, INTERVAL 1 DAY) ; 


Edward


5/1/2001 6:45:19 AM, Aurelian Dumitru [EMAIL PROTECTED] wrote:



Please record the following bug identified on the MySQL server:

1. Hardware: SUN Ultra 10
2. Operating system: Sun Solaris 2.7
2. MySQL server version: 3.23.33
3. Error description:
 - The following SQL statement returns incorrect results when is executed
using the 'mysql' client: SELECT @myvar := ( CURRENT_DATE - 1) ;
 - I ran this query every day. It worked fine untill May 1st, 2001, when the
above query returned the following value: 20010500 . It should have returned
20010430.

Aurelian Dumitru
[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: Alternate Resource??

2001-05-01 Thread MikemickaloBlezien

On Tue, 1 May 2001 09:43:47 -0400 (EDT), Shawn Cummings
[EMAIL PROTECTED]   wrote:


I'm looking for an online message forum or mailing list that deals with
Perl/mySQL.  Most of the sites I've found are outdated and unused.

Any pointers greatly appreciated.

check out DevShed at http://forums.devshed.com/ or the CGI Forum at
http://mickalo.thunder-rain.com


Mike(mickalo)Blezien

Thunder Rain Internet Publishing
Providing Internet Solutions that work!
http://www.thunder-rain.com
Tel: 1(225) 686-2002
=















-
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: ORDER BY DESC optimization

2001-05-01 Thread ryc

  I have a fairly large table (greater than 4mil rows) that I would to
preform
  a query like:
 
  SELECT col1,col2 FROM table WHERE a=1, c=2 ORDER BY b DESC LIMIT 50;
 
  I have an index on the table INDEX1( a,b,c );
 
  When running the query as is, it takes around 4seconds. If I omit the
DESC
  part the query runs in a fraction of a second.
 
  I would like the query to run faster when I use DESC. I looked at
  myisamchk -R to sort by the 'b' index but I want to be sure it will
speed up
  my query since it may take a while to sort all 4million rows.

 To improve things I'd suggest you drop the (a,b,c) index and create two
new ones:
 one on (a,c)
 and another on (b)
 and then do the myisamchk -R on the second index
 You might also consider the --sort-records=# option

The reason I decided to use (a,b,c) as the index is because I read in the
How mysql uses indexes (http://www.mysql.com/doc/M/y/MySQL_indexes.html)
that with the index (a,b,c) if you have a where clause where a=constant and
have order by b (the key_part2) it will use the index.

I may be wrong, but if I have an index just on (a,c) and a seperate index on
(b), the b index will span the whole table (greater than 4 mil rows) and
thus the cardinality is higher, while (a,b,c) would only span the rows that
I am looking for making the query faster. If this isnt right, I will go
ahead and try the other index method. The only reason I wouldnt just do it
is changing the indexes on the table takes quite a while.

What I forgot to include in my first post reguarding the optimization of the
order by, when the query contains ORDER BY b DESC, explain says it will
use file sort (and hence the query takes around 4 seconds). When I drop the
DESC part from the ORDER BY clause, explain no longer says it will use
file sort and the query takes .1 seconds or so. I would like the DESC case
to be faster as that is the query I need to use. Is --sort-records the
option with myisamchk I want or --sort-index?

Thanks for the help.

ryan


-
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: MERGE Tables

2001-05-01 Thread Sergei Golubchik

Hi!

On May 01, Basil Hussain wrote:
 Hi,
 
  Ok, the first bug (incorrect COUNT, etc. for MERGE and individual tables)
  was fixed some time ago. Though, it is possible that you found another bug,
  the probability is low.
 
 I thought I might be encountering actual bugs in the code in my 3.23.32
 version. I'd taken a look at the changelog to see if any fixes seemed to
 apply to this situation, but it wasn't very clear.
 
 So, it looks like I need to upgrade my server. I've just been looking at the
 changelog again and I notice there are some entries for 3.23.38 - is there a
 new release imminent? Should I wait for this, or just upgrade to 3.23.37
 now?
 

The bug was fixed in 3.23.35.
Sorry for incomplete Changelog.

Regards,
Sergei

--
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/

-
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: MySQL performance

2001-05-01 Thread Steve Werby

Raf Geusens [EMAIL PROTECTED] wrote:
 I'm currently writing my final year thesis and i'm in need for some
 information on the efficiency of MySQL. If anyone knows a good site, book,
 paper etc ... pls let me know. I'm wondering how many request MySQL server
 can resolve per second and that kind of things.

You found the resource.  grin  Search the list archives, read the manual
and perform benchmarks (including those that come with the MySQL
distribution).  Performance on different servers under different conditions
have been posted on-list in many threads - you just need to start searching.

http://marc.theaimsgroup.com/?l=mysql

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.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: What can I do to help the mysql developers to get mysql to work on OS X?

2001-05-01 Thread tyler


On Tuesday, May 1, 2001, at 04:42 AM, Sinisa Milivojevic wrote:

 [EMAIL PROTECTED] writes:
 So, I'd really like to have mysql working on OS X and while there 
 were a
 few people trying it out and having difficulty, I have yet to see any
 posts of total success.

 I'm an experienced MacOS programmer, but I have little experience on
 Unix --  so I'm way behind the curve on looking at the source and
 figuring it out.  My only thought is to try to dive in and run mysqld
 via gdb and then try to figure out the source tree sufficiently to see
 where the shutdown (HUP?) message is getting handled and then set a
 breakpoint to see if that code is ever getting called and watch where 
 it
 gets stuck by tracing from there.

 Unfortunately, I don't know how to use gdb (yet), and there is a LOT of
 source to slog through to find where the shutdown code is.Perhaps a
 more experienced unix hack could recommend some starting places; 
 perhaps
 someone more experienced with the mysql source could point me to the
 locations of signal handling code (I hope it's not too obvious, since I
 haven't even looked yet... :-(  Got to get gdb working first... ).


 So, if there is something I can do here to help get the issues 
 resolved,
 I'd like to do so.  Please feel free to email me directly with
 suggestions, staring points etc.,  if that helps.

 Thanks,
 Tyler
 [EMAIL PROTECTED]


 P.S.  The problems I have seen posted and experienced myself are:

 1) the small edit to get it to compile (not a big deal, but should get
 fixed)

 2) The mysqld cannot be stopped short of kill -9

 3) trying to use mysqladmin shutdown to stop mysqld (and safe_mysql)
 fails (hangs, requires kill -9 to halt)

 4) the tests do not work.
   4a) make test fails
   4b) mysql-test-run   fails




Thank you Sinisa for responding.   I have made some responses below and 
I have included the logs and errors from the test run.The errors may 
perhaps give you a clue that can direct my further efforts.  Please find 
them below after the screen output of running the tests.

Thanks very much for your assistance!  I'd really like to have Mac OS X 
be a fully supported mysql platform!


 You should first learn to use gdb ... ;o)

 It is truly not so difficult.

I figure, just a matter of TIME :-)

so I'm rebuilding with the -with-debugging=full now and hopefully 
that'll help see stuff.

 Regarding a diff to make it compile, if you have not sent it to us,
 please do.

I have not, but I saw someone else on the list saying they would (or you 
asked them to).

 Regarding second and third problem, you should take a deeper look at
 OS X signals and try to see what goes on. Signal handling is all done
 in mysqld.cc in sql/ subdir.

OK that's what I needed a pointer to where to look in the source.

 Regarding failing tests, you should examine the error log.


Ok.   Here's the output to the screen:

 ./mysql-test-run
 Installing Test Databases
 Removing Stale Files
 Installing Master Databases
 Installing Slave Databases
 Starting MySQL daemon
 Loading Standard Test Databases
 Starting Tests

  TEST USER   SYSTEM  ELAPSEDRESULT
 
 alias 0.03 0.02 0.25   [ pass ]
 alter_table   0.04 0.01 0.29   [ pass ]
 analyse   0.02 0.02 0.12   [ pass ]
 auto_increment0.01 0.02 0.26   [ pass ]
 backup0.01 0.06 0.27   [ pass ]
 bdb-crash 0.02 0.03 0.07   [ pass ]
 bdb        [ fail ]

 /usr/local/bin/mysqltest: Can't get stat of 'r/have_bdb.require' 
 (Errcode: 2) real 0.07 user 0.02 sys  0.02
 Aborting. To continue, re-run with '--force'.

 Ending Tests
 Shutting-down MySQL daemon

 Warning;  Aborted waiting on pid file: '/usr/local/mysql-
 test/var/run/mysqld.pid' after 10 seconds
 Master shutdown finished
 Warning;  Aborted waiting on pid file: '/usr/local/mysql-
 test/var/run/mysqld-slave.pid' after 10 seconds
 Slave shutdown finished

So it looks like we have the shutdown failure problem here also.  Almost 
looks like it's waiting for the 'lock' on the pid file to be removed 
but I don't really know what I'm talking about...


When I look at the logs, the last thing in each log is:

11 Shutdown

or

2 Shutdown

The .err files say the following:

 tyler% more *.err
 ::
 mysqld-slave.err
 ::
 Warning: One can only use the --user switch if running as root
 /usr/local/bin/mysqld: ready for connections
 010501 19:39:06  Slave: connected to master '[EMAIL PROTECTED]:9306',  
 replication started in log '
 FIRST' at position 4
 010501 19:39:31  Aborted connection 2 to db: 'unconnected' user: 'root' 
 host: `localhost' (Got a
 n error writing communication packets)
 ::
 

Re: Empty Set Query question

2001-05-01 Thread Erica B. Tanner

Thanks to all for the suggestions!!

Turns out, if I use a regular expression instead of a text compare I get the desired 
result!! :)

Thanks!
Erica

Gerald Clark wrote:

 You are doing a text compare, and they have to match exactly,
 including leading zeros after the dots.

 You might look at storing them as integers. MySQL has to functions
 INET_ATON() and INET_NTOA() to convert them back and forth to strings.

 Erica B. Tanner wrote:

  Hello everyone.  I am new to this list and hope it's the right one for
  my question.  This may be really obvious, but I can't seem to figure it
  out...so here's the problem:
 
  I have a table that stores network incident report information, IP
  address, dates, type of incident, report name, etc.  I am trying to
  query the table for a specific ip address that's in the source_ip
  field.  I can see that the record is there when I query all of the
  records, but when I query for one specific ip, I get the empty set
  result! :(
 
  Here is my query
 
  select * from IDReport where source_ip=xxx.xxx.xxx.xxx;
 
  The field type is char(16).  Any ideas why mysql is not finding that
  record??
 
  I appreciate ANY help on this matter!!! :)
  Thanks,
  Erica
 
  --
  Erica B. Tanner
  Naval Surface Warfare Center, Dahlgren Division
  Advanced Computation Technology Group
  [EMAIL PROTECTED]
  540.653.5796
 
 
 
 
  -
  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

 --
 Gerald L. Clark
 [EMAIL PROTECTED]

--
Erica B. Tanner
Naval Surface Warfare Center, Dahlgren Division
Advanced Computation Technology Group
[EMAIL PROTECTED]
540.653.5796




-
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: LAST_INSERT_ID returning 3 rows?

2001-05-01 Thread Graeme B. Davis

Ok I was thinking that you had to tell LAST_INSERT_ID the table you wanted
to get the last insert id from.  What if you run a web site and you have 10
tables in a database, how can you tell what the last insert id of table 6
was?

Thanks,

Graeme

 Because you included a from clause, you got one line for each row
 of 'outages'

 Leave out the from outages

 Graeme B. Davis wrote:

  mysql INSERT INTO outages (status) VALUES ('Open');
  mysql SELECT LAST_INSERT_ID() AS lid FROM outages;
  +-+
  | lid |
  +-+
  | 101 |
  | 101 |
  | 101 |
  +-+
  3 rows in set (0.00 sec)
 
  Why would MYSQL do this?  Any ideas?
 
  Thanks,
 
  Graeme
 
  p.s. DESCRIBE outages;



-
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: LAST_INSERT_ID returning 3 rows?

2001-05-01 Thread Graeme B. Davis

Ok now I understand -- it's on a per-connection basis =)

thanks,

graeme
- Original Message -
From: Graeme B. Davis [EMAIL PROTECTED]
To: Gerald Clark [EMAIL PROTECTED]; Braxton Robbason
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, May 01, 2001 1:09 PM
Subject: Re: LAST_INSERT_ID returning 3 rows?


 Ok I was thinking that you had to tell LAST_INSERT_ID the table you wanted
 to get the last insert id from.  What if you run a web site and you have
10
 tables in a database, how can you tell what the last insert id of table 6
 was?

 Thanks,

 Graeme

  Because you included a from clause, you got one line for each row
  of 'outages'
 
  Leave out the from outages
 
  Graeme B. Davis wrote:
 
   mysql INSERT INTO outages (status) VALUES ('Open');
   mysql SELECT LAST_INSERT_ID() AS lid FROM outages;
   +-+
   | lid |
   +-+
   | 101 |
   | 101 |
   | 101 |
   +-+
   3 rows in set (0.00 sec)
  
   Why would MYSQL do this?  Any ideas?
  
   Thanks,
  
   Graeme
  
   p.s. DESCRIBE outages;




-
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




Is it possible?

2001-05-01 Thread sagar tamhane

hi,

I was reading the manual for the full-text search. It
is really interesting to have a search engine embedded
into the database itself!!!.

Mysql uses the criterias defined by the mysql
developers. Is it possible for the user to specify the
the criteria in his/her program and mysql rank the
results accordingly.

If not, is anything like that on the mysql developer's
agenda? This would of course need a highly plug and
play architechture.

This would ease off the work of people(like me) who
are working on search engines.


-Sagar A. Tamhane



__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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




mysqlimport and Optionally Enclosed By spec

2001-05-01 Thread Vyv

Hello,

Has anyone experienced and/or solved this problem on a Linux / Apache / MySQL system?

I'm trying to call mysqlimport remotely over CGI using perl's system command, to 
upload and import csv files. Basically everything works except for setting the 
'--fields-optionally-enclosed-by' argument, which I want to set to  (doublequote), as 
Excel puts them round any field containing a comma.

The full command is:

mysqlimport --verbose --fields-terminated-by=, --fields-optionally-enclosed-by='' 
mydb myfilename

It just gives up after the first row with a comma in it, after trying to put the whole 
of the remainder of the csv file into the one field. Any ideas?

Thanks in advance,

Vyv Hope-Scott
377a St Margarets Rd
Twickenham TW1 1PP
h 020 8744 2488
m 07768 660 247



Re: What can I do to help the mysql developers to get mysql to work on OS X?

2001-05-01 Thread Sinisa Milivojevic

tyler writes:
cut 
 
 Ok.   Here's the output to the screen:
 
  ./mysql-test-run
  Installing Test Databases
  Removing Stale Files
  Installing Master Databases
  Installing Slave Databases
  Starting MySQL daemon
  Loading Standard Test Databases
  Starting Tests
 
   TEST USER   SYSTEM  ELAPSEDRESULT
  
  alias 0.03 0.02 0.25   [ pass ]
  alter_table   0.04 0.01 0.29   [ pass ]
  analyse   0.02 0.02 0.12   [ pass ]
  auto_increment0.01 0.02 0.26   [ pass ]
  backup0.01 0.06 0.27   [ pass ]
  bdb-crash 0.02 0.03 0.07   [ pass ]
  bdb        [ fail ]
 
  /usr/local/bin/mysqltest: Can't get stat of 'r/have_bdb.require' 
  (Errcode: 2) real 0.07 user 0.02 sys  0.02
  Aborting. To continue, re-run with '--force'.
 

The above is nothing to be alarmed about, BDB has yet to be ported
properly to OS X.
  Warning;  Aborted waiting on pid file: '/usr/local/mysql-
  test/var/run/mysqld-slave.pid' after 10 seconds
  Slave shutdown finished
 
 So it looks like we have the shutdown failure problem here also.  Almost 
 looks like it's waiting for the 'lock' on the pid file to be removed 
 but I don't really know what I'm talking about...
 
 
 When I look at the logs, the last thing in each log is:
 
 11 Shutdown
 
 or
 
 2 Shutdown
 
 The .err files say the following:
 

Both errors are actually pointing to the same problem with signals.
 
 
 So, I guess that there is perhaps only that one problem with the 
 shutdown signal getting handled properly.  ???
 
 I'll work on looking at that then.

Yes. 
 



Regards,

Sinisa

    __ _   _  ___ ==  MySQL AB
 /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
/*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
   /*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaca, Cyprus
  /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
  /*/^^^\*\^^^
 /*/ \*\Developers Team

-
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: Newbie group/count query question

2001-05-01 Thread Ravi Raman

hi.

your table looks something like this:

table1
-
date(date)
order_number int(6)

...i wasn't sure if order_number is referring to a order table
somewhere...
if there are multiple rows for each day, and you want to add up
order_number for each day, use:

  select
DAYOFMONTH(date) as d,
SUM(order_number)
  from
table1
  group by d

if you want to count the rows per day (which i think is what you're after),
use:

  select
DAYOFMONTH(date) as d,
count(order_number)
  from
table1
  group by d

you probably want to add in a where clause

  where MONTH(date) = 4

to limit the rows to all days in april, for example.

hth.
-ravi.

-Original Message-
From: Graham Nichols [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 11:23 AM
To: [EMAIL PROTECTED]
Subject: Newbie group/count query question


I have a table which contains a date column and an order_number column. I
need to formulate a query syntax to return the total number of orders for
each day in a given month (if any). Can someone help me with the syntax
please as I've been stumbling around with it all day without success.

Many thanks,   Graham



-
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: Newbie group/count query question

2001-05-01 Thread Thalis A. Kalfigopoulos

On Tue, 1 May 2001, Graham Nichols wrote:

 I have a table which contains a date column and an order_number column. I
 need to formulate a query syntax to return the total number of orders for
 each day in a given month (if any). Can someone help me with the syntax
 please as I've been stumbling around with it all day without success.
 
 Many thanks,   Graham

select data_column,count(*) as number_of_orders 
from my_table 
where MONTH(date_column)=#
group by TO_DAYS(date_column);

and you replace the # with the month number you are looking for

regards,
thalis


-
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




column count doesn't match and updating 2 tables

2001-05-01 Thread Suzanne Hallam

I have 2 tables with identical structures. The following sql statement works
fine: 
insert into table_2 select * from table_1
but if I attempt to say
insert into table_2 select fieldname_1 from table_1
or any combination of selecting specific fields to be put into the other
table, I get an error which is column count doesn't match value count at
row 1
I suspect this has something to do with an auto-increment ID field and/or a
primary key on ID.
Does anyone know how I can overcome this?
 
I have also used replace into table_2 select * from table_1 with the same
problems. what I am ultimately trying to do is to have one table go and get
certain information from the other table to update itself from the other
table. I don't really want to dump all fields from one into the other.
Thanks for your help
 
 



Re: ORDER BY DESC optimization

2001-05-01 Thread Thalis A. Kalfigopoulos

On Tue, 1 May 2001, ryc wrote:

   I have a fairly large table (greater than 4mil rows) that I would to
 preform
   a query like:
  
   SELECT col1,col2 FROM table WHERE a=1, c=2 ORDER BY b DESC LIMIT 50;
  
   I have an index on the table INDEX1( a,b,c );
  
   When running the query as is, it takes around 4seconds. If I omit the
 DESC
   part the query runs in a fraction of a second.
  
   I would like the query to run faster when I use DESC. I looked at
   myisamchk -R to sort by the 'b' index but I want to be sure it will
 speed up
   my query since it may take a while to sort all 4million rows.
 
  To improve things I'd suggest you drop the (a,b,c) index and create two
 new ones:
  one on (a,c)
  and another on (b)
  and then do the myisamchk -R on the second index
  You might also consider the --sort-records=# option
 
 The reason I decided to use (a,b,c) as the index is because I read in the
 How mysql uses indexes (http://www.mysql.com/doc/M/y/MySQL_indexes.html)
 that with the index (a,b,c) if you have a where clause where a=constant and
 have order by b (the key_part2) it will use the index.

This is correct, but that way the 'where a=1 AND c=3' clause would use the index only 
for the a=1 condition and would do an exhaustive search to find which of those rows 
also have c=3. This is why I suggested the (a,c) index as a better alternative for 
your where clause.
The reason why I suggested an index on (b) by itself is for the soring of the results. 
BUT I don't know whether mysql will utilize this index to sort the temporary results 
or whether only one index can be used from the beginning till the end of a query. 
Anyone a bit more experienced willing to lend a hand here?

If the second index is not used for the sorting, then since both your 'where' 
conditions are using constants (a=1 and c=3), the optimal index for you is on (a,c,b).

cheers again,
thalis



-
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




How to set priority of mysql service in windows 2000

2001-05-01 Thread Ray Fergerson

Does anyone know how to set or change the priority of the mysql service in
Windows-2000 Pro.  It runs by default as normal and I would like to make it
low.  There doesn't appear to be a command line option or config file option
for this.  In addition, I can't change the priority of the service in task
manager even though I am an administrator.  Any ideas?

Ray

-
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




Dates not compared properly?

2001-05-01 Thread Christopher P. Lindsey

Howdy all...

I've run into a strange date problem as of midnight, May 1, 2001 on my
i686 Linux machine running mySQL 3.23.37.

For some reason, queries can no longer compare dates properly:

   mysql select count(*) from hit where date  NOW()-1135560;
   +--+
   | count(*) |
   +--+
   | 2633 |
   +--+
   1 row in set (2.05 sec)

   mysql select count(*) from hit where date  NOW()-1145560;
   +--+
   | count(*) |
   +--+
   |0 |
   +--+
   1 row in set (2.05 sec)

   mysql select NOW()-1135560,NOW()-1145560;
   +++
   | NOW()-1135560  | NOW()-1145560  |
   +++
   | 2001057384 | 2001047384 |
   +++
   1 row in set (0.00 sec)

   mysql describe hit;
   ++--+--+-+-+---+
   | Field  | Type | Null | Key | Default | Extra |
   ++--+--+-+-+---+
   | dig_id | int(10) unsigned |  | MUL | 0   |   |
   | date   | timestamp(14)| YES  | | NULL|   |
   | ip | varchar(16)  | YES  | | NULL|   |
   | site   | varchar(255) | YES  | | NULL|   |
   ++--+--+-+-+---+

NOW() is being expanded properly, yet for some reason the comparison
of hit.date with NOW()-n fails when n is larger than an abitrary number.
As it becomes later and later in the day, n becomes larger and larger
(so eventually it will reach 1970 and everything will work again).

I've optimized the tables, but don't really have any other good ideas.
For now, I'm just doing

   select count(*) as hits, substring(date,1,8) as foo from hit where ip NOT like 
x.x.x.% AND ip !=  x.x.x.x group by foo order by foo desc limit 10;

to get the count of most recent hits instead of the faster

   select count(*) as hits, substring(date,1,8) as whee  from hit where date  NOW() - 
1000 AND ip NOT like 64.5.98.% AND ip !=  141.142.22.95 group by whee order by 
whee desc;

Any ideas?

Thanks,

Chris

P.S.  For those who are curious, the database tracks views of plant photos
  on my Web site in real-time, including sites that have inlined.

-
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 it possible?

2001-05-01 Thread Rene Tegel

do  publish any improvements you suggest :)

On Tue, 1 May 2001 10:26:05 -0700 (PDT)
sagar tamhane [EMAIL PROTECTED] wrote:

 hi,
 
 I was reading the manual for the full-text search. It
 is really interesting to have a search engine embedded
 into the database itself!!!.
 
 Mysql uses the criterias defined by the mysql
 developers. Is it possible for the user to specify the
 the criteria in his/her program and mysql rank the
 results accordingly.
 
 If not, is anything like that on the mysql developer's
 agenda? This would of course need a highly plug and
 play architechture.
 
 This would ease off the work of people(like me) who
 are working on search engines.
 
 
 -Sagar A. Tamhane
 
 
 
 __
 Do You Yahoo!?
 Yahoo! Auctions - buy the things you want at great prices
 http://auctions.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
 

-
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: column count doesn't match and updating 2 tables

2001-05-01 Thread sagar tamhane

Hi Suzanne,
 
 When you say:
 insert into table_2 select * from table_1
 alls fine. All the records and fields will get
 copied.
 
 But when you say: 
 insert into table_2 select fieldname_1 from table_1
 
 you are just selecting fieldname_1 from table_1
 while
 table_2 consists of fieldname_2 also.
 
 So the correct sql statement will be:
 insert into table_2(fieldname_1) select fieldname_1
 from table_1;
 
 The fieldname_2 will get its default value and if it
 is an autoincrement field then the value will be
 incremented and auotmatically inserted.
 
 Hope this will clear your doubt.
 
 -Sagar A. Tamhane



__
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.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




Compile question

2001-05-01 Thread bernie lasalle

It appears that in order to install MyODBC I have to install a compiled 
MySQL version so that I will have the shared client libraries, include 
files, 'thread-safe-client' and libmysqlclient installed as a shared 
library.  Is this correct?

Thanks,

bernie lasalle


mySQL Hangs with Status 'D'

2001-05-01 Thread Hunter Hillegas

I have been having repeated problems with mySQL 3.23.36 on Linux (Red Hat
6.0, 2.4.3 kernel).

I think I've got traced the problem but I don't know how to fix it...

At some point after being started one or more of the mySQL threads hang with
the ps status of 'D' (my research suggests this can mean something disk
related or not).

At that point mySQL is totally hung. It won't respond to new connections,
thus basically hanging all my Apache sites that use it. Trying to launch
'mysqladmin' just hangs forever trying to connect.

The only solution is a restart. Processes with status 'D' cannot be killed.

What can I do about this? I've had to restart this server twice today and
it's a production Web server. Not fun.

Any help is GREATLY appreciated.

Hunter


-
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




perl DBD make test errors??? Please Help (PROBLEM SOLVED, I think...)

2001-05-01 Thread Chris Becker


I actually read the readme for DBD ;) and found what looks like the cause of
the problem below:
The Error means... that your linker doesn't include libgcc.a. You have
the following options:

a) Either recompile Perl or Mysql, it doesn't matter which.
The important thing is that you use the same
compiler for both. This is definitely the
recommended solution in the long term.

b)A simple workaround is to include libgcc.a manually. Do
a make clean and make and in the output wait for
a line like

LD_RUN_PATH=/usr/lib/mysql:/lib egcs -o
../blib/arch/auto/DBD/mysql/mysql.so  -shared -L/usr/local/lib
dbdimp.o mysql.o -L/usr/lib/mysql -L/usr/lib/mysql -lmys qlclient -lm

Repeat the same line in the shell by adding

-L/usr/lib/gcc-lib/i386-redhat-linux/gcc-2.7.2.3 -lgcc

***QUESTION:
I'll opt for the recompile Mysql.  Perl was intalled from the RedHat install
CD, Mysql I installed from the tar.gz file.  I beleive I'll recompile
Mysql - do I use and rpm to do this?  In other words, how do I re-compile
Mysql to have it use the same compiler as Perl?

Thanks in advance.

Chris B

-Original Message-
From: Chris Becker [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 30, 2001 2:07 PM
To: [EMAIL PROTECTED]
Subject: perl DBD make test errors??? Please Help



RedHat 6.2 on Intel, ...36 MySQL, and perl5, DBI installed correctly.

I ran perl Makefile.PL, seemed to run ok, no errors seen.
Ran make, same thing.
Then the following from make tets:

/perlmods/DBD10make test
make[1]: Entering directory `/perlmods/Msql-Mysql-modules-1.2210/mysql'
make[1]: Leaving directory `/perlmods/Msql-Mysql-modules-1.2210/mysql'
make[1]: Entering directory `/perlmods/Msql-Mysql-modules-1.2210/mysql'
PERL_DL_NONLAZY=1
/usr/bin/perl -I../blib/arch -I../blib/lib -I/usr/lib/perl5/5.00
503/i386-linux -I/usr/lib/perl5/5.00503 -e 'use Test::Harness qw(runtests
$verbos
e); $verbose=0; runtests @ARGV;' t/*.t
t/00baseinstall_driver(mysql) failed: Can't load
'../blib/arch/auto/DB
D/mysql/mysql.so' for module DBD::mysql:
../blib/arch/auto/DBD/mysql/mysql.so: und
efined symbol: uncompress at /usr/lib/perl5/5.00503/i386-linux/DynaLoader.pm
line
169.

 at (eval 1) line 3

 at t/00base.t line 38
dubious
Test returned status 255 (wstat 65280, 0xff00)
Undefined subroutine Test::Harness::WCOREDUMP called at
/usr/lib/perl5/5.00503/Te
st/Harness.pm line 288.
make[1]: *** [test_dynamic] Error 255
make[1]: Leaving directory `/perlmods/Msql-Mysql-modules-1.2210/mysql'
make: *** [test] Error 2


Please Help - am I installing DBD in the wrong directory?  MySQL is
installed in /usr/local/mysql - should I be running this make file there???

Thank in advance,

Chris Becker
MCSE MCDBA
===
Idysys
http://www.idysys.com
[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




Question(s) regarding Build options

2001-05-01 Thread Kevin Ford

Hello;

I have looked throught MySQL's website and to no avail, was unable to find a
document that has a detailed description of the configurable build options.
ie. --sharedstatedir   --localstatedir   --datadir

If anyone could point me to a relevant document or web page, I would be
greatful

Kevin Ford







-
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




table corruption endemic

2001-05-01 Thread David Block

I've got two mysql servers on two different boxes, both running Linux (Red
Hat 6.2) with 2.2.18 kernels.  Both are recent, fresh installs of Mysql
3.23.37, but have data from older 3.23 versions.

For the last week, any time the database does any kind of data loading,
(multiple inserts and updates from a perl script, only one or two users),
some of the tables are corrupted and we get the message
ERROR 1030: Got error 134 from table handler
or
ERROR 1030: Got error 126 from table handler

I don't think there's any rocket science in my schema, 33 tables in one
database.  I use myisamchk on them, and it seems to correct the problem,
but the problem comes back.

Any ideas?

---
David Block
[EMAIL PROTECTED]
http://bioinfo.pbi.nrc.ca/dblock/wiki
NRC Plant Biotechnology Institute
Saskatoon, SK, Canada


-
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-test does not work from install directory after source dist. install

2001-05-01 Thread tyler

 Description:
 There are several problems running the mysql-test-run script from
 the installed directory if you are installing from a source 
distribution.

 e.g., if you do as the manual suggests (4.7.1 Quick Installation 
Overview)


shell groupadd mysql
shell useradd -g mysql mysql
shell gunzip  mysql-VERSION.tar.gz | tar -xvf -
shell cd mysql-VERSION
shell ./configure --prefix=/usr/local/mysql
shell make
shell make install
shell scripts/mysql_install_db
shell chown -R root  /usr/local/mysql
shell chown -R mysql /usr/local/mysql/var
shell chgrp -R mysql /usr/local/mysql
shell /usr/local/mysql/bin/safe_mysqld --user=mysql 


 and then do the seeminly logical:
shell cd /usr/local/mysql/mysql-test
shell ./mysql-test-run

 FIX:
  suggest that script be changed to detect when it has been run in 
the install directory and is part
of a source dist.

Note that the permissions on the installed  mysql-test directory after 
make install are also problematic
and will have to be changed (script will fail when trying to make 
mysql-test/var and sub directories).


  How-To-Repeat:
cd mysql-VERSION
 ./configure --prefix=/usr/local/mysql
 make
 su
 make install
 groupadd mysql
 useradd -g mysql mysql
 scripts/mysql-install_db
 chown -R root /usr/local/mysql
 chown -R mysql /usr/local/mysql/var
 chgrp -R mysql /usr/local/mysql
 exit (to stop being root)
 /usr/local/mysql/bin/safe_mysqld --user=mysql
 cd /usr/local/mysql/mysql-test
 ./mysql-test-run


 Synopsis:  mysql-test-run script does not work from install 
directory after source dist. build/install
 Severity:  serious
 Priority:  medium
 Category:  mysql
 Class: sw-bug
 Release:   mysql-3.23.37 (Source distribution)

 Environment:
System: Darwin localhost 1.3.2 Darwin Kernel Version 1.3.2: Fri Apr 27 
22:50:58 PDT 2001\
; root:xnu/xnu-124.7.obj~1/RELEASE_PPC  Power Macintosh powerpc


SAME problem on Yellow Dog Linux 1.2.1 (based on RedHat Linux).

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/cc

Compilation info: CC='cc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC:

lrwxr-xr-x  1 root  wheel  15 May  1 12:44 /usr/lib/libc.dylib - 
libSystem.dylib
Configure command: ./configure  -prefix=/usr/local/mysql

-
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




INSTALL rpm over tar.gz??

2001-05-01 Thread Chris Becker


I currently have Mysql .36 loaded on RH6.2 intel, installed from tar.  How
do I remove the .36 version so I can install the rpm version .37??

This is not an upgrade, I need to replace or recompile mysql - Is there a
Un-Install process to remove the 36 version?

Thank You in advance,


ChrisB


-
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




Optimization of MySQL

2001-05-01 Thread Bryan Coon

Hi,

I am running a MySQL server on a nice machine (dual pIII 1gHz/1g ram), with
RedHat 7.0.  Currently, I am using the rpm version of mysql, which is
3.23.37.  

Our database is large, and getting larger, with several tables approaching
the 1gig mark.  In addition, the database will be moving to a dedicated node
on a beowulf cluster.  This node is compareable to the machine described
above.  

For our users, we are not particulary interested in squeezing every last
drop of performance out of MySQL, but I would be interested to know if there
are obvious things that I should do to optimize our performace.  

For example, compiling my own mysql with certain flags, or perhaps startup
options, etc.

I searched the usenet and mysql site, and found some information but would
like to hear some experienced advice before I jump in with both feet.

Thanks!
Bryan 

-
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




user setting own password.

2001-05-01 Thread Dato

how does a user set his own password in mysql? I have searched through the archives, 
and have found only the 'st password..' command. this does not work. In my case, there 
are more then just one host in the user table and the set password command only 
changes the localhost entry, leaving me unable to connect with the new password form 
other hosts! how do I solve this? Any help would be appreciated. Thanks.



Apache/PHP/MySQL - processes multiply until about 30, then doom

2001-05-01 Thread Gary E Bickford

I am running MySQL (3.23.27 at this point) with Apache1.3.12 and PHP3 on 
a PC running Redhat 6.0.  My problem has survived upgrades of all 
components from earlier versions.

Every PHP page has at least one query to a MySQL database for session 
tracking (home-rolled code, not PHPLib or anything off the shelf)  There 
are also on some pages other queries, to a different database, same 
server (same mysql).  Most of the latter are Phorum queries.

Periodically the number of mysql instances that show up in 'ps auxww'1 
gets to about 30 and mysql no longer listens to PHP/Apache.  However I 
can still use the mysql shell with no problem, so MySQL is still running 
but can't hear anything from PHP.

The only way to fix it is to run 'apachectl restart' or equivalent. 
'graceful' doesn't do it.  Im not sure if restarting MySQL instead 
works.  After Apache is restarted, the mysql processes are down to 3 and 
everybody's happy again.

I have been trying for months to figure out what is happening and how to 
fix it.  I had heard at one point that there was a problem with Redhat 
5.2 kernel that caused a similar problem, but I upgraded that but no joy.

Temporarily I have built a kluge cron job that restarts apache every so 
often, which worked as long as the server was low volume.  But now usage 
is dramatically increasing due to some new web sites that have been 
installed and announced to the entire corporation.  So the problem is 
triggered before the restart cleans up the mess.  I can't have it 
restarting every 20 minutes.

I've also changed every instance of pconnect() to connect() where I can, 
but no difference.

Can anybody tell me anything useful?  I'm supposed to come back with a 
firm fixit schedule tomorrow morning, so please email me directly as 
well as on the list - I'm afraid I'll miss it in the volume on the list. 
  If I don't get this fixed very shortly my consulting contract with 
this company will no doubt begin to fade out!!

Thanks in advance,
Gary Bickford


-
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: mySQL Hangs with Status 'D'

2001-05-01 Thread Vibol Hou

Upgrade to 2.4.4.  2.4.3 had some rwsem issues.

--
Vibol Hou
KhmerConnection
http://khmer.cc

-Original Message-
From: Hunter Hillegas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 01, 2001 2:20 PM
To: mySQL List
Subject: mySQL Hangs with Status 'D'


I have been having repeated problems with mySQL 3.23.36 on Linux (Red Hat
6.0, 2.4.3 kernel).

I think I've got traced the problem but I don't know how to fix it...

At some point after being started one or more of the mySQL threads hang with
the ps status of 'D' (my research suggests this can mean something disk
related or not).

At that point mySQL is totally hung. It won't respond to new connections,
thus basically hanging all my Apache sites that use it. Trying to launch
'mysqladmin' just hangs forever trying to connect.

The only solution is a restart. Processes with status 'D' cannot be killed.

What can I do about this? I've had to restart this server twice today and
it's a production Web server. Not fun.

Any help is GREATLY appreciated.

Hunter


-
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




Unusual dependency error w/ rpm??

2001-05-01 Thread Chris Becker


I do believe I have these dependencies, why am I getting these errors?
Running RH6.2 / INtel

/mysqlrpm -i MySQL-3.23.37-1.i386.rpm
failed dependencies:
/bin/sh   is needed by MySQL-3.23.37-1
/bin/sh is needed by MySQL-3.23.37-1
/usr/bin/perl is needed by MySQL-3.23.37-1
/mysqlcd /bin
/binls -l | grep sh
-rwxr-xr-x   1 root root60592 Feb  3  2000 ash
-rwxr-xr-x   1 root root   263064 Feb  3  2000 ash.static
-rwxr-xr-x   1 root root   446800 Feb  2  2000 bash2
lrwxrwxrwx   1 root root3 May 27  2000 bsh - ash
lrwxrwxrwx   1 root root4 May 27  2000 csh - tcsh
lrwxrwxrwx   1 root root4 May 27  2000 sh - bash
/bincd /usr/bin
/usr/binls -l | grep perl
-rwxr-xr-x   1 root root12872 Feb  2  2000 find2perl
-rwxr-xr-x   2 root root   527856 Feb  2  2000 perl
-rwxr-xr-x   2 root root   527856 Feb  2  2000 perl5.00503
-rwxr-xr-x   1 root root31722 Feb  2  2000 perlbug
-rwxr-xr-x   1 root root26305 Feb  2  2000 perlcc
-rwxr-xr-x   1 root root16807 Feb  2  2000 perldoc
-rws--x--x   2 root root   531516 Feb  2  2000 sperl5.00503
-rws--x--x   2 root root   531516 Feb  2  2000 suidperl
/usr/bin


Thank in advance,

ChrisB


-
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 can't open mysql.sock on start

2001-05-01 Thread Chad Nantais

Description: on start, MySQL creates a socket (mysqld.sock), in the /tmp directory by 
default, and tries to start 
by opening socket mysql.sock.  this might be a configuration error.  the
following fix worked.

How-To-Repeat:
try to start mysql by running ./safe_mysqld
Fix:
open /etc/my.cnf and change: socket=/tmp/mysqld.sock
to this: socket=/tmp/mysql.sock

Submitter-Id:  submitter ID
Originator:Rednaxel
Organization:
 organization of PR author (multiple lines)
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  synopsis of the problem (one line)
Severity:  [ non-critical | serious | critical ] (one line)
Priority:  [ low | medium | high ] (one line)
Category:  mysql
Class: [ sw-bug | doc-bug | change-request | support ] (one line)
Release:   mysql-3.23.37 (Source distribution)

Environment:
machine, os, target, libraries (multiple lines)
System: Linux tribewave.com 2.2.14-5.0 #1 Tue Mar 7 20:53:41 EST 2000
i586 unknown
Architecture: i586

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from
/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS='' 
LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Apr 30 09:49 /lib/libc.so.6
- libc-2.1.3.so
-rwxr-xr-x1 root root  4101324 Feb 29  2000
/lib/libc-2.1.3.so
-rw-r--r--1 root root 20272704 Feb 29  2000 /usr/lib/libc.a
-rw-r--r--1 root root  178 Feb 29  2000 /usr/lib/libc.so
lrwxrwxrwx1 root root   19 May  1 07:37
/usr/lib/libc-client.a - /usr/lib/c-client.a
Configure command: ./configure  --prefix=/usr/local/mysql
Perl: This is perl, version 5.005_03 built for i386-linux


-
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




Problem with mysqldump....

2001-05-01 Thread Rachel-MY

Hi everyone,

I'm trying to backup all the databases from Server_A to Server_B. 
I'd issue mysqldump command in server_A to backup every single database, as below :-
 mysqldump -uusername -ppassword databases_name  file_name

In server_B, i create a new database using the command below :-
 mysqladmin -uusername -ppassword create database_name

Then... i issued another mysqldump command to put everything back to server_B, as 
below:-
 mysqldump -uusername -ppassword databases_name  file_name

Problem happened where the databases being backup are all empty!! No tables being 
copied!! 
Anyone have idea on this?



Re: Problem with mysqldump....

2001-05-01 Thread Vigile

Dont use mysqldump to import.  Use mysql.  I can't remember the exact
syntax, but reference mysql.com for mysqldump, then in the syntax example
for that, they show you how to import it.

Ryan Shrout
Production Manager
Amdmb.com
http://www.amdmb.com/
[EMAIL PROTECTED]
(859) 653-3341


- Original Message -
From: Rachel-MY [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 01, 2001 10:38 PM
Subject: Problem with mysqldump


Hi everyone,

I'm trying to backup all the databases from Server_A to Server_B.
I'd issue mysqldump command in server_A to backup every single database,
as below :-
 mysqldump -uusername -ppassword databases_name  file_name

In server_B, i create a new database using the command below :-
 mysqladmin -uusername -ppassword create database_name

Then... i issued another mysqldump command to put everything back to
server_B, as below:-
 mysqldump -uusername -ppassword databases_name  file_name

Problem happened where the databases being backup are all empty!! No tables
being copied!!
Anyone have idea on this?



_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.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




very easy update, but how? Novice here

2001-05-01 Thread Jeramey James

What is the syntax for UPDATING the results of this select statement?  I am
using mySQL 3.22.27

select service.servdef from service, account, user where
account.number=user.account and user.number=service.user and
(service.servdef =  1) and (account.customerof = 6 or account.customerof = 7
or account.customerof = 8 or account.customerof = 9 or account.customerof =
10)

There are 4860 lines that result from this select statement.  I want to be
able to test an UPDATE statement and make sure that it works before it is
applied to the database.  Sorry for the newbie question, but I am having a
hard time finding a good example doc or text for SQL syntax.  I don't know
the syntax for the update. Please help. Thanks.

Jeramey James
[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: What do I do now?

2001-05-01 Thread Colin Faber

why not just use the LOAD DATA INFILE option?


Bombardier Systems Consulting wrote:
 
 HELP!!!
 
 I sent a message to this forum a couple of days ago about a problem that I
 am having with MySQL 3.23.37 (and now 36) running under RedHat 7.1.
 
 I am trying to use the mysqlimport utility and continue to get the following
 error:
 
 mysqlimport: Error: Can't get stat of '/home/yada/yada/file_name.csv'
 (Errcode: 13), when using table: file_name
 
 This utility was working when I was running 3.23.36 and RedHat 7.0 but
 RedHat kept crashing and so I had to upgrade to 7.1.  When I installed MySQL
 I got the 3.23.37 version of MySQL.  I have since re-installed RedHat 7.1
 and the MySQL 3.23.36 version and am getting the same error.  I looked up
 the error in the documentation and tried the UMASK change, rebooted, created
 new directory and moved file into it...still same problem.
 
 ANY ASSISTANCE WOULD BE APPRECIATED!
 
 Jim
 
 -
 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




How To Port the MS SQL Database To MySQL ??

2001-05-01 Thread gjsnath

Dear Friends ,

 The basic problem I face in the new project is to convert the previous Stored 
Procedures in MS SQL Database into My SQL . How to Replicate the same in My SQL . 
 The Front End is VB 6.0 . The Back End previously was MS SQL . Now Client want it to 
be in My SQL . Please send the details if I can use Perl API s for making the stored 
procedure like programs . If it is possible how to call the Perl API Programs From 
Visual Basic .

  Shankar 

__
123India.com - India's Premier Portal 
Get your Free Email Account at http://www.123india.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: Optimization of MySQL

2001-05-01 Thread Jeremy Zawodny

On Tue, May 01, 2001 at 04:46:39PM -0700, Bryan Coon wrote:
 
 Our database is large, and getting larger, with several tables
 approaching the 1gig mark.  In addition, the database will be moving
 to a dedicated node on a beowulf cluster.

Cool... :-)

 For our users, we are not particulary interested in squeezing every
 last drop of performance out of MySQL, but I would be interested to
 know if there are obvious things that I should do to optimize our
 performace.
 
 For example, compiling my own mysql with certain flags, or perhaps
 startup options, etc.
 
 I searched the usenet and mysql site, and found some information but
 would like to hear some experienced advice before I jump in with
 both feet.

Well, just wait a few weeks for my article in the next issue of Linux
Magazine. :-)

But before that happens, here are some ideas... There are two
approaches to optimization, and you should use both.

First is optimizing your application. This is generally just making
sure your queries are fast (well indexed), you're only retrieving the
data you need, you aren't indexing columns which will never benefit
from indexes, you're caching data in your app which can be cached,
etc.

Second is server tuning. You can look at increasing the size if the
key_buffer, record_buffer, and so on in your /etc/my.cnf (or similar)
file. Try to get an idea how efficient things are currently. I often
use mytop (http://public.yahoo.com/~jzawodn/mytop/) to gather some
info about my system before, during, and after tuning. It doesn't give
you everything you'll need (yet!), but it's a decent start. You'll
probably want to look closely at the output of SHOW VARIABLES and
SHOW STATUS and learn more about what some of them mean.

And, of course, we're glad to field specific questions on this list.

(This reminds me... I'm thinking of another patch to the MySQL manual
which explains some more of this stuff. Just need to find the time to
do it. Things are getting more, uh... interesting as the number of
table handlers expand. With ISAM, MyISAM, InnoDB, BDB, Gemini, and
HEAP, there is more room for both improvement and error.)

Jeremy
-- 
Jeremy D. Zawodny, [EMAIL PROTECTED]
Technical Yahoo - Yahoo Finance
Desk: (408) 349-7878Fax: (408) 349-5454Cell: (408) 439-9951

MySQL 3.23.29: up 118 days, processed 734,376,106 queries (71/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




Fw: What do I do now?

2001-05-01 Thread Bombardier Systems Consulting


- Original Message -
From: Bombardier Systems Consulting [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 01, 2001 10:07 PM
Subject: Re: What do I do now?


 Thanks!

 I assume that I can put that command into a script and feed it to
 mysql -options  filename

 Thanks again...sorry about being myopic about using mysqlimport

 Jim
 - Original Message -
 From: Colin Faber [EMAIL PROTECTED]
 To: Bombardier Systems Consulting [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Tuesday, May 01, 2001 10:52 PM
 Subject: Re: What do I do now?


  why not just use the LOAD DATA INFILE option?
 
 
  Bombardier Systems Consulting wrote:
  
   HELP!!!
  
   I sent a message to this forum a couple of days ago about a problem
that
 I
   am having with MySQL 3.23.37 (and now 36) running under RedHat 7.1.
  
   I am trying to use the mysqlimport utility and continue to get the
 following
   error:
  
   mysqlimport: Error: Can't get stat of '/home/yada/yada/file_name.csv'
   (Errcode: 13), when using table: file_name
  
   This utility was working when I was running 3.23.36 and RedHat 7.0 but
   RedHat kept crashing and so I had to upgrade to 7.1.  When I installed
 MySQL
   I got the 3.23.37 version of MySQL.  I have since re-installed RedHat
 7.1
   and the MySQL 3.23.36 version and am getting the same error.  I looked
 up
   the error in the documentation and tried the UMASK change, rebooted,
 created
   new directory and moved file into it...still same problem.
  
   ANY ASSISTANCE WOULD BE APPRECIATED!
  
   Jim
  
   -
   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
 
 



-
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