Switching from 3.22.32 to 3.23.33. What about the database files?

2001-02-16 Thread Tobias Wolff

Hello,
can anyone tell me whether or not I have to convert the database files when
switching from MySQL Version 3.22.32 to Version 3.23.33. I am working on
SuSe Linux 6.4. Is it sufficient just to copy the database files?
Thanks,
Tobias.


-
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




AW: Display information

2001-02-16 Thread Tobias Wolff

Have a look in the manual, it says LIMIT [offset], rows, so you should say:

order by id limit 1932, 10;


SELECT [STRAIGHT_JOIN] [SQL_SMALL_RESULT] [SQL_BIG_RESULT] [HIGH_PRIORITY]
   [DISTINCT | DISTINCTROW | ALL]select_expression,...
[INTO OUTFILE 'file_name' export_options][FROM table_references
[WHERE where_definition][GROUP BY col_name,...]
[HAVING where_definition]
[ORDER BY {unsigned_integer | col_name | formula} [ASC | DESC] ,...]
[LIMIT [offset,] rows]

Tobias.


-Ursprüngliche Nachricht-
Von: Ron Beck [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 16. Februar 2001 17:23
An: [EMAIL PROTECTED]
Betreff: Display information




Hello all,
I have a database with a little over 2000 records.  I want to be able to
construct a query that says something like this...

select id,lot_id,lot_type from scrap_table
(part I need help with)
   order by id limit 10;

which should give me records 1932 - 1942 like this...

+--+--+--+
| id   | lot_id   | lot_type |
+--+--+--+
| 1942 | 0034906  | F|
| 1941 | 0100308  | F|
| 1940 | 0036309  | S|
| 1939 | 0033503  | F|
| 1938 | 0034108E | D|
| 1937 | 0034712  | F|
| 1936 | 0029404  | F|
| 1935 | 0032706  | F|
| 1934 | 0029404  | F|
| 1933 | 0100307  | F|
| 1932 | 0100404  | F|
+--+--+--+


any suggestions?

Ron

-
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




Some questions on indexes.

2001-02-28 Thread Tobias Wolff

Hello,

I have searched for some information on single- and multi-colum indexes, but
often it is mentioned that the behaviour is implementation dependend. So I
post my questions on this list. If it's the wrong place, please redirect me
to the right one.

I am currently working with MySQL 3.22.32 on Redhat 6.2.

Is there a place or book where a newbie can gather information on indexes?

I. Assume I have a table Z with columns a, b, c with three separate indexes
on a, b and c.

1. If I perform a query like
SELECT * FROM Z WHERE b = 
everyting is fine, because an index exists for the specified column. RIGHT?

2. If I perform a query like
SELECT * FROM Z WHERE a = , b = , c = 
I assume only the index for column a is taken, because there is no index
that relates column b to column a and furthermore no index relating column c
to column b. RIGHT?

II. Assume I have a table Z with columns a, b, c with a multi-column index
on a, b, c.

1. If I perform a query like
SELECT * FROM Z WHERE a = 
I assume the multi-column index is taken in consideration. RIGHT?

2. If I perform a query like
SELECT * FROM Z WHERE a = , b = , c = 
I assume that the multi-column index is taken and I will find the resulting
rows rather quickly. RIGHT?

3. If I perform a query like
SELECT * FROM Z WHERE a = , c = 
I assume that the multi-column index cannot be used because - again - there
is no direct relation between column a and c. I would have to add a second
multi-column index on a, c. RIGHT?

4. If I perform a query like
SELECT * FROM Z where b = , c = 
I assume that - again - the multi-column index cannot be used and I would
have to add a second multi-column index on b, c. RIGHT?

5. If I choose a different order of the columns in the where clause say b,
a, c, only the single-column index for column b would be used. RIGHT?

III. Assume I have two tables Y, Z with each of the tables having two column
a and column b.

1. If I perform a query like
SELECT * FROM Y, Z WHERE Y.a = Z.a
would a single-column index on both tables on column a speed up the query?

2. If I perform a query like
SELECT * FROM Y, Z WHERE Y.a = Z.a AND Y.b = 
would it help to have a multi-column index on table Y (a, b)??

Thanks for your time.
Tobias.


-
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




EXPLAIN with unexpected result.

2001-02-28 Thread Tobias Wolff

Hello,
I'm slightly stunned seeing a result from the EXPLAIN statement.

I have a table "T" with columns "a", "b", "c", "d" and a multi-column index
on (a, b, c)

I perform a query:

EXPLAIN SELECT * FROM T WHERE a = , d = , b =


The result tells me that MySQL is taking index (a, b, c). Why?

Furthermore, when I add another multi-column index (a, d, b) to match the
query above, EXPLAIN still tells me that it uses index (a, b, c).

Can someone enlighten my on this one???
Thanks,
Tobias.


-
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




AW: EXPLAIN with unexpected result.

2001-02-28 Thread Tobias Wolff

Hi Simon,

thanks for your response. So, would it be wise to replace the multi-column
index (a,d,b) with (a,d) to avoid the overhead you mentioned when accessing
data from a+b??

Thanks again,
Tobias.

-Ursprüngliche Nachricht-
Von: Simon Windsor [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 28. Februar 2001 12:11
An: [EMAIL PROTECTED]
Betreff: Re: EXPLAIN with unexpected result.


Hi

Two points:

- Any multi column index a,b,c also indexes a and a,b
- In using an index, efficiency is important, and if you have two indexes
a,b,c and a,d,b , when you hit data
   from columns a+b+d, the database engine has to work out if accessing the
data from a+b is more efficient
   than a+d.

If column d has very little variance, say 10 distinct values in 100
records ( eg 100 in this case), it is a poor
column to index, and would compare badly to other distributions. Standard
indexes perform very well for <5%
(eg 5000 in this case) hits.

Simon

On Wednesday 28 February 2001 10:20, you wrote:
> Hello,
> I'm slightly stunned seeing a result from the EXPLAIN statement.
>
> I have a table "T" with columns "a", "b", "c", "d" and a multi-column
index
> on (a, b, c)
>
> I perform a query:
>
> EXPLAIN SELECT * FROM T WHERE a = , d = , b =
> 
>
> The result tells me that MySQL is taking index (a, b, c). Why?
>
> Furthermore, when I add another multi-column index (a, d, b) to match the
> query above, EXPLAIN still tells me that it uses index (a, b, c).
>
> Can someone enlighten my on this one???
> Thanks,
> Tobias.
>
>
> -
> 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


-
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




AW: version 3.23.29a-1

2001-02-28 Thread Tobias Wolff

The binary may have a different name. If there is only a /usr/bin/perl you
may have to create and symbolic link.

Tobias.

-Ursprüngliche Nachricht-
Von: acci [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 28. Februar 2001 13:53
An: [EMAIL PROTECTED]
Betreff: version 3.23.29a-1


I have tried to install the rpm version of mysql 3.23.29a-1 on a Red Hat
Linux 6.2.
It gives me an error asking for perl5 which I think I have it...

/*
[root@ghost2 mysql]# rpm -i MySQL-3.23.29a-1.i386.rpm
error: failed dependencies:
/usr/bin/perl5 is needed by MySQL-3.23.29a-1
[root@ghost2 mysql]# rpm -qa| grep perl
perl-5.00503-10
*/



-
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




AW: PHP and MySQL

2001-03-01 Thread Tobias Wolff

You have to edit your "php.ini" file, usually located in /usr/local/lib.

There is an option called "mysql.default_socket". The value of this options
is the path to the mysql socket file. Your systems seems to search the
socket file at "/var/lib/mysql/mysql.sock". It might be at a different
place, probably "/tmp/mysql.sock".

Tobias.

-Ursprüngliche Nachricht-
Von: root [mailto:root]Im Auftrag von Ben Kennish
Gesendet: Donnerstag, 1. März 2001 11:56
An: [EMAIL PROTECTED]
Betreff: PHP and MySQL


Who would've thought it would take 3 days to install MySQL, PHP and get
them talking???!!

I've installed PHP 4.0.4pl1 using an RPM from www.redhat.com

I've also installed MySQL (latest ver) server and client versions from
www.mysql.com using RPMs.

Now MySQL seems to be up and working (using 'mysql' and 'mysqladmin'
gives me no trouble) and PHP seems to work fine .

I've installed the PHP-MySQL module from redhat.com (a single file -
mysql.so) and uncommented the "extension=mysql.so" line in /etc/php.ini

But when I type ...

mysql_connect('localhost', 'root', 'b');

into a PHP file, (I set b as my root SQL pwd) I get the following
error...

"Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/var/lib/mysql/mysql.sock' (111) in
/var/www/html/index.php on line 5"

There seems to be nothing in the MySQL error log.

Please help!  Thanks,

--
Ben Kennish

Software Developer
Fubra Limited

web   | www.fubra.net
email | [EMAIL PROTECTED]
phone | +44 (0)870 1222 600
fax   | +44 (0)870 1222 699

-
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




Duplicate Entry in Key 1

2001-03-08 Thread Tobias Wolff

Hello,
I have searched the mailing list for this topic, but didn't find a match vor
my problem.

I am working on Linux Mandrake with MySQL 3.23.33 installed from the RPMs
for Mandrake. I am trying to convert a ACCESS database to MySQL using a perl
script. The script makes connections to the ACCESS database via ODBC and to
the MySQL database. The script works find in converting several tables. On
one table it fails with saying "duplicate entry in key 1" with "key 1" being
the primary key. Two funny things:

1. There isn't a duplicate entry for this key. Checked this over and over
again.
2. It is not the same key. Each time I run the script it gives me a
different key. Of course, I do drop the table first.

Can someone help me??
Thanks,
Tobias.


-
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




AW: Duplicate Entry in Key 1

2001-03-08 Thread Tobias Wolff

Hello Gerald,
what would you suggest?? Should I give you a list of all 600.000 entries in
the table?? And there is nothing special about the structure ... they are
similar .. with only one single-column primary key.

And the key being different each time I run the script should tell you that
there is something wrong.

And I even tried the same perl script with the same ACCESS database on a
MySQL database version 3.22.32 with no problems at all. So there MUST be
something wrong with version 3.23.33, don't you think?

But, o.k., I will try to give you a bit more information about the error
message.

Cheers,
Tobias.

-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im
Auftrag von Gerald L. Clark
Gesendet: Donnerstag, 8. März 2001 18:40
An: Tobias Wolff
Cc: Mysql
Betreff: Re: Duplicate Entry in Key 1


Tobias Wolff wrote:
>
> Hello,
> I have searched the mailing list for this topic, but didn't find a match
vor
> my problem.
>
> I am working on Linux Mandrake with MySQL 3.23.33 installed from the RPMs
> for Mandrake. I am trying to convert a ACCESS database to MySQL using a
perl
> script. The script makes connections to the ACCESS database via ODBC and
to
> the MySQL database. The script works find in converting several tables. On
> one table it fails with saying "duplicate entry in key 1" with "key 1"
being
> the primary key. Two funny things:
>
> 1. There isn't a duplicate entry for this key. Checked this over and over
> again.
> 2. It is not the same key. Each time I run the script it gives me a
> different key. Of course, I do drop the table first.
>
> Can someone help me??
> Thanks,
> Tobias.
>
Without a listing of the table structures, import files, and query
results
to prove your assertion, I would be inclined to believe 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


-
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




AW: How can i duplocate a database???? i 've tried mysqldump can get it towork ANy ideas??

2001-03-09 Thread Tobias Wolff

Hi Jorge,
you usually do something like

mysqldump -u USER -p TABLE > FILE

where TABLE is dumped to the FILE. USER must have privileges to do so (I
usually take the superuser).

The other way around you simply have to do

mysql -u USER -p TABLE < FILE

Should work then,
Tobias.

-Ursprüngliche Nachricht-
Von: Jorge Cordero [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 9. März 2001 04:31
An: mysql
Betreff: How can i duplocate a database i 've tried mysqldump can
get it towork ANy ideas??


I am trying to make several copies of a database i have tried
 mysqldump -databasename can some one throw a piece of code please;

Thanks


-
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