[mysqld 4.0.x DBD::mysql 2.1020]

2002-10-05 Thread Rich Allen

Description:
using LOAD DATA INFILE from Perl crashes table
How-To-Repeat:
issue LOAD DATA INFILE from Perl w/ DBD::mysql 2.1020 installed
Fix:
i downgrade to 2.0491

Submitter-Id:  submitter ID
Originator: Rich Allen
Organization:
 none
MySQL support: none
Synopsis:  LOAD DATA w/ DBD::mysql
Severity:  critical
Priority:  high
Category:  mysql
Class: 
Release:   mysql-4.0.4-beta (Source distribution)
Server: ./bin/mysqladmin  Ver 8.37 Distrib 4.0.4-beta, for apple-darwin6.1 on powerpc
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  4.0.4-beta
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /tmp/mysql.sock
Uptime: 1 hour 25 min 25 sec

Threads: 1  Questions: 1819  Slow queries: 0  Opens: 766  Flush tables: 5  Open 
tables: 47  Queries per second avg: 0.355
Environment:

System: Darwin ARTiBook.local. 6.1 Darwin Kernel Version 6.1: Fri Sep  6 23:24:34 PDT 
2002; root:xnu/xnu-344.2.obj~2/RELEASE_PPC  Power Macintosh powerpc


Some paths:  /usr/local/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/libexec/gcc/darwin/ppc/3.1/specs
Thread model: posix
Apple Computer, Inc. GCC version 1161, based on gcc version 3.1 20020420 (prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 


lrwxr-xr-x  1 root  wheel  15 Sep 18 18:08 /usr/lib/libc.dylib - libSystem.dylib
Configure command: ./configure --mandir=/usr/local/share/man/ --with-innodb 
--enable-local-infile


-
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: ERROR 1: Can't create/write to file tmpdirfile (Errcode: 13)

2002-10-05 Thread Stephan Gloor

 On Fri, 4 Oct 2002, Stephan Gloor wrote:

  When trying to create an index on
 
  Table ANSCHLUSS:
  | ID   | int(11) |  | PRI | NULL| auto_increment |
  | TELEFON  | varchar(20) |  | MUL | ||
  | REGION   | int(11) |  | | 0   ||
  | LAND | int(11) |  | | 0   ||
  | NETZ | tinyint(4)  |  | | 0   ||
  | PROTOKOLLTYP | tinyint(4)  |  | | 0   ||
  | ANZAHLANRUFE | int(11) |  | | 0   ||
  | AUSCALLERID  | tinyint(4)  |  | | 0   ||
 
  containing 481484 records,
 
  mysql yields
 
  mysql CREATE INDEX INDX_ANSCHLUSS ON ANSCHLUSS(TELEFON, REGION, LAND,
  NETZ);
  ERROR 1: Can't create/write to file '/home/data/mysql/tmp/STabnagj'
  (Errcode: 13)

 Stephan,

 tsp@host:~ perror 13
 Error code  13:  Permission denied

 It must have to do with permissions;
 whats the result of 'ls /home/data/mysql/tmp/' ?

 Thomas



The mysql is running from the root user the rights for the temp directory
are:
drwxr-xr-x2 root root   35 Oct  4 08:08 tmp/



  Only 18% of the disk are in use, df shows that there are 28'103'092 KB
  available. root, the owner has rights enough, mysql is started from the
root
  user.
  (drwxr-xr-x2 root root   35 Oct  4 08:08 tmp/)
 
  OS: Linux
 
  Thanks and regards for any comment.
 
  Stephan Gloor
 filter: sql, query




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

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




Query - Question

2002-10-05 Thread Sven Schäfermeier

Hello,
I have a problem concerning a SQL-Statement.
In the table S_Objekt I have a field S_Kapitel
(varchar (15) binary) that contains chapternumbers
like 2.2., 2.2.1., 1.1., 1.2.3. ...
The Query is to give me all chapternumbers of a
certain hierarchy. My Idea was to ask for the number
of Points (.) :
Two Points would give back 2.2. and 1.1.
Three Points would give back 2.2.1. and 1.1.3. etc.

I tried to use a REGEXP, but didnt succeed.

Can you help?

Gruß aus Essen
Sven Schäfermeier

___
Klickmeister GmbH - Schuermannstrasse 39 - 45136 Essen

fon +49 201 26 97 387
fax +49 201 26 97 106
mobil +49 160 824 0 892

[EMAIL PROTECTED]
http://www.klickmeister.de


-
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: ERROR 1: Can't create/write to file tmpdirfile (Errcode:13)

2002-10-05 Thread Joseph Bueno

Stephan Gloor wrote:
On Fri, 4 Oct 2002, Stephan Gloor wrote:


When trying to create an index on

Table ANSCHLUSS:
| ID   | int(11) |  | PRI | NULL| auto_increment |
| TELEFON  | varchar(20) |  | MUL | ||
| REGION   | int(11) |  | | 0   ||
| LAND | int(11) |  | | 0   ||
| NETZ | tinyint(4)  |  | | 0   ||
| PROTOKOLLTYP | tinyint(4)  |  | | 0   ||
| ANZAHLANRUFE | int(11) |  | | 0   ||
| AUSCALLERID  | tinyint(4)  |  | | 0   ||

containing 481484 records,

mysql yields

mysql CREATE INDEX INDX_ANSCHLUSS ON ANSCHLUSS(TELEFON, REGION, LAND,
NETZ);
ERROR 1: Can't create/write to file '/home/data/mysql/tmp/STabnagj'
(Errcode: 13)

Stephan,

tsp@host:~ perror 13
Error code  13:  Permission denied

It must have to do with permissions;
whats the result of 'ls /home/data/mysql/tmp/' ?

Thomas

 
 
 
 The mysql is running from the root user the rights for the temp directory
 are:
 drwxr-xr-x2 root root   35 Oct  4 08:08 tmp/
 
 
 
Only 18% of the disk are in use, df shows that there are 28'103'092 KB
available. root, the owner has rights enough, mysql is started from the

 root
 
user.
(drwxr-xr-x2 root root   35 Oct  4 08:08 tmp/)

OS: Linux

Thanks and regards for any comment.

Stephan Gloor

filter: sql, query

Hi,

Are you really sure that mysqld is running as root ?
It runs normally as 'mysql' user unless you explicitely start
safe_mysqld with '--user=root' option (which is a really Bad Idea (TM)).

Regards
-- 
Joseph Bueno


-
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: ERROR 1: Can't create/write to file tmpdirfile (Errcode: 13)

2002-10-05 Thread Stephan Gloor

Thanks, it was just about the set the right for the mysql user, as - you
already correctly mentioned  - mysql runs as user mysql.

Thanks and regards,

Stephan  Gloor




 Stephan Gloor wrote:
 On Fri, 4 Oct 2002, Stephan Gloor wrote:
 
 
 When trying to create an index on
 
 Table ANSCHLUSS:
 | ID   | int(11) |  | PRI | NULL| auto_increment |
 | TELEFON  | varchar(20) |  | MUL | ||
 | REGION   | int(11) |  | | 0   ||
 | LAND | int(11) |  | | 0   ||
 | NETZ | tinyint(4)  |  | | 0   ||
 | PROTOKOLLTYP | tinyint(4)  |  | | 0   ||
 | ANZAHLANRUFE | int(11) |  | | 0   ||
 | AUSCALLERID  | tinyint(4)  |  | | 0   ||
 
 containing 481484 records,
 
 mysql yields
 
 mysql CREATE INDEX INDX_ANSCHLUSS ON ANSCHLUSS(TELEFON, REGION, LAND,
 NETZ);
 ERROR 1: Can't create/write to file '/home/data/mysql/tmp/STabnagj'
 (Errcode: 13)
 
 Stephan,
 
 tsp@host:~ perror 13
 Error code  13:  Permission denied
 
 It must have to do with permissions;
 whats the result of 'ls /home/data/mysql/tmp/' ?
 
 Thomas
 
 
 
 
  The mysql is running from the root user the rights for the temp
directory
  are:
  drwxr-xr-x2 root root   35 Oct  4 08:08 tmp/
 
 
 
 Only 18% of the disk are in use, df shows that there are 28'103'092 KB
 available. root, the owner has rights enough, mysql is started from the
 
  root
 
 user.
 (drwxr-xr-x2 root root   35 Oct  4 08:08 tmp/)
 
 OS: Linux
 
 Thanks and regards for any comment.
 
 Stephan Gloor
 
 filter: sql, query
 
 Hi,

 Are you really sure that mysqld is running as root ?
 It runs normally as 'mysql' user unless you explicitely start
 safe_mysqld with '--user=root' option (which is a really Bad Idea (TM)).

 Regards
 --
 Joseph Bueno



-
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: Additional Information: Replication issue in 4.0.4

2002-10-05 Thread Heikki Tuuri

Shane,

- Original Message -
From: Shane Allen [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Friday, October 04, 2002 10:17 PM
Subject: Additional Information: Replication issue in 4.0.4


 On Thu, Oct 03, 2002 at 06:39:26PM -0500, Shane Allen wrote:
  We have a 4.0.4-beta master and slave.
 
  The slaving process starts correctly, but randomly (and frequently) has
  issues.
 
  When the server starts, it will slave, but eventually will hit one of
  two conditions:
 
  - Duplicate key insert error (we re-sync'd the slave by hand during the
install, copying databases by hand, etc, so they're known good)
 
  - Signal 8. The database will hit Signal 8, die, and be restarted.
Immediately upon restarting, it dies, and restarts, ad naseum.

 I upgraded in testing to 4.0.4 again, built with debugging enabled, and
 got a slightly different result.

 This time, it eventually hit a query and the slaving stopped. This time
 the error was:

 021004 12:57:00  Slave: error 'Incorrect key file for table:
'listing_text'. Try to repair it' on query 'UPDATE sell.listing_text SET
description='blah' WHERE listing_id=221112', error_code=1034

 So, I issued `mysqlcheck -r sell listing_text`, and eventually Lost
 connection to MySQL server during query. Inspection of the error log
 yields the following:

 mysqld: mf_iocache.c:1106: _flush_io_cache: Assertion `info-end_of_file
== my_tell(info-file,(myf) (0))' failed.

 Number of processes running now: 1
 mysqld process hanging, pid 790 - killed

 presumably the debugging code that is built in is what is preventing the
 signal 8 behaviour that I experienced last night.

 On the master database I have been able to issue successful repair
 statements several timesi against this table, and the databases that I am
attempting to
 repair have been copied over from the master, so I'm not sure what is
 causing the repairs to fail...

did you try to run the command line repair tool on a table while the mysqld
server was up? The server must be shut down if you use the command line
tool. Otherwise the indexes of the table may be cached in the key_buffer of
the mysqld process.

 --
 Shane Allen [EMAIL PROTECTED]

Best regards,

Heikki Tuuri
Innobase Oy
---
InnoDB - transactions, row level locking, and foreign key support for MySQL
See http://www.innodb.com, download MySQL-Max from http://www.mysql.com

sql query




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

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




INSERT INTO ... SELECT not creating indexes ?

2002-10-05 Thread BAUMEISTER Alexandre

Bonjour,

  When  I insert a lot of rows in a table from another table in MyISAM
  format  it  seems  that  indexes  in  the  destination table are not
  updated.

  For  example  in  table  A  I have index 1. This table contains many
  rows.

  I have table B with same structure as table A but empty.

  INSERT INTO TABLE B SELECT * FROM TABLE A;

  There  if  I do a select using index 1 on table B it's very long and
  explain  on the query shows me that even if it knows about index 1
  it's not using it.

  The  solution  is  to  do  a  optimize on table B but I wonder why
  indexes  are not up to date after the insert into ... select query
  ?

  Thanks for you enlightenment :)

  Kinds regards,
  Alex.


-
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




SCO Linux question

2002-10-05 Thread Darin Horton

We have a linux machine running MySQL 4.0.3Max. We need to write to it from
an SCO unix machine 3.2  V5.0.5. The only MysQL binary for that version of
SCO is 3.23. Can the MySQL 3.23 on SCO write to a database on linux running
4.0.3MAX?

TIA

Darin Horton


-
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: multiple SELECTs with INSERT or UPDATE??

2002-10-05 Thread Mirza

Hi,

   i am inserting data in a mysql table like this:
   INSERT INTO mytable1
   (bu_main_id)
  SELECT main_id FROM mytable2
  WHERE username=\$username\

   that's ok.
   
   but now i would like to insert 2 values (bu_main_id and status), and i
   would like to know, is it possible to use 2 or more SELECTs
   together with an INSERT, for example:

   INSERT INTO mytable1
   (bu_main_id, status)
  SELECT main_id FROM mytable2
  WHERE username=$username,
  SELECT config_mode FROM mytable3
  WHERE config_value=status

   my 2nd question, is it possible to use UPDATE and (mulstiple)
   SELECTs together
   i.e.:

   UPDATE mytable
   SET xxx = (SELECT xxx from mytable2 WHERE config=yyy) ...
   
   thanx

   Mirza



-
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: Privileges for CREATE TEMPORARY TABLE?

2002-10-05 Thread Alec . Cawley


Victoria Reznichenko said:

Since 4.0.2 user must have CREATE TEMPORARY TABLES privilege, it's a
 global level privilege:
   http://www.mysql.com/doc/en/News-4.0.2.html

Thank you. That page says that To use these, you must have run the
mysql_fix_privilege_tables script after upgrading. Where can I find this
script? Is it a perl script, as the other scripts are, or just a MySQL
script? I do not currently have perl set up - I am running Win2K.

  Alec




-
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




mysq passwords reset !

2002-10-05 Thread David yahoo

Hi,

I updrae my windows binaries server, and save my old datadir.
I copy it to the new datadir, i already did that it works !

I use to put no password to mysql database, I secure mysql by closing via a
firewall the 3306 port, it so annoying to find a password for each of my db
...

But now when connecting to my database, I ve got an erro :
acces denied for root@localhost : password no , if i translate into english.

How can i bypass this.

I think that when replacing new mysql database 'mysql' (that contains pass)
by the old, i say to not override the new so i lost my old mysql database
that says no pass for everybody.
I notice that my mysql database dir has the date of yesterday so the newest
:(

Where can I find one that allow me to connect to my databases, at least
mysql, a mysql blank of rights database.

Thanks.


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.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




Mysqladmin can't shutdown server

2002-10-05 Thread Gary Huntress

Hi,

I've been running 3.23.37 on a redhat box.  with zero problems for a
very long time.   For the past 4 days or so I've had a persistent problem.
I think I had a user with an out of control query which caused the system to
run out of VM.  I tried shutting down with mysqladmin but it failed.  I had
to reboot (issued a linux shutdown, I did not have to power cycle)  and ever
since then the system has never been the same.

In general, I have very slow performance but system top reports cpu usage of
about 0.2 and I am not swapping.   I am logging slow queries and have
discovered that some simple ones like select * from someTable are listed
as slow and take 15 seconds or more.

I'm not currently concerned with performance, I'm worried about platform
stability because when I issue

mysqladmin -p shutdown

it does not return.  and I have several hundred processes of
/usr/local/mysql listed by ps aux | grep mysql.  Killall doesn't kill them
and if I kill them individually they respawn ( I don't honestly understand
how they are controlled)

and the final symptom/clue is that when I restart mysql, show processlist
returns hundreds of:

| 3  | unauthenticated user | 195.46.64.45   || Connect |  | login |
  |
| 4  | unauthenticated user | 209.142.4.9|| Connect |  | login |
  |
| 5  | unauthenticated user | 62.39.122.16   || Connect |  | login |
  |
| 6  | unauthenticated user | 195.46.64.45   || Connect |  | login |
  |
| 7  | unauthenticated user | 209.142.4.9|| Connect |  | login |
  |
| 8  | unauthenticated user | 212.119.163.4  || Connect |  | login |
  |
| 9  | unauthenticated user | 66.186.23.140  || Connect |  | login |
  |
| 10 | unauthenticated user | 194.42.44.8|| Connect |  | login |
  |
| 11 | unauthenticated user | 213.194.109.99 || Connect |  | login |
  |
| 12 | unauthenticated user | 192.168.0.1|| Connect |  | login |
  |
| 13 | unauthenticated user | 217.96.80.2|| Connect |  | login |
  |
| 14 | unauthenticated user | 209.142.4.9|| Connect |  | login |
  |
| 15 | unauthenticated user | 62.39.122.16   || Connect |  | login |
  |

apparently these are all people waiting to get in!but they never seem to
clear out.

My questions are basically.what can I do when mysqladmin can't shut the
server down?  (I resorted to rebooting which I hate to do)  How can I
identify the source of my bottleneck?  It doesn't appear to be CPU nor
memory or even network (I use traffic shaping to limit bandwidth to/from the
box).


Thanks very much,

Gary H.

P.S.  Yes, I'm upgrading next week :))


-
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: mysq passwords reset !

2002-10-05 Thread David yahoo

I find a blank mysql database, all is ok !:)


___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.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




accessing field content with local application

2002-10-05 Thread Ludwig Schletzbaum

I have the idea, to store complete xml-files in a tablefield and make it
accessible for an editor (e.g. XMetaL) on a client.
The retrieval in the database is done e.g. by php connections via browser.
After selection of a specific row, the db-server should send the (xml) field
content to the client and start the editor. The upload after processing the
file may be possible with a skript following an OnClose-handler of the editor
(that's not the real problem).
The principal idea is not really new and was tested with oracle iFS which
supports this db-download to a local application. The idea is, to create a
similar system e.g. on a MySQL basis.

Ludwig
-- 

-
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




can't insert records with ID 0

2002-10-05 Thread Greg Conway

Hi all,

I've got a MySQL Db on a Server, and I want to export and re-import the data
into another Server.

This is fairly straight-forward using phpMyAdmin, but there is one
problem

After creating the tables in the Db, I've gone back and added record ID 0 in
each table as a record with values NONE, to indicate a NULL record. This
is an important feature of the app I've written!

However, when I try to re-import the data into the new Db, all records start
at 1 instead of 0, leading to errors in linked tables and worse still
duplicate IDs which prevent tables being able to be imported.

Does anybody here use phpMyAdmin and know how I can overcome this?

Many thanks for any help received!

Regards,

Greg Conway.

This electronic transmission and any files attached to it are strictly
confidential and intended solely for the addressee. If you are not
the intended addressee, you must not disclose, copy or take any action
in reliance of this transmission. If you have received this
transmission in error, please notify us by return and delete the same.
Further enquiries/returns can be posted to [EMAIL PROTECTED]
Thank you.

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

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




Re: can't insert records with ID 0

2002-10-05 Thread Paul DuBois

At 18:56 +0100 10/5/02, Greg Conway wrote:
Hi all,

I've got a MySQL Db on a Server, and I want to export and re-import the data
into another Server.

This is fairly straight-forward using phpMyAdmin, but there is one
problem

After creating the tables in the Db, I've gone back and added record ID 0 in
each table as a record with values NONE, to indicate a NULL record. This
is an important feature of the app I've written!

If this is an AUTO_INCREMENT column, you're using it illegally in an
unsupported manner.  Best to rethink this important feature -- perhaps
by using a different column definition.


However, when I try to re-import the data into the new Db, all records start
at 1 instead of 0, leading to errors in linked tables and worse still
duplicate IDs which prevent tables being able to be imported.

Does anybody here use phpMyAdmin and know how I can overcome this?

Sounds like MySQL behavior and not something that phpMyAdmin is doing.


Many thanks for any help received!

Regards,

Greg Conway.


-
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: multiple SELECTs with INSERT or UPDATE??

2002-10-05 Thread Paul DuBois

At 15:54 +0200 10/5/02, Mirza wrote:
Hi,

i am inserting data in a mysql table like this:
INSERT INTO mytable1
(bu_main_id)
   SELECT main_id FROM mytable2
   WHERE username=\$username\

that's ok.
   
but now i would like to insert 2 values (bu_main_id and status), and i
would like to know, is it possible to use 2 or more SELECTs
together with an INSERT, for example:

INSERT INTO mytable1
(bu_main_id, status)
   SELECT main_id FROM mytable2
   WHERE username=$username,
   SELECT config_mode FROM mytable3
   WHERE config_value=status

If you have MySQL 4.x, try using a UNION.   If you don't, then can
you just issue two separate INSERT INTO ... SELECT statements?

my 2nd question, is it possible to use UPDATE and (mulstiple)
SELECTs together
i.e.:

UPDATE mytable
SET xxx = (SELECT xxx from mytable2 WHERE config=yyy) ...

As of 4.0.2, yes, but not with that syntax. It would be something
like this:

UPDATE mytable, mytable2 SET mytable.xxx = mytable2.xxx
WHERE mytable2.config='yyy';

   
thanx

Mirza


-
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: DISTINCT and ORDER BY

2002-10-05 Thread Marc Webb


--- [EMAIL PROTECTED] wrote:
 Your message cannot be posted because it appears to
 be either spam or
 simply off topic to our filter. To bypass the filter
 you must include
 one of the following words in your message:
 
 sql,query
 
 If you just reply to this message, and include the
 entire text of it in the
 reply, your reply will go through. However, you
 should
 first review the text of the message to make sure it
 has something to do
 with MySQL. Just typing the word MySQL once will be
 sufficient, for example.
 
 You have written the following:
 
 It seems that ORDER BY interferes with DISTINCT when
 I
 use the 2 in the same statement. When I append order
 by to the end of a MySQL statement, I get all the 
 matches instead of the distinct ones. Is this normal
 behavior?
 
 Thanks,
 Marc Webb
 
 __
 Do you Yahoo!?
 New DSL Internet Access from SBC  Yahoo!
 http://sbc.yahoo.com
 


__
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos  More
http://faith.yahoo.com

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

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




Re: [PHP] recent encrpyt decrypt code... (problems)

2002-10-05 Thread Jeff Bluemel

ok - that made things work...  here is the output.  it looks like it is
still encrypting it.  what would the resolution be for this, or can I set
the key to anything I want?

 Usage encrypted = 3D+kF/t+E9k=
decrypted = Hello
They match

sql
- Original Message -
From: Tom Rogers [EMAIL PROTECTED]
To: Jeff Bluemel [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, October 05, 2002 1:09 PM
Subject: Re[2]: [PHP] recent encrpyt decrypt code... (problems)


 Hi,

 Sunday, October 6, 2002, 4:20:40 AM, you wrote:
 JB here is the URL that will give you the php compile info on my website
 JB (phpinfo)

 Looks identical to mine as far as mcrypt is concerned.
 Try changing the $key = to this:

 $key = 'test';


  As it looks like the key is getting truncated to 0


 --
 regards,
 Tom




-
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




Need to match similar words

2002-10-05 Thread FABIAN VON ROMBERG

Hi, is there any chance in MySql to match similar strings and rate it? Ex:

string: apples


criterias:
apples100%
apple  90%
appl   80%
applee 50%
appple 15%

Any help will be much appreciated.

Thanks in advance,
Fabian


_
Join the world’s largest e-mail service with MSN Hotmail. 
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: Need to match similar words

2002-10-05 Thread Peter Lovatt


SOUNDEX might meet your needs

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


Peter


---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
tel. 0121-242-1473
---

-Original Message-
From: FABIAN VON ROMBERG [mailto:[EMAIL PROTECTED]]
Sent: 05 October 2002 22:50
To: [EMAIL PROTECTED]
Subject: Need to match similar words


Hi, is there any chance in MySql to match similar strings and rate it? Ex:

string: apples


criterias:
apples100%
apple  90%
appl   80%
applee 50%
appple 15%

Any help will be much appreciated.

Thanks in advance,
Fabian


_
Join the world’s largest e-mail service with MSN Hotmail.
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




-
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 Error on Sun 2.8[50 character or so descriptive subject here (for reference)]

2002-10-05 Thread akbeech

Description: Compile Error

make[3]: Entering directory 
`/home/akbeech/sinbad_software/secure_server/mysql-3.23.52/sql'
/usr/local/bin/gcc -DMYSQL_SERVER   
-DDEFAULT_MYSQL_HOME=\/usr/local/mysql\ 
-DDATADIR=\/usr/local/mysql/var\
-DSHAREDIR=\/usr/local/mysql/share/mysql\   -DHAVE_CONFIG_H 
-I./../include  -I./../regex-I. -I../include -I.. 
-I.-O3 -DDBUG_OFF -O3  -fno-implicit-templates -fno-exceptions -fno-rtti 
-DHAVE_CURSES_H -I/home/akbeech/sinbad_software/secure_server/mysql-3.23.52/include 
-DHAVE_RWLOCK_T -c sql_lex.cc
sql_lex.cc: In function `void lex_init()':
sql_lex.cc:85: `symbols' undeclared (first use this function)
sql_lex.cc:85: (Each undeclared identifier is reported only once for each
   function it appears in.)
sql_lex.cc:87: `sql_functions' undeclared (first use this function)
sql_lex.cc: In function `int find_keyword(LEX*, unsigned int, bool)':
sql_lex.cc:168: `get_hash_symbol' undeclared (first use this function)
make[3]: *** [sql_lex.o] Error 1

How-To-Repeat: Recompile

Fix:


Submitter-Id:  submitter ID
Originator:Beech Rintoul
Organization: Sinbad Network Communications Inc.
 
MySQL support: None[none | licence | email support | extended email support ]
Synopsis:  Compile Error
Severity: serious  
Priority: high 
Category:  mysql
Class: sw-bug  
Release:   mysql-3.23.52 (Source distribution)

Environment:

System: SunOS anchor 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
Architecture: sun4

Some paths:  /usr/local/bin/perl /usr/local/bin/make /usr/local/bin/gmake 
/opt/sfw/bin/gcc /usr/ucb/cc
GCC: Reading specs from /opt/sfw/lib/gcc-lib/sparc-sun-solaris2.8/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='/usr/local/bin/gcc'  CFLAGS='-O3'  CXX='/usr/local/bin/g++'  
CXXFLAGS='-O3 -felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC: 
-rw-r--r--   1 root bin  1761380 Nov 30  2001 /lib/libc.a
lrwxrwxrwx   1 root root  11 Sep 20 05:23 /lib/libc.so - ./libc.so.1
-rwxr-xr-x   1 root bin  1132064 Nov 30  2001 /lib/libc.so.1
-rw-r--r--   1 root bin  1761380 Nov 30  2001 /usr/lib/libc.a
lrwxrwxrwx   1 root root  11 Sep 20 05:23 /usr/lib/libc.so - ./libc.so.1
-rwxr-xr-x   1 root bin  1132064 Nov 30  2001 /usr/lib/libc.so.1
Configure command: ./configure --prefix=/usr/local/mysql --with-low-memory 
--with-extra-charsets=complex --enable-assembler CC=/usr/local/bin/gcc CFLAGS=-O3 
'CXXFLAGS=-O3 -felide-constructors -fno-exceptions -fno-rtti' CXX=/usr/local/bin/g++


-
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 compiling mysql 4.0.4

2002-10-05 Thread Pierre

Hi,

I try to compile mysql-4.0.4-beta on my GNU/Linux system with gcc-3.2
There was no problem with the configure but for the make i got this :

[...]
Making all in isam
gmake[2]: Entering directory `/tmp/mysql-4.0.4-beta/isam'
/bin/sh ../libtool --mode=link gcc  -O3 -DDBUG_OFF -O3 -march=i686  
-rdynamic  -o isamchk  isamchk.o sort.o libnisam.a 
../mysys/libmysys.a ../dbug/libdbug.a 
../strings/libmystrings.a -lpthread -lz -lcrypt -lnsl -lm  -lpthread 
gcc -O3 -DDBUG_OFF -O3 -march=i686 -rdynamic -o isamchk isamchk.o 
sort.o libnisam.a ../mysys/libmysys.a ../dbug/libdbug.a 
../strings/libmystrings.a -lpthread -lz -lcrypt -lnsl -lm -lpthread
../mysys/libmysys.a(my_tempnam.o): In function `my_tempnam':
my_tempnam.o(.text+0x51): the use of `tempnam' is dangerous, better use 
`mkstemp'
../mysys/libmysys.a(raid.o): In function `my_raid_create':
raid.o(.text+0xa5): undefined reference to `operator new(unsigned)'
raid.o(.text+0x132): undefined reference to `operator delete(void*)'
../mysys/libmysys.a(raid.o): In function `my_raid_open':
raid.o(.text+0x185): undefined reference to `operator new(unsigned)'
raid.o(.text+0x20f): undefined reference to `operator delete(void*)'
../mysys/libmysys.a(raid.o): In function `my_raid_close':
raid.o(.text+0x7c1): undefined reference to `operator delete(void*)'
collect2: ld returned 1 exit status
gmake[2]: *** [isamchk] Error 1
gmake[2]: Leaving directory `/tmp/mysql-4.0.4-beta/isam'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/tmp/mysql-4.0.4-beta'
gmake: *** [all-recursive-am] Error 2




It would be great if you could help me with this !

Best regards,

Pierre.

-
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




Need help optimizing query

2002-10-05 Thread johnt


Greetings, I am struggling trying to get good performance 
using indexes.

I'll spare the details and narrow down the situation. I have about 
100,000 rows of data with the following fields:

title - vachar(64)
description - text 
state - varchar(2)
priority - int
modified - date

People type in a search string, and I need the results ordered in
the following way:

1) by priority DESC
2) items matching the title
3) items matching the description

I've experimented with full-text search, but cannot get it to do
this effeciently all in one query because of the way I need 
to order things. I tried adding  two full-text indexes like:

SELECT title, MATCH(title) AGAINST ('query') AS intitle FROM mytable WHERE 
MATCH(title, description) AGAINST ('query') [AND state = 'state'] ORDER by priority 
desc, intitle desc, modified desc;

but this only uses the (title,description) index, an not the (title)
index or the state index. 

It would be much faster if I could do only a full text search on
records with the state that is selected. (Any ideas on how to do this?)

Currently I do the following which which is really weak when there is
no state selected:

SELECT title, (title LIKE '%query%') AS intitle FROM mytable WHERE ((description LIKE 
'%query%') OR (title LIKE '%query%')) [AND state='state'] ORDER BY priority desc, 
intitle desc, modified desc;

Does anyone have any better ideas? I would consider doing multiple queries
using the different indexes but then I don't know how many rows matched 
without taking out the duplicates which would be expensive, I think.

Thanks in advance,

John

-
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




Server comparison running Mysql

2002-10-05 Thread James Riordon

Hi,

I have two servers.

Server A:
Dual 1GHz processors
1GB of RAM
MySQL-Max 3.23.49a
PHP 4.2.1

Server B:
Single 1.7GHz processors
1.5GB of RAM
MySQL-Max 3.23.49a
PHP 4.2.2

Server A has a site that uses about 75GB of bandwidth per 
month all pulled through PHP and MySQL. Load average is 0.4 over 
time. Processlist is never above 2-5 process showing at a time. All 
in all a very nice server.

When I switch the site to Server B - same database, same 
program, same my.cnf, my load average on Server B jumps to 25-35, the 
process list jumps to 30-50 processes, the server comes to a grinding 
hault and then sits there, all within 30-60 seconds of redirecting 
the site.

I thought Server B would be able to happily handle the large 
load but it apparently is not.

I am trying to figure out it Server B just can't handle the 
load, or if there is a problem somewhere. Can anyone give me their 
experienced thoughts on which I might be experiencing? Any suggested 
things I should try?

I am kind of in a bind here as I wish to get rid of the Dual 
processor machine for the colo it is in is quite expensive and the 
bandwidth is quite low on a monthly basis. The new colo does not seem 
to offer dual processor machines. Time is of the essence for me so 
any thoughts or suggestions would be greatfully accepted.

Thanks

James

-
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




Fwd: Re: Server comparison running Mysql

2002-10-05 Thread James Riordon

Have you tried monitoring server B via 'top' or something and see what
processes are taking up CPU time and/or swapping.


Hello,

I have monitored top for a bit. It is definitely MySQL-Max 
that is taking up the CPU and placing the load on the server. I have 
run strace on some of the pids and see nothing normal. I have 
attached here one of the listings from processlist just in case you 
see something:

+-+--+---+---+-+--+--+--+
| Id  | User | Host  | db| Command | Time 
| State| Info 
|
+-+--+---+---+-+--+--+--+
| 509 | {user} | localhost | {database}  | Query   | 
0| Sorting result   | SELECT sid,title,hits from stories 
WHERE uid  0 and Hits  0 ORDER BY Hits desc LIMIT 10|
| 513 | {user} | localhost | {database}  | Sleep   | 
7|  | 
|
| 516 | {user} | localhost | {database}  | Query   | 
1| Sending data | SELECT COUNT(*) FROM comments WHERE sid 
= 'ical' |
| 521 | {user} | localhost | {database}  | Sleep   | 
5|  | 
|
| 523 | {user} | localhost | {database}  | Sleep   | 
2|  | 
|
| 525 | {user} | localhost | {database}  | Sleep   | 
0|  | 
|
| 526 | {user} | localhost | {database}  | Query   | 
1| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021001061844504' ORDER BY date desc  |
| 529 | {user} | localhost | {database}  | Sleep   | 
1|  | 
|
| 531 | {user} | localhost | {database}  | Query   | 
1| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021001061844504' ORDER BY date desc  |
| 534 | {user} | localhost | {database}  | Query   | 
1| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002055217828' ORDER BY date desc  |
| 535 | {user} | localhost | {database}  | Query   | 
0| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021001061844504' ORDER BY date desc  |
| 538 | {user} | localhost | {database}  | Query   | 
2| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002055217828' ORDER BY date desc  |
| 541 | {user} | localhost | {database}  | Query   | 
1| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021001061844504' ORDER BY date desc  |
| 542 | {user} | localhost | {database}  | Query   | 
2| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021001061844504' ORDER BY date desc  |
| 544 | {user} | localhost | {database}  | Init DB | 
1| Writing to net   | 
|
| 553 | {user} | localhost | {database}  | Query   | 
0| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002062208512' ORDER BY date desc  |
| 556 | {user} | localhost | {database}  | Query   | 
1|  | SELECT imageurl FROM topics WHERE tid = 
'apps'   |
| 557 | {user} | localhost | {database}  | Query   | 
0| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002063014627' ORDER BY date desc  |
| 561 | {user} | localhost | {database}  | Query   | 
2| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002062208512' ORDER BY date desc  |
| 562 | {user} | localhost | {database}  | Query   | 
0| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002063853736' ORDER BY date desc  |
| 563 | {user} | localhost | {database}  | Query   | 
2| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002063014627' ORDER BY date desc  |
| 565 | {user} | localhost | {database}  | Query   | 
2| Sorting result   | SELECT UNIX_TIMESTAMP(date) AS day FROM 
comments WHERE sid = '20021002063853736' ORDER BY date desc  |
| 566 | {user} | localhost | {database}  | Init DB | 
0|  | 
|
| 567 | {user} | localhost | {database}  | Sleep   | 
4|