load data local infile

2002-11-20 Thread Pallavi Arun Patil
hello everybody,
i m using redhat linux 7.2 with  mysql 3.23.49a-max-log with
Apache 1.3.24 .

i have encounter following error for load data local infile when i 
tried to use an example on mysql site's documentation file :

mysql use test;
Database changed
mysql show tables;
++
| Tables_in_test |
++
| dept   |
| emp|
| person |
| pet|
| shirt  |
++
5 rows in set (0.00 sec)
mysql desc pet;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| name| varchar(20) | YES  | | NULL|   |
| owner   | varchar(20) | YES  | | NULL|   |
| species | varchar(20) | YES  | | NULL|   |
| sex | char(1) | YES  | | NULL|   |
| birth   | date| YES  | | NULL|   |
| death   | date| YES  | | NULL|   |
+-+-+--+-+-+---+
6 rows in set (0.00 sec)

mysql LOAD DATA LOCAL INFILE pet.txt INTO TABLE pet;
ERROR 1148: The used command is not allowed with this MySQL 
version
mysql

mysql select version();
+--+
| version()|
+--+
| 3.23.49a-max-log |
+--+
1 row in set (0.00 sec)

how do i go about it..if i want to load thousands of 
papers data data in text file?

u'r response R most appreciated.
pallavi

-
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



load data worked with warnings

2002-11-20 Thread Pallavi Arun Patil
mysql load data infile pet.txt into table pet;
ERROR 1105: File './test/pet.txt' not found (Errcode: 2)
mysql load data infile pet.txt into table pet;
Query OK, 8 rows affected (0.00 sec)
Records: 8  Deleted: 0  Skipped: 0  Warnings: 4

mysql select * from pet;
+--++-+--+++
| name | owner  | species | sex  | birth  | death  
|
+--++-+--+++
| Fluffy   | Harold | cat | f| 1993-02-04 | NULL   
|
| Claws| Gwen   | cat | m| 1994-03-17 | NULL   
|
| Buffy| Harold | dog | f| 1989-05-13 | NULL   
|
| Fang | Benny  | dog | m| 1990-08-27 | NULL   
|
| Bowser   | Diane  | dog | m| 1998-08-31 | 1995-07-29 
|
| Chirpy  Gwen | bird   | f   | 1| -00-00 | NULL   
|
| Whistler | Gwen   | bird| 1| NULL   | NULL   
|
| Slim | Benny  | snake   | m| 1996-04-29 | NULL   
|
+--++-+--+++
8 rows in set (0.00 sec)

but what for but what for 4 warnings?
does it for some internal reason?

pallavi

-
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



load data worked with warnings

2002-11-20 Thread Pallavi Arun Patil
mysql load data infile pet.txt into table pet;
ERROR 1105: File './test/pet.txt' not found (Errcode: 2)
mysql load data infile pet.txt into table pet;
Query OK, 8 rows affected (0.00 sec)
Records: 8  Deleted: 0  Skipped: 0  Warnings: 4

mysql select * from pet;
+--++-+--+++
| name | owner  | species | sex  | birth  | death  
|
+--++-+--+++
| Fluffy   | Harold | cat | f| 1993-02-04 | NULL   
|
| Claws| Gwen   | cat | m| 1994-03-17 | NULL   
|
| Buffy| Harold | dog | f| 1989-05-13 | NULL   
|
| Fang | Benny  | dog | m| 1990-08-27 | NULL   
|
| Bowser   | Diane  | dog | m| 1998-08-31 | 1995-07-29 
|
| Chirpy  Gwen | bird   | f   | 1| -00-00 | NULL   
|
| Whistler | Gwen   | bird| 1| NULL   | NULL   
|
| Slim | Benny  | snake   | m| 1996-04-29 | NULL   
|
+--++-+--+++
8 rows in set (0.00 sec)

but what for but what for 4 warnings?
does it for some internal reason?

pallavi

-
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 will not install on IRIX 6.2

2002-11-20 Thread p_action969
Description:
mySQL package from SGI freeware will not install on irix 6.2. It fails at the 
mysql_install_db script. The version i'm trying to install is 3.22.21 
How-To-Repeat:
just run the mysql_install_db script
Fix:


Submitter-Id:  Peter
Originator:System Administrator
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  install failed  
Severity:  serious 
Priority:  high
Category:  mysql
Class: sw-bug  
Release:   mysql-3.22.21 (Source distribution)

Environment:

System: IRIX skyline 6.2 06101030 IP22


Some paths:  /usr/sbin/perl /sbin/make

Compilation info: 
CC='/hosts/babylon.engr/usr/dist/new_toolroots/6.2/products/freeware/latest/ptoolroot/usr/bin/cc'
  CFLAGS='-nostdinc -I. -Iinclude 
-I/xlv1/freeware/1999.Nov/mysql/3.22.21-root/usr/include -D_BSD_SIGNALS -O3 
-OPT:Olimit=0:space=ON -n32 -mips3 -nostdlib 
-L/xlv1/freeware/1999.Nov/mysql/3.22.21-root/usr/lib32 -woff 
1009,1014,1048,1110,1116,1185,1188,1204,1230,1233,1552  -Wl,-woff,85,-woff,84'  
CXX='CC'  CXXFLAGS=''  LDFLAGS='-n32 -mips3 -nostdlib 
-L/xlv1/freeware/1999.Nov/mysql/3.22.21-root/usr/lib32 -woff 
1009,1014,1048,1110,1116,1185,1188,1204,1230,1233,1552  -Wl,-woff,85,-woff,84'
Configure command: ./configure  --prefix=/usr/freeware --libexecdir=/usr/freeware/sbin 
--localstatedir=/var/spool/mysql
Perl: This is perl, version 4.0

-
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: CPU Load extremely high with MySQL 4.0.4

2002-11-20 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tuesday 19 November 2002 23:34, Steven Roussey wrote:

 OK, it seems to be working. The load is not spiraling out of control. :)

Thanks! This is very reassuring. I will start building 4.0.5a Linux binaries 
right away.

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/   Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE921j4SVDhKrJykfIRAlBOAJoCaYGlyi6L+BB3YLh6E6aeCh5emACggWYO
wGgwSHtI6ZE4gUCe8LFevy8=
=dZvE
-END PGP SIGNATURE-

-
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




Problems installing mysql-max-3.23.53a linux binaries

2002-11-20 Thread Iago Sineiro
Hi all.

I've downloaded mysql-max-3.23.53a-pc-linux-gnu-i686.tar from www.mysql.com
and tried to install it on a linux box.

I followed the steps provided at
http://www.mysql.com/doc/en/Installing_binary.html

shell groupadd mysql   (Not really, I have a mysql group)
shell useradd -g mysql mysql   (Not really, I have a mysql user)
shell cd /usr/local
shell gunzip  /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
shell ln -s full-path-to-mysql-VERSION-OS mysql
shell cd mysql
shell scripts/mysql_install_db
shell chown -R root  .
shell chown -R mysql data
shell chgrp -R mysql .
shell bin/safe_mysqld --user=mysql 

When I execute bin/safe_mysqld --user=mysql 

prototipo mysql # bin/safe_mysqld --user=mysql 
[1] 948
prototipo mysql # Starting mysqld daemon with databases from
/usr/local/mysql/data
021120 12:49:15  mysqld ended

If I look at mysql log:

021120 11:51:26  mysqld started
021120 11:51:26  Can't start server : Bind on unix socket: Permission denied
021120 11:51:26  Do you already have another mysqld server running on
socket: /tmp/mysql.sock ?
021120 11:51:26  Aborting

021120 11:51:26  /usr/local/mysql/bin/mysqld: Shutdown Complete

Also after copying a my.cnf configuration file from support-files to
/etc/my.cnf and mysql.server to /etc/init.d/ if
I execute /etc/init.d/mysql.server start I also get an error for variable
@HOSTNAME and print-defaults:

prototipo mysql # /etc/init.d/mysql.server start
/etc/init.d/mysql.server: @HOSTNAME@: command not found
prototipo mysql # Starting mysqld daemon with databases from
/usr/local/mysql/data
021120 12:52:05  mysqld ended

Iago Sineiro.



-
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 LEFT JOIN Syntax

2002-11-20 Thread Roger Baklund
* yan zhang
  My MySQL LEFT JOIN Syntax as following is wrong? I
 cannot  get the right result.

What result do you get?

  SELECT name, email form T1 LEFT JOIN T2 ON
  T1.Snum=T2.Bnum

Except from the typo form - FROM, this looks like a valid statement. Do you
get an error?

  T1(Snum,name,email,address)

  T2(Bnum, notes, time)

  I wnat ot get the result(name, email, notes).

If you want 'notes' to appear in the result, you must mention it in the
field list:

SELECT name, email, notes FROM T1 LEFT JOIN T2 ON
  T1.Snum=T2.Bnum

--
Roger


-
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: Intermitent join problems

2002-11-20 Thread Heikki Tuuri
Frank,

if the tables are InnoDB type, then the following patch might fix the
problem. The patch will be in 3.23.54, which, I guess, will be released
around December 5th, 2002.


MySQL/InnoDB-4.0.5, November 18, 2002
...
Fixed a bug: if a SELECT was done with a unique key from a primary index,
and the search matched to a delete-marked record, InnoDB could erroneously
return the NEXT record.


If you re-run the problematic query, does it produce the correct result? The
bug above was automatically corrected by the InnoDB purge after some time.

Can you produce a repeatable test case?

Best regards,

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

sql query

...

Subject: Intermitent join problems
From: Frank Tuvell
Date: Tue, 19 Nov 2002 19:54:46 -0500





I'm using PHP 4.22, MySQL 3.23.53a on a RedHat Apache web
server.

I have a join that 99.9% of the time works fine but there have been
3 occasions in the last few weeks where extra records have found
their way into the resulting dataset.  This has happened during high
load times.

The join is as follows:

   select a.Username, b.MsgID, b.Subject, b.Body
   from Users a, Messages b
   where b.ForumID=$forumID
  and b.ParentID=0
  and a.UserID=b.UserID
   order by $sortBy
   limit $startRec,$endRec

On the 3 occasions that a problem occurred, records made their
way into the dataset that didn't have a b.ForumID equal to
$forumID.  I've noticed a number of recent fixes listed for joins in
the MySQL doc and am wondering if something has slipped by.

Has anyone else seen this problem?  Any ideas on how I could
avoid it?  Would changing the form of my join help (i.e. do the join
in the FROM and not the WHERE clause with the JOIN keyword)?

Any suggestions would be greatly appreciated!


Regards,

Frank Tuvell
Atlanta, GA - USA




-
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: Intermitent join problems

2002-11-20 Thread Heikki Tuuri
Frank,

if the tables are InnoDB type, then the following patch might fix the
problem. The patch will be in 3.23.54, which, I guess, will be released
around December 5th, 2002.


MySQL/InnoDB-4.0.5, November 18, 2002
...
Fixed a bug: if a SELECT was done with a unique key from a primary index,
and the search matched to a delete-marked record, InnoDB could erroneously
return the NEXT record.


If you re-run the problematic query, does it produce the correct result? The
bug above was automatically corrected by the InnoDB purge after some time.

Can you produce a repeatable test case?

Best regards,

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

sql query

...

Subject: Intermitent join problems
From: Frank Tuvell
Date: Tue, 19 Nov 2002 19:54:46 -0500





I'm using PHP 4.22, MySQL 3.23.53a on a RedHat Apache web
server.

I have a join that 99.9% of the time works fine but there have been
3 occasions in the last few weeks where extra records have found
their way into the resulting dataset.  This has happened during high
load times.

The join is as follows:

   select a.Username, b.MsgID, b.Subject, b.Body
   from Users a, Messages b
   where b.ForumID=$forumID
  and b.ParentID=0
  and a.UserID=b.UserID
   order by $sortBy
   limit $startRec,$endRec

On the 3 occasions that a problem occurred, records made their
way into the dataset that didn't have a b.ForumID equal to
$forumID.  I've noticed a number of recent fixes listed for joins in
the MySQL doc and am wondering if something has slipped by.

Has anyone else seen this problem?  Any ideas on how I could
avoid it?  Would changing the form of my join help (i.e. do the join
in the FROM and not the WHERE clause with the JOIN keyword)?

Any suggestions would be greatly appreciated!


Regards,

Frank Tuvell
Atlanta, GA - USA




-
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 with innodb

2002-11-20 Thread Dyego Souza do Carmo
Dobrý den,
terça-feira, 19 de novembro de 2002, 23:10:11, napsal jste:

PB Hi,
PB I like to know if you can help me.  I installed mysql-3.23.53-win.zip
PB which should have the Innodb feature as part of MySQL.  However, I am
PB unable to create an Innodb database.  The problem may be that one of my
PB variables which says have_innodb states that it is Disabled.  Do you
PB know how I can change this variable.

PB To let you know, I did have an earlier version of mysql on this system.
PB I have uninstalled it and installed the new version.

PB Any assistance you could give me would be greatly appreciated.

PB Kindly,
PB Peter Boivin

 The binary to execute on Windows NT to use InnoDB feature is the
 mysqld-max-nt.exe , after this, go to www.innodb.com/ibman.html and
 enable InnoDB in my.cnf options...

 to enable InnoDB change this param...


innodb_data_file_path = ibdata1:300M
innodb_data_home_dir = c:\mysql\data\
innodb_log_group_home_dir = c:\mysql\data\
innodb_log_arch_dir = c:\mysql\data\
set-variable = innodb_mirrored_log_groups=1
set-variable = innodb_log_files_in_group=3
set-variable = innodb_log_file_size=15M
set-variable = innodb_log_buffer_size=8M
innodb_flush_log_at_trx_commit=2
innodb_log_archive=0
set-variable = innodb_buffer_pool_size=80M
set-variable = innodb_additional_mem_pool_size=2M
set-variable = innodb_file_io_threads=6
set-variable = innodb_lock_wait_timeout=50
 
After this , only re-start the service ( with mysqld-max-nt.exe ) and
try show variables like '%have%innodb%';

bye,


-
  ++  Dyego Souza do Carmo   ++   Dep. Desenvolvimento   
-
 E S C R I B A   I N F O R M A T I C A
-
The only stupid question is the unasked one (somewhere in Linux's HowTo)
Linux registred user : #230601
-- 
$ look into my eyes
look: cannot open my eyes
-
   Reply: [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: MySQL Left Join Query

2002-11-20 Thread Thomas Spahni
On Tue, 19 Nov 2002, Bill Easton wrote:

 I'd be happy to write up a short example for inclusion in the MySQL manual,
 if there were some indication from MySQL, AB, that it would be included.

I guess they will; after all it would fit perfectly into the tutorial and
would be most welcome to all readers. The same type of condensed
Mini-Howto should be available for all types of joins because the results
of these operations are not obvious to beginners.

Thomas Spahni
-- 
filter fodder: 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




Slave sincronize

2002-11-20 Thread Massimo Bandinelli
I've problems sincronizing a Slave DB with a Master.

I've a db created with name foo-db from phpmyadmin but the mysql shell doesn't accept

 create database foo-db;

Do you know something about this??

Thanks, Massimo.


-
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: innodb and table_cache

2002-11-20 Thread Heikki Tuuri
Rafal,

the table cache size limit parameter in my.cnf affects also InnoDB. MySQL is
not aware that InnoDB does not open any files when InnoDB creates a handle
to a new table.

Hmm... I doubt that opening tables really takes much time. You can try
empirically if the table cache size has any effect.

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


..
Subject: innodb and table_cache
From: Rafal Jank
Date: Fri, 15 Nov 2002 13:44:14 +0100





Is table_cache parameter still important when using innodb table types?
I thought it's not, because there  is no separate files for each table in
InnoDB
But now I see a lot of queries in opening tables and closing tables
state.
Does increasing table_cache parameter may help?

Rafal

P.S. sql, query




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

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




RE: Problems installing mysql-max-3.23.53a linux binaries

2002-11-20 Thread Iago Sineiro
Hi all.

I resolved the problem of starting mysql server changing permissions of /tmp
directory to permit user mysql write /tmp/mysql.sock.

But when I start mysql server with /etc/init.d/mysql server start I get
error @HOSTNAME@.

prototipo mysql # /etc/init.d/mysql.server start
/etc/init.d/mysql.server: @HOSTNAME@: command not found
prototipo mysql # Starting mysqld daemon with databases from
/usr/local/mysql/data

Iago Sineiro.

 -Mensaje original-
 De: Iago Sineiro [mailto:[EMAIL PROTECTED]]
 Enviado el: miércoles, 20 de noviembre de 2002 10:37
 Para: MySql Mail List
 Asunto: Problems installing mysql-max-3.23.53a linux binaries


 Hi all.

 I've downloaded mysql-max-3.23.53a-pc-linux-gnu-i686.tar from
 www.mysql.com
 and tried to install it on a linux box.

 I followed the steps provided at
 http://www.mysql.com/doc/en/Installing_binary.html

 shell groupadd mysql (Not really, I have
 a mysql group)
 shell useradd -g mysql mysql (Not really, I have a mysql user)
 shell cd /usr/local
 shell gunzip  /path/to/mysql-VERSION-OS.tar.gz | tar xvf -
 shell ln -s full-path-to-mysql-VERSION-OS mysql
 shell cd mysql
 shell scripts/mysql_install_db
 shell chown -R root  .
 shell chown -R mysql data
 shell chgrp -R mysql .
 shell bin/safe_mysqld --user=mysql 

 When I execute bin/safe_mysqld --user=mysql 

 prototipo mysql # bin/safe_mysqld --user=mysql 
 [1] 948
 prototipo mysql # Starting mysqld daemon with databases from
 /usr/local/mysql/data
 021120 12:49:15  mysqld ended

 If I look at mysql log:

 021120 11:51:26  mysqld started
 021120 11:51:26  Can't start server : Bind on unix socket:
 Permission denied
 021120 11:51:26  Do you already have another mysqld server running on
 socket: /tmp/mysql.sock ?
 021120 11:51:26  Aborting

 021120 11:51:26  /usr/local/mysql/bin/mysqld: Shutdown Complete

 Also after copying a my.cnf configuration file from support-files to
 /etc/my.cnf and mysql.server to /etc/init.d/ if
 I execute /etc/init.d/mysql.server start I also get an error for variable
 @HOSTNAME and print-defaults:

 prototipo mysql # /etc/init.d/mysql.server start
 /etc/init.d/mysql.server: @HOSTNAME@: command not found
 prototipo mysql # Starting mysqld daemon with databases from
 /usr/local/mysql/data
 021120 12:52:05  mysqld ended

 Iago Sineiro.



 -
 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




MySQL on windows

2002-11-20 Thread Simon Windsor
Hi

I have been asked to support/bug-fix a Windows based web site using MySQL. 

I have used MySQL on Linux/FreeBSD for 3/4 years, but never on Windows.

How does MySQL compare on Linux and Windows for stability and performance ? 

Simon
-- 
Simon Windsor
mail: [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: Slave sincronize

2002-11-20 Thread Roger Baklund
* Massimo Bandinelli
 I've problems sincronizing a Slave DB with a Master.

 I've a db created with name foo-db from phpmyadmin but the
 mysql shell doesn't accept

  create database foo-db;

 Do you know something about this??

The '-' character makes this name difficult for the mysql parser to
understand, it could be interpreted as foo minus db (even though this
would not make sense in a CREATE DATABASE statement).

Use backticks:

mysql create database `foo-db`;
Query OK, 1 row affected (0.36 sec)

--
Roger


-
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 installing mysql-max-3.23.53a linux binaries

2002-11-20 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday 20 November 2002 11:41, Iago Sineiro wrote:

 I resolved the problem of starting mysql server changing permissions of
 /tmp directory to permit user mysql write /tmp/mysql.sock.

 But when I start mysql server with /etc/init.d/mysql server start I get
 error @HOSTNAME@.

 prototipo mysql # /etc/init.d/mysql.server start
 /etc/init.d/mysql.server: @HOSTNAME@: command not found
 prototipo mysql # Starting mysqld daemon with databases from
 /usr/local/mysql/data

Hmm, that's interesting. Seems like the build script did not replace this 
variable with the correct path to the hostname binary. For the time being,
please replace @HOSTNAME@ with /bin/hostname.

[SNIP]
 then
- -  pid_file=$datadir/`@HOSTNAME@`.pid
+  pid_file=$datadir/`/bin/hostname`.pid
 else
[SNIP]

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/   Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE923GZSVDhKrJykfIRAh+SAJ9RbPIJUZucM55fa6L9TdRBI2wAqwCdEofI
hW/WYU3k48feRG3MyO7VbjU=
=GCQu
-END PGP SIGNATURE-

-
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




Errors

2002-11-20 Thread Charlie Root
Hi Support Team,
I'm quite a novice in installing Mysql. I needed to do this because of a task i had to 
accomplish by installing webtts for which mysql was a pre-requisite.
during the installation process of webtts, i had the following errors
install_driver(mysql) failed: Can't load '/usr/local/lib/perl5/site_perl/5.005/i
386-freebsd/auto/DBD/mysql/mysql.so' for module DBD::mysql: Shared object libmy
sqlclient.so.10 not found at /usr/libdata/perl/5.00503/DynaLoader.pm line 169.

 at (eval 40) line 3
Perhaps a required shared library or dll isn't installed where expected
 at /usr/local/mysql-3.23.51/sql-bench/server-cfg line 238

I'm doing this task on a freebsd 4.5 box.
I would appreciate any help. sorry for any inconveniences.

Agbenya Adotey
Network Computer Systems
Accra, Ghana.

-
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




R: Slave sincronize

2002-11-20 Thread Massimo Bandinelli
Oh, yes, I know this option.

The problem is quiet different, because if I create a db using php with mysql_create 
function, I can use the name with minus foo-db.

Analizing the binary log I see the command

 create database foo-db;

and when the slave process the query, it returns an error.


-Messaggio originale-
Da: Roger Baklund [mailto:[EMAIL PROTECTED]]
Inviato: mercoledì 20 novembre 2002 12.02
A: [EMAIL PROTECTED]
Cc: Massimo Bandinelli
Oggetto: Re: Slave sincronize


* Massimo Bandinelli
 I've problems sincronizing a Slave DB with a Master.

 I've a db created with name foo-db from phpmyadmin but the
 mysql shell doesn't accept

  create database foo-db;

 Do you know something about this??

The '-' character makes this name difficult for the mysql parser to
understand, it could be interpreted as foo minus db (even though this
would not make sense in a CREATE DATABASE statement).

Use backticks:

mysql create database `foo-db`;
Query OK, 1 row affected (0.36 sec)

--
Roger


-
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




Why does altering the order alter my result?

2002-11-20 Thread Markus Hanauska
Dear Readers,

I have a little mySQL problem here.
Maybe it's a bug, maybe I'm just too stupid to read the documentation 
correctly, who knows... I'm sorry if I bother anyone with my stupidity.

I run a simpy query like:

SELECT INTERVAL((UNIX_TIMESTAMP(ReceivedDateTime) - 
UNIX_TIMESTAMP(StartDateTime) - 86400) / 60, 360, 720, 1440, 2880, 
5760) FROM Station, File WHERE File.StationId=Station.StationId ORDER 
BY File.FileId

First I calculate the time between two DATETIME fields (in seconds), 
then I substract 84600 (that's the number of seconds a single day has) 
and divide the rest by 60 to get minutes (is there an easier way to do 
this? Let me know please).

In the end I get a time difference in minutes that I want to compare 
with a set of numbers, that's what I use the INTERVAL for. If there are 
less 360 minutes, it should return 0, if there are less than 720 it 
should return 1, ... and if there are more than 5760, it should return 
5. And guess what, that's exactly what it does! :-)

But the result is sorted by the FileId. I don't want it to be sorted by 
the FileId of the file, but by a Station ID that consists out of four 
characters. So I modify the query like this:

SELECT INTERVAL((UNIX_TIMESTAMP(ReceivedDateTime) - 
UNIX_TIMESTAMP(StartDateTime) - 86400) / 60, 360, 720, 1440, 2880, 
5760) FROM Station, File WHERE File.StationId=Station.StationId ORDER 
BY Station.FourCharacterId

It's exactly the same query as before, I only altered the sort order, 
so I expect the same result, just in a different order. But it's not 
the same result at all.

All of a sudden the INTERVAL function seems to always return 3, because 
all rows have 3 as result. WHY? :-/ I just changed the search order, so 
how can it have such a big influence on the result? And how can I get 
the desired order and still get the desired result for each row? Can 
anyone shine a light on this issue please?

--
Best Regards,
Markus Hanauska


-
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 installing mysql-max-3.23.53a linux binaries

2002-11-20 Thread Iago Sineiro
Thanks Lenz. Now, after modifying the init script, I don't get the advise.

Iago Sineiro.

 -Mensaje original-
 De: Lenz Grimmer [mailto:[EMAIL PROTECTED]]
 Enviado el: miércoles, 20 de noviembre de 2002 12:27
 Para: Iago Sineiro
 CC: MySql Mail List
 Asunto: Re: Problems installing mysql-max-3.23.53a linux binaries


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 On Wednesday 20 November 2002 11:41, Iago Sineiro wrote:

  I resolved the problem of starting mysql server changing permissions of
  /tmp directory to permit user mysql write /tmp/mysql.sock.
 
  But when I start mysql server with /etc/init.d/mysql server start I get
  error @HOSTNAME@.
 
  prototipo mysql # /etc/init.d/mysql.server start
  /etc/init.d/mysql.server: @HOSTNAME@: command not found
  prototipo mysql # Starting mysqld daemon with databases from
  /usr/local/mysql/data

 Hmm, that's interesting. Seems like the build script did not replace this
 variable with the correct path to the hostname binary. For the
 time being,
 please replace @HOSTNAME@ with /bin/hostname.

 [SNIP]
  then
 - -  pid_file=$datadir/`@HOSTNAME@`.pid
 +  pid_file=$datadir/`/bin/hostname`.pid
  else
 [SNIP]

 Bye,
   LenZ
 - --
 For technical support contracts, visit https://order.mysql.com/?ref=mlgr
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Mr. Lenz Grimmer [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Production Engineer
 /_/  /_/\_, /___/\___\_\___/   Hamburg, Germany
___/   www.mysql.com
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.0 (GNU/Linux)

 iD8DBQE923GZSVDhKrJykfIRAh+SAJ9RbPIJUZucM55fa6L9TdRBI2wAqwCdEofI
 hW/WYU3k48feRG3MyO7VbjU=
 =GCQu
 -END PGP SIGNATURE-

 -
 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: MySQL segfaults anytime someone connects to 3306 port

2002-11-20 Thread Stefan Bohm
[EMAIL PROTECTED] wrote:


Description:

  After installation and setting basic authentication data I tried to
  connect to MySQL from other machine with the mysql client.
  I could not connect, I just got an error message
  ERROR 2013: Lost connection to MySQL server during query

  It does not matter which user, databse name or password I use,
  I got this message everytime.

  When I use telnet application to connect to 3306 on MySQL machine,
  the connection is terminated in a few seconds without any reply.

  The MySQL server shows this message in it's log:

  -- cut --
  /usr/local/bin/mysqld_safe: line 312: 10914 Segmentation fault
 $NOHUP_NICENESS $ledir/$MYSQLD $defaults --basedir=$MY_BASEDIR_VERSION
 --datadir=$DATADIR $USER_OPTION --pid-file=$pid_file
 --skip-locking $err_log 21

  Number of processes running now: 1
  mysqld process hanging, pid 10924 - killed
  021120 08:40:53  mysqld restarted
  -- cut --

  And really is being restared.

  Connections through socket /tmp/mysql.sock works fine.


Severity:	critical
Priority:	high
Category:	mysql
Class:		sw-bug
Release:	mysql-4.0.5-beta (Source distribution)


Environment:

OS: SuSE Linux 8.1 standard distributin without any changes
CPU: Intel(R) XEON(TM) CPU 2.40GHz
RAM: 1G
System: Linux freza 2.4.19 #4 Tue Nov 19 08:13:06 CET 2002 i686 unknown
Architecture: i686

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/i486-suse-linux/3.2/specs
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --enable-languages=c,c++,f77,objc,java,ada --enable-libgcj --with-gxx-include-dir=/usr/include/g++ --with-slibdir=/lib --with-system-zlib --enable-shared --enable-__cxa_atexit i486-suse-linux
Thread model: posix
gcc version 3.2
Compilation info: CC='gcc'  CFLAGS=''  CXX='g++'  CXXFLAGS=''  LDFLAGS=''  ASFLAGS=''
LIBC:
-rwxr-xr-x1 root root  1312470 Sep 17 18:21 /lib/libc.so.6
-rw-r--r--1 root root 23159812 Sep 17 22:36 /usr/lib/libc.a
-rw-r--r--1 root root  178 Sep 17 22:36 /usr/lib/libc.so
Configure command: ./configure --localstatedir=/data/mysql --without-docs --without-bench --with-charset=czech


Hi,

this is a known bug in SuSE 8.1. They shipped a broken libc. Please upgrade the libc via Yast Online Update.
Things work well after applying the update.

cu
Stefan




-
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 on windows

2002-11-20 Thread DL Neil
Simon,

I have been asked to support/bug-fix a Windows based web site using MySQL.
I have used MySQL on Linux/FreeBSD for 3/4 years, but never on Windows.
How does MySQL compare on Linux and Windows for stability and performance ?

=congratulations. Your relief appears in the phrase, MySQL is MySQL is
MySQL!

=it's very difficult to answer your question because 'it all depends...'.
You are probably aware (see manual) that MySQL is developed on the likes of
Suse Linux and then ported. One expects then that any 'gotchas' are going to
be in the ports, rather than in the 'original' environment. However I have
been using MySQL under Windows for quite some time and it sits there
chugging away. So, porting MySQL from one OpSys to another doesn't cause
instability per-se.

=as you will be well aware, a properly set up operating system is a
pre-requisite for any app/service (M$ word for daemon) to be stable.
Accordingly the 'Windows connection' comes down to the skill of the tech
setting up the h/w and OpSys s/w. If the h/w keeps burping a fault or the
OpSys can't handle something, then everything else goes down in a heap too -
regardless of Win or Linux! (not seeking a religious war here, merely
pointing out that there are many flavors of (in)competence!). On the other
hand I'm no propeller-head and yet have had no problems (so far).

=I don't recall seeing any meaningful comparative-performance specs - how
could one make such a comparison 'fair and true' anyway? Then there are the
real-world issues of what else the box is expected to perform, its place in
the network's routing, blah-blah-blah.

=One thing you may have to watch is whether you can use Win equivalents of
your preferred admin/mgmt tool - if MySQLCC then you're in-to-win, but some
have no Linux/Win equivalents. Another is the use of different
directories/paths, but I'm sure that will be obvious enough.

=Jump on in, the water's fine!
=dn


-
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: load data local infile

2002-11-20 Thread David Neil
Hello Pallavi,

 i m using redhat linux 7.2 with  mysql 3.23.49a-max-log with
 Apache 1.3.24 .
 i have encounter following error for load data local infile when i 
 tried to use an example on mysql site's documentation file :
 mysql use test;
 Database changed
 mysql show tables;
 ++
 | Tables_in_test |
 ++
 | dept   |
 | emp|
 | person |
 | pet|
 | shirt  |
 ++
 5 rows in set (0.00 sec)
 mysql desc pet;
 +-+-+--+-+-+---+
 | Field   | Type| Null | Key | Default | Extra |
 +-+-+--+-+-+---+
 | name| varchar(20) | YES  | | NULL|   |
 | owner   | varchar(20) | YES  | | NULL|   |
 | species | varchar(20) | YES  | | NULL|   |
 | sex | char(1) | YES  | | NULL|   |
 | birth   | date| YES  | | NULL|   |
 | death   | date| YES  | | NULL|   |
 +-+-+--+-+-+---+
 6 rows in set (0.00 sec)
 
 mysql LOAD DATA LOCAL INFILE pet.txt INTO TABLE pet;
 ERROR 1148: The used command is not allowed with this MySQL 
 version
 mysql
 
 mysql select version();
 +--+
 | version()|
 +--+
 | 3.23.49a-max-log |
 +--+
 1 row in set (0.00 sec)
 
 how do i go about it..if i want to load thousands of 
 papers data data in text file?
 
 u'r response R most appreciated.


Please review 4.2.4 Security issues with LOAD DATA LOCAL
=dn

-
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: load data worked with warnings

2002-11-20 Thread DL Neil
Pallavi,

 mysql load data infile pet.txt into table pet;
 ERROR 1105: File './test/pet.txt' not found (Errcode: 2)
 mysql load data infile pet.txt into table pet;
 Query OK, 8 rows affected (0.00 sec)
 Records: 8  Deleted: 0  Skipped: 0  Warnings: 4

 mysql select * from pet;
 +--++-+--+++
 | name | owner  | species | sex  | birth  | death
 |
 +--++-+--+++
 | Fluffy   | Harold | cat | f| 1993-02-04 | NULL
 |
 | Claws| Gwen   | cat | m| 1994-03-17 | NULL
 |
 | Buffy| Harold | dog | f| 1989-05-13 | NULL
 |
 | Fang | Benny  | dog | m| 1990-08-27 | NULL
 |
 | Bowser   | Diane  | dog | m| 1998-08-31 | 1995-07-29
 |
 | Chirpy  Gwen | bird   | f   | 1| -00-00 | NULL
 |
 | Whistler | Gwen   | bird| 1| NULL   | NULL
 |
 | Slim | Benny  | snake   | m| 1996-04-29 | NULL
 |
 +--++-+--+++
 8 rows in set (0.00 sec)

 but what for but what for 4 warnings?
 does it for some internal reason?


Compare your answer against the tutorial provided: 3.3.3 Loading Data into a
Table. Note the differences! Now you see the reason(s) for warnings. Please
check your input data.

Did you download the sample data files, create your own, or attempt a
cut-and-paste. May I recommend the former.

Regards,
=dn


-
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: Re[2]: delete where column = null

2002-11-20 Thread Heikki Tuuri
David,

- Original Message -
From: David Mechner [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Wednesday, November 20, 2002 1:59 PM
Subject: Re[2]: delete where column = null


 Ok, so it seems to be a bug. What's the procedure for reporting it (or
 do the developers read this list?)

yes we do. Thank you for the bug report!

I have now forwarded this bug report to the public developer mailing list.

 -David

Regards,

Heikki

sql query


 A minimal test case that demonstrates the bug:

 create table t (
   id  integer,
   index id_idx(id)
 );
 insert into t(id) values(null);

 select * from t;

 delete from t where id = 1;

 select * from t;




 AB I get the same behaviour with mysql 3.23.47 (not max) and with mysql v
 AB 4.0.4-beta

 AB Without the index it works fine.  Must be a bug

 AB Cheers,

 AB Andrew


 -
 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




Error 1148 The error used Command is not allowed with this MySQL-Version

2002-11-20 Thread kwagner

Hello,
I downloded MySQL-Version 3.23 for Windows XP from MySQL-webpage. If I try
to load a Database from a textfile I got message Error 1148 The error used
Command is not allowed with this MySQL-Version.
I used following Command: LOAD DATA LOCAL INFILE verlagdaten.txt INTO
TABLE verlag;

Any ideas for help?

Best regards,

Klaus Wagner



-
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: load data local infile

2002-11-20 Thread Victoria Reznichenko
Pallavi,
Wednesday, November 20, 2002, 11:01:51 AM, you wrote:

PAP i m using redhat linux 7.2 with  mysql 3.23.49a-max-log with
PAP Apache 1.3.24 .

PAP i have encounter following error for load data local infile when i 
PAP tried to use an example on mysql site's documentation file :

[skip]

PAP mysql LOAD DATA LOCAL INFILE pet.txt INTO TABLE pet;
PAP ERROR 1148: The used command is not allowed with this MySQL 
PAP version

PAP how do i go about it..if i want to load thousands of 
PAP papers data data in text file?

If you use LOAD DATA LOCAL since 3.23.49 this command should be enabled:
 http://www.mysql.com/doc/en/LOAD_DATA_LOCAL.html



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





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

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




re: mySQL will not install on IRIX 6.2

2002-11-20 Thread Egor Egorov
p_action969,
Wednesday, November 20, 2002, 11:11:03 AM, you wrote:

paydc mySQL package from SGI freeware will not install on
paydc irix 6.2. It fails at the mysql_install_db script. The version i'm trying to 
install is 3.22.21

paydc  How-To-Repeat:
paydc just run the mysql_install_db script

3.22.21 is a very old version of MySQL server. Please, download from
the http://www.mysql.com/downloads/index.html the latest 3.23.53
version of MySQL server and try to install the one.




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




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

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




re: using explicit locking

2002-11-20 Thread Egor Egorov
Stephen,
Wednesday, November 20, 2002, 5:48:35 AM, you wrote:

SA I've managed to build my first web database using MySQL and accessing
SA it with Python CGI scripts.  I only have two tables going, and not
SA many columns per table, but I'm suspecting that there will be many
SA calls to INSERT, UPDATE, and SELECT. 

SA So my question is this: do I need to use explicit locking to make
SA this work well in a web environment?  Or will the implicit locking of
SA MySQL handle all the dirty work?

On non-transaction tables INSERT, UPDATE and DELETE set write lock on the table, 
SELECT sets
read lock on the table.



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




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

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




re: Dump

2002-11-20 Thread Victoria Reznichenko
John,
Wednesday, November 20, 2002, 8:32:35 AM, you wrote:

JC After I dump the database what is the command to import it into another
JC computer?

mysql -hhost_name -uuser_name -puser_password [database_name] 
dump_file.sql

JC  Do I have to create a new database and then import all tables
JC and data or will it create the database, tables, and data?

Depends on what options of mysqldump were used.



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





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

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




Re: MySQL on windows

2002-11-20 Thread Gerald R. Jensen
MySQL is good on the Win32 platform ... slower than on Linux / Unix / BSD
etc., but nonetheless it is a good performer.

We have several of our Win32 clients who have switched to Linux servers or
have augmented their Win32 servers with Linux servers to specifically handle
database duties... the migration from one platform to another was a snap.

- Original Message -
From: Simon Windsor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 5:02 AM
Subject: MySQL on windows


Hi

I have been asked to support/bug-fix a Windows based web site using MySQL.

I have used MySQL on Linux/FreeBSD for 3/4 years, but never on Windows.

How does MySQL compare on Linux and Windows for stability and performance ?

Simon
--
Simon Windsor
mail: [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




backticks replication (was: Re: Slave sincronize)

2002-11-20 Thread Roger Baklund
* Massimo Bandinelli
 * Roger Baklund
  * Massimo Bandinelli
   mysql shell doesn't accept
create database foo-db;
  
   Do you know something about this??
 
  The '-' character makes this name difficult for the mysql parser to
  understand, it could be interpreted as foo minus db (even though this
  would not make sense in a CREATE DATABASE statement).
 
  Use backticks:
 
  mysql create database `foo-db`;
  Query OK, 1 row affected (0.36 sec)

 Oh, yes, I know this option.

 The problem is quiet different, because if I create a db using
 php with mysql_create function, I can use the name with minus foo-db.

 Analizing the binary log I see the command

  create database foo-db;

 and when the slave process the query, it returns an error.

I understand. I don't know how to fix your problem, except for using a
different name for your database, or create the database on the slave
manually, and skip that statement from the binlog using
SQL_SLAVE_SKIP_COUNTER.

This could be a bug, but I don't know for sure. I checked the documentation
on replication, but I could not find any mention of this issue.

URL: http://www.mysql.com/doc/en/Replication.html 
URL: http://www.mysql.com/doc/en/Replication_FAQ.html 
URL: http://www.mysql.com/doc/en/Replication_SQL.html 
URL: http://www.mysql.com/doc/en/Replication_Features.html 
URL: http://www.mysql.com/doc/en/Replication_Problems.html 

Anyone?

--
Roger


-
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




R: backticks replication (was: Re: Slave sincronize)

2002-11-20 Thread Massimo Bandinelli
Thanks a lot.

-Messaggio originale-
Da: Roger Baklund [mailto:[EMAIL PROTECTED]]
Inviato: mercoledì 20 novembre 2002 13.59
A: [EMAIL PROTECTED]
Cc: Massimo Bandinelli
Oggetto: backticks  replication (was: Re: Slave sincronize)


* Massimo Bandinelli
 * Roger Baklund
  * Massimo Bandinelli
   mysql shell doesn't accept
create database foo-db;
  
   Do you know something about this??
 
  The '-' character makes this name difficult for the mysql parser to
  understand, it could be interpreted as foo minus db (even though this
  would not make sense in a CREATE DATABASE statement).
 
  Use backticks:
 
  mysql create database `foo-db`;
  Query OK, 1 row affected (0.36 sec)

 Oh, yes, I know this option.

 The problem is quiet different, because if I create a db using
 php with mysql_create function, I can use the name with minus foo-db.

 Analizing the binary log I see the command

  create database foo-db;

 and when the slave process the query, it returns an error.

I understand. I don't know how to fix your problem, except for using a
different name for your database, or create the database on the slave
manually, and skip that statement from the binlog using
SQL_SLAVE_SKIP_COUNTER.

This could be a bug, but I don't know for sure. I checked the documentation
on replication, but I could not find any mention of this issue.

URL: http://www.mysql.com/doc/en/Replication.html 
URL: http://www.mysql.com/doc/en/Replication_FAQ.html 
URL: http://www.mysql.com/doc/en/Replication_SQL.html 
URL: http://www.mysql.com/doc/en/Replication_Features.html 
URL: http://www.mysql.com/doc/en/Replication_Problems.html 

Anyone?

--
Roger


-
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 1148 The error used Command is not allowed with this MySQL-Version

2002-11-20 Thread Insanely Great
Greetings

I think the path for the file is not correct. Try giving the complete path
with (\) in the directory name changed to (/). Also specify the escaping
characters properly.

For more information you can check out the MySQL docs on LOAD LOCAL INFILE.

Rgds
Insane
SQLyog - The Definitive Windows GUI for MySQL
http://www.webyog.com/sqlyog/download.html

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 5:57 PM
Subject: Error 1148 The error used Command is not allowed with this
MySQL-Version



 Hello,
 I downloded MySQL-Version 3.23 for Windows XP from MySQL-webpage. If I try
 to load a Database from a textfile I got message Error 1148 The error
used
 Command is not allowed with this MySQL-Version.
 I used following Command: LOAD DATA LOCAL INFILE verlagdaten.txt INTO
 TABLE verlag;

 Any ideas for help?

 Best regards,

 Klaus Wagner



 -
 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: mysql source for 4.0.5

2002-11-20 Thread Ken Menzel
Bingo!   Thanks Dan
Missing were:

ftp://mysql.nixc.net/pub/mysql/Downloads/MySQL-4.0/mysql-4.0.5-beta.ta
r.gz

ftp://mirror.sit.wisc.edu/mirrors/mysql/Downloads/MySQL-4.0/mysql-4.0.
5-beta.tar.gz

http://mysql.mirrors.netnumina.com/Downloads/MySQL-4.0/mysql-4.0.5-bet
a.tar.gz

I only tried 3 before yelling for help.

Thanks again,
Ken
- Original Message -
From: Dan Nelson [EMAIL PROTECTED]
To: Ken Menzel [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 5:17 PM
Subject: Re: mysql source for 4.0.5


 In the last episode (Nov 19), Ken Menzel said:
  I have tried 4 mirrors in USA to download mysql source for 4.0.5
  seems like the file is missing.  Is anyone else having the same
  problem?


ftp://mirror.mcs.anl.gov/pub/mysql/Downloads/MySQL-4.0/mysql-4.0.5-bet
a.tar.gz

 worked for me this morning.

 --
 Dan Nelson
 [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: syntax problem with replicate-rewrite-db

2002-11-20 Thread Victoria Reznichenko
David,
Tuesday, November 19, 2002, 5:20:23 PM, you wrote:

DN (sorry if this is a duplicate -- I don't think the original made it)

DN Running mysql 3.23.53-max binary on a RedHat 7.2 based server.  Replication
DN is working fine, but I'm running into errors with the replicate-rewrite-db
DN directive.  Here's a snippet from my my.cnf file on the slave:

DN master-port = 3306
DN replicate-rewrite-db=mysql-master_mysql

DN When I try to start the instance, I get the following error in my
DN log:

DN 021118 14:30:56  mysqld started
DN Bad syntax in replicate-rewrite-db - missing '-'!
DN 021118 14:30:56  mysqld ended

DN I've tried every possible combination of white space I could think of, and 
DN even cut and pasted the exact syntax from the documentation, and created
DN tables with those names, yet I still get the same error, so it doesn't appear
DN to be a problem specifically with replicating the mysql table.

DN I've also tried mysql 3.23.52-max binary, and gotten the same thing, so
DN it's definitely not a issue with a specific version of mysql...

DN Can anyone help figure out how to get this working?  Anyone else using it?

Hm .. It works fine for me on my test replication (both servers are
3.23.53).



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





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

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




re: Error 1148 The error used Command is not allowed with this MySQL

2002-11-20 Thread Victoria Reznichenko
kwagner,
Wednesday, November 20, 2002, 2:27:45 PM, you wrote:

kapdd I downloded MySQL-Version 3.23 for Windows XP from MySQL-webpage. If I try
kapdd to load a Database from a textfile I got message Error 1148 The error used
kapdd Command is not allowed with this MySQL-Version.
kapdd I used following Command: LOAD DATA LOCAL INFILE verlagdaten.txt INTO
kapdd TABLE verlag;

Check the following section of the manual:
  http://www.mysql.com/doc/en/LOAD_DATA_LOCAL.html



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





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

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




Re: table_cache too high?

2002-11-20 Thread Ken Menzel
Yes,  you are correct and it can be worse because you have not
considered that there are some descriptors required by other processes
running.   I suggest you increase your file limit to at least 2048.

Good luck
Ken
- Original Message -
From: Lance Lovette [EMAIL PROTECTED]
To: MySQL [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 12:12 AM
Subject: table_cache too high?


 My database has many hundreds of tables. Originally I set my
table_cache to
 512. Today I realize this might not be a good idea. By default
 open_files_limit is 0. According to my understanding of the manual
this
 means each MySQL process will open at most 1124 file handles:

 max_connections + (table_cache * 2)
 = 100 + (512 * 2)
 = 1124

 ulimit -n says the process file handle limit is 1024. Am I correct
in
 assuming this configuration could potentially put the server in an
unstable
 situation?

 Thanks!
 Lance


 
-
 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: table_cache too high?

2002-11-20 Thread Thomas Seifert

and how on-the-fly?


Thomas

On Wed, 20 Nov 2002 09:18:15 -0500 Ken Menzel [EMAIL PROTECTED] wrote:

 Yes,  you are correct and it can be worse because you have not
 considered that there are some descriptors required by other processes
 running.   I suggest you increase your file limit to at least 2048.
 
 Good luck
 Ken
 - Original Message -
 From: Lance Lovette [EMAIL PROTECTED]
 To: MySQL [EMAIL PROTECTED]
 Sent: Wednesday, November 20, 2002 12:12 AM
 Subject: table_cache too high?
 
 
  My database has many hundreds of tables. Originally I set my
 table_cache to
  512. Today I realize this might not be a good idea. By default
  open_files_limit is 0. According to my understanding of the manual
 this
  means each MySQL process will open at most 1124 file handles:
 
  max_connections + (table_cache * 2)
  = 100 + (512 * 2)
  = 1124
 
  ulimit -n says the process file handle limit is 1024. Am I correct
 in
  assuming this configuration could potentially put the server in an
 unstable
  situation?
 
  Thanks!
  Lance
 
 
  
 -
  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




Large Data Import

2002-11-20 Thread Lorenzo Curtis
MySQL Gurus:
 
I am working on a process to import data from a VMS database (SJ2) to
MySQL.
The table that I am importing has 10378507 (over 10 million) records in
it.  I have the records
exported to a comma-delimited text file, as the fields within the
database do not
contain any commas at all.
 
The command I am using to do the import is:
mysql LOAD DATA LOCAL INFILE '/home/warehouse/importfile.txt'
   - INTO TABLE importtable
   - FIELDS TERINATED BY ','
   - ENCLOSED BY '';
 
The process runs through (it takes about an hour into a non-indexed
MyISAM table).
At the end I get the following message:
Query OK, 5184509 rows affected
Records: 5184509Deleted: 0Skipped: 0Warnings 13376589
 
I have logging turned on, but the log file only shows the MySQL commands
that I entered without showing me what
all the warnings are.
 
Now my questions:
How can I see what the errors are that are occuring that cause half
of the records not to import?
Has anyone every done an import of over 10 million records before?
Is there a limitation in MySQL?
 
Thank you in advance for you assistance with this issue.
 
Lorenzo Curtis
Dead River Company
[EMAIL PROTECTED]
www.deadriver.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: table_cache too high?

2002-11-20 Thread Philipp Steinkrueger
If you with Linux, you can use the 'sysctl' programm.
sysctl -h gives you the parameters (i.e -u is for the maximum
number of processes created by a user). I use the sysctl command
in the safe_mysqld script to increase this number. if you want to
set a parameter systemwide you may also use /etc/sysctl.conf.


Regards,
Philipp

- Original Message -
From: Thomas Seifert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 3:25 PM
Subject: Re: table_cache too high?



 and how on-the-fly?


 Thomas

 On Wed, 20 Nov 2002 09:18:15 -0500 Ken Menzel [EMAIL PROTECTED] wrote:

  Yes,  you are correct and it can be worse because you have not
  considered that there are some descriptors required by other processes
  running.   I suggest you increase your file limit to at least 2048.
 
  Good luck
  Ken
  - Original Message -
  From: Lance Lovette [EMAIL PROTECTED]
  To: MySQL [EMAIL PROTECTED]
  Sent: Wednesday, November 20, 2002 12:12 AM
  Subject: table_cache too high?
 
 
   My database has many hundreds of tables. Originally I set my
  table_cache to
   512. Today I realize this might not be a good idea. By default
   open_files_limit is 0. According to my understanding of the manual
  this
   means each MySQL process will open at most 1124 file handles:
  
   max_connections + (table_cache * 2)
   = 100 + (512 * 2)
   = 1124
  
   ulimit -n says the process file handle limit is 1024. Am I correct
  in
   assuming this configuration could potentially put the server in an
  unstable
   situation?
  
   Thanks!
   Lance
  
  
   
  -
   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




-
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




Optimal use of HANDLER

2002-11-20 Thread Jacob Friis Larsen
To optimize speed I would like to use a HANDLER sql query to get data
from my database. 

HANDLER questions OPEN;
HANDLER questions READ FIRST WHERE qid = 1 LIMIT 1;
[Php code collects data]
HANDLER questions CLOSE;

Is that the best way to use HANDLER?
Can I make it even faster?

If any of you speek danish, the same question is here, whith Php
programming:
http://www.eksperten.dk/spm/284671

Regards, Jacob


-
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




Journals on MySQL

2002-11-20 Thread Insanely Great
Can somebody suggest some good English magazines on MySQL ?

Rgds
Insane



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

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




Re: table_cache too high?

2002-11-20 Thread Ken Menzel
Hi Thomas,
   This would be a question for your OS support list,  however an
example from FreeBSD:

bash-2.04$ sysctl -a | grep files
kern.maxfiles: 2
kern.maxfilesperproc: 19000
kern.openfiles: 1569
bash-2.04$ su
tuvok# sysctl kern.maxfiles=20001
kern.maxfiles: 2 - 20001
tuvok#

 Hope this helps, but it is off topic for this list.

Ken
- Original Message -
From: Thomas Seifert [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 9:25 AM
Subject: Re: table_cache too high?



 and how on-the-fly?


 Thomas

 On Wed, 20 Nov 2002 09:18:15 -0500 Ken Menzel [EMAIL PROTECTED]
wrote:

  Yes,  you are correct and it can be worse because you have not
  considered that there are some descriptors required by other
processes
  running.   I suggest you increase your file limit to at least
2048.
 
  Good luck
  Ken
  - Original Message -
  From: Lance Lovette [EMAIL PROTECTED]
  To: MySQL [EMAIL PROTECTED]
  Sent: Wednesday, November 20, 2002 12:12 AM
  Subject: table_cache too high?
 
 
   My database has many hundreds of tables. Originally I set my
  table_cache to
   512. Today I realize this might not be a good idea. By default
   open_files_limit is 0. According to my understanding of the
manual
  this
   means each MySQL process will open at most 1124 file handles:
  
   max_connections + (table_cache * 2)
   = 100 + (512 * 2)
   = 1124
  
   ulimit -n says the process file handle limit is 1024. Am I
correct
  in
   assuming this configuration could potentially put the server in
an
  unstable
   situation?
  
   Thanks!
   Lance
  
  
 
 
  -
   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




-
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: Large Data Import

2002-11-20 Thread Roger Abrahamsson
Well, I've done imports of about 50.000-100.000 posts from other databases.
I've gone another way then, and through perl/vi generated a file of 
mysql commands
that I've then run. Maybe is a bit slower, but you get a complete log in 
case some things dont
work out when you have logging turned on.

I would guess that most likely you have problems with quotation marks, 
special tokens or the like
that interferes.

anyway, one way of doing it would be something like this. (

cat file | perl -e 'while($x=){chomp $x; $x=~s/,/\,\/g; print 
insert into XX values(\; print $x; print \);\n }'  file.sql
cat file.sql | mysql

as for limitations.. I've run databases that had 12million records in 
mysql, with no
problems, except selects with criterias from that database tended to 
become slow. :-)

/Roger


Lorenzo Curtis wrote:

MySQL Gurus:

I am working on a process to import data from a VMS database (SJ2) to
MySQL.
The table that I am importing has 10378507 (over 10 million) records in
it.  I have the records
exported to a comma-delimited text file, as the fields within the
database do not
contain any commas at all.

The command I am using to do the import is:
   mysql LOAD DATA LOCAL INFILE '/home/warehouse/importfile.txt'
  - INTO TABLE importtable
  - FIELDS TERINATED BY ','
  - ENCLOSED BY '';

The process runs through (it takes about an hour into a non-indexed
MyISAM table).
At the end I get the following message:
   Query OK, 5184509 rows affected
   Records: 5184509Deleted: 0Skipped: 0Warnings 13376589

I have logging turned on, but the log file only shows the MySQL commands
that I entered without showing me what
all the warnings are.

Now my questions:
   How can I see what the errors are that are occuring that cause half
of the records not to import?
   Has anyone every done an import of over 10 million records before?
Is there a limitation in MySQL?

Thank you in advance for you assistance with this issue.

Lorenzo Curtis
Dead River Company
[EMAIL PROTECTED]
www.deadriver.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




mysqldump query

2002-11-20 Thread Mark Colvin
I would like to export the full contents of one particular table in a
database to a csv file once every day. I will then email this file I am
running MySQL 3.21 on a RedHat 7.2 server.  Is there an automated way of
doing this?



This e-mail is intended for the recipient only and
may contain confidential information. If you are
not the intended recipient then you should reply
to the sender and take no further ation based
upon the content of the message.
Internet e-mails are not necessarily secure and
CCM Limited does not accept any responsibility
for changes made to this message. 
Although checks have been made to ensure this
message and any attchments are free from viruses
the recipient should ensure that this is the case.


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

2002-11-20 Thread Massimo Bandinelli
A question:

I've a Mysql System with a Master and two slave.

Can I configure my master to automatically forward the select queries to =
the slaves?


Massimo Bandinelli
System Administrator
-
Register.it S.p.A. - Gruppo DADA
tel +39 199 REGIST (+39 199 734478)
fax +39 035 3230312
http://we.register.it
mailto:[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: table_cache too high?

2002-11-20 Thread Thomas Seifert
thanks a lot for both replies. 
I just asked as this question was brought up with the post before mine.
I will ask further off-list :-).


Thomas



On Wed, 20 Nov 2002 15:25:32 +0100 Thomas Seifert [EMAIL PROTECTED] wrote:

 
 and how on-the-fly?
 
 
 Thomas
 
 On Wed, 20 Nov 2002 09:18:15 -0500 Ken Menzel [EMAIL PROTECTED] wrote:
 
  Yes,  you are correct and it can be worse because you have not
  considered that there are some descriptors required by other processes
  running.   I suggest you increase your file limit to at least 2048.
  
  Good luck
  Ken
  - Original Message -
  From: Lance Lovette [EMAIL PROTECTED]
  To: MySQL [EMAIL PROTECTED]
  Sent: Wednesday, November 20, 2002 12:12 AM
  Subject: table_cache too high?
  
  
   My database has many hundreds of tables. Originally I set my
  table_cache to
   512. Today I realize this might not be a good idea. By default
   open_files_limit is 0. According to my understanding of the manual
  this
   means each MySQL process will open at most 1124 file handles:
  
   max_connections + (table_cache * 2)
   = 100 + (512 * 2)
   = 1124
  
   ulimit -n says the process file handle limit is 1024. Am I correct
  in
   assuming this configuration could potentially put the server in an
  unstable
   situation?
  
   Thanks!
   Lance
  
  
   
  -
   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
 

-
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




Wrong port is shutdown with several mysql(s) running in Win.

2002-11-20 Thread Francisco
Hello,

I have several mysql 3.23 daemons running in a Windows
XP Professional computer. To achieve this, I have run
the following commands:

mysqld-opt --basedir=C:\mysql 
--datadir=C:\mydb\data1
--port=3020 
--standalone 
--default-table-type=MyISAM 
--tmpdir=C:\mydb\temp1

mysqld-opt --basedir=C:\mysql 
--datadir=C:\mydb\data2
--port=3021 
--standalone 
--default-table-type=MyISAM 
--tmpdir=C:\mydb\temp2

mysqld-opt --basedir=C:\mysql 
--datadir=C:\mydb\data3
--port=3022 
--standalone 
--default-table-type=MyISAM 
--tmpdir=C:\mydb\temp3

After running these three commands from three
different ms-dos windows, I have three mysql running
in ports 3020, 3021, and 3022.

Now from another ms-dos windows, I execute:

mysqladmin --port=3022 shutdown

This command should shutdown the mysql running on 3022
but it shutdown 3020 instead. I try again:

mysqladmin --port=3022 shutdown

And 3021 is shutdown instead of 3022. I have concluded
that there is a possible bug which always shutdown in
the order of creation no matter which port you
specify.

I have tried the same thing in the newest version:
4.04 and it does not happen. 4.04 shutdown the port
correctly.

Any thoughts?

Thanks.


__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.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




Reuse MYSQL object instead of multiple connections?

2002-11-20 Thread Anna Fowles-Winkler
Hi,

Currently, my program creates a new MYSQL object each time a connection 
is needed to save or load information from my MySQL database. 
Sometimes, this connection is created 10,000 or more times during one 
use of the program.  I'm wondering if I reuse the connection (have a 
static MYSQL attribute on my database class object) if that would 
improve performance at all?  This is what I'm thinking of doing:

class MyDatabase {
public:
  // various constructors, destructor, and query functions...

private:
 static MYSQL *mysql;
 MYSQL_ROW row;
 MYSQL_RES *result;
};

Then the object is created once for the database that I'm working with 
in the constructor for MyDatabase, and reused for subsequent queries.

Has anyone else tried this?  Any other ways to do this?  I'm using the C 
API and MySQL 3.23.48 on RedHat Linux 7.2.

Thanks,
Anna


-
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



datetime arithmetic

2002-11-20 Thread Felipe D. Ramalho
Hi,

I'd like to obtain the number of hours and minutes between two fields
datetime and I'm trying to proceed just like the documentation says.

SELECT ...,  B.dthr_occurrence as open,
 DATE_SUB(C.dthr_occurrence, INTERVAL B.dthr_occurrence
HOUR_MINUTE) AS during,
 DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence
HOUR_MINUTE) AS late

FROM CALL A, OCCURRENCE B, OCCURRENCE C, OCCURRENCE D

WHERE A.COD_CALL = B.COD_CALL AND
  A.COD_CALL = C.COD_CALL AND
  A.COD_CALL = D.COD_CALL AND
  A.COD_LINK = '$lnk'  AND
  B.DESC_OCCURRENCE = 'open'   AND
  C.DESC_OCCURRENCE = 'close'   AND
  D.DESC_OCCURRENCE = 'stop'AND
 (B.DTHR_OCCURRENCE BETWEEN '$datef' AND '$datet')

But there is a problem. At the end this query returns a the correct result,
but all the
lines with the fields during and late in blank.

The function DATE_SUB is returning NULL and there isn't more examples.


Any idea about what to do?

[]s,

---
Felipe D. Ramalho
Estagiário - Datapuc - Suporte Tecnológico
+55 31 3249-7300



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

2002-11-20 Thread Francesco
Hello,
I tried to execute the following query:
SELECT studenti.*
FROM studenti,valutazioni LEFT JOIN valutazioni ON studenti.sid=valutazioni.sid
WHERE valutazioni.sid IS NULL;
and give me the following error message:
ERROR 1066: Not unique table/alias: 'valutazioni'
I have the  Mysql 4.0.1 alpha version.
I want to know what is the problem.


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

2002-11-20 Thread Iikka Meriläinen
On Wed, 20 Nov 2002, Francesco wrote:

 Hello,
 I tried to execute the following query:
 SELECT studenti.*
 FROM studenti,valutazioni LEFT JOIN valutazioni ON studenti.sid=valutazioni.sid
 WHERE valutazioni.sid IS NULL;

Hi!

I think you don't have to specify valutazioni in the FROM subclause (is it
the correct term?). SELECT studenti.* FROM studenti LEFT JOIN valutazioni
...

Iikka

 and give me the following error message:
 ERROR 1066: Not unique table/alias: 'valutazioni'
 I have the  Mysql 4.0.1 alpha version.
 I want to know what is the problem.



**
* Iikka Meriläinen   *
* E-mail: [EMAIL PROTECTED] *
* Vaala, Finland *
**


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

2002-11-20 Thread Ignatius Reilly
Syntax errors. Try:

SELECT studenti.*
FROM studenti LEFT JOIN valutazioni ON studenti.sid=valutazioni.sid
WHERE ISNULL( valutazioni.sid )


Ignatius

- Original Message -
From: Francesco [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 4:55 PM
Subject: mysql problem


 Hello,
 I tried to execute the following query:
 SELECT studenti.*
 FROM studenti,valutazioni LEFT JOIN valutazioni ON
studenti.sid=valutazioni.sid
 WHERE valutazioni.sid IS NULL;
 and give me the following error message:
 ERROR 1066: Not unique table/alias: 'valutazioni'
 I have the  Mysql 4.0.1 alpha version.
 I want to know what is the problem.


 -
 Please check http://www.mysql.com/Manual_chapter/manual_toc.html; before
 posting. To request this thread, e-mail [EMAIL PROTECTED]

 To unsubscribe, send a message to the address shown in the
 List-Unsubscribe header of this message. If you cannot see it,
 e-mail [EMAIL PROTECTED] instead.




-
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: datetime arithmetic

2002-11-20 Thread Keith C. Ivey
On 20 Nov 2002, at 14:40, Felipe D. Ramalho wrote:

 SELECT ...,  B.dthr_occurrence as open,
  DATE_SUB(C.dthr_occurrence, INTERVAL B.dthr_occurrence
 HOUR_MINUTE) AS during,
  DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence
 HOUR_MINUTE) AS late
 
 FROM CALL A, OCCURRENCE B, OCCURRENCE C, OCCURRENCE D

The DATE_SUBs in your query make no sense.  You're treating the same 
column as both a date and an HH:MM string representing a duration 
in hours and minutes.  It can't be both.

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

-
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: Does mysql_real_connect allocate memory?

2002-11-20 Thread Anna Fowles-Winkler
 Hi,

I tried taking out the new MYSQL, and my application dumps -- it doesn't 
look like mysql_init is actually allocating memory for the MYSQL object 
because then mysql_real_connect is called with a NULL pointer.

Is that supposed to happen?

--Anna

Ben Goodwin wrote:

Hi!
mysql_init will detect if 'mysql' is a NULL pointer or not and allocate
accordingly.  However, your code below doesn't initialize 'mysql' that way,
so your results are undefined.  I'd recommend:

MYSQL *mysql = NULL;

mysql_init (mysql);
mysql_real_connect(mysql, host, user, password, dbase, 0, 0, 0);

OR

MYSQL mysql;

mysql_init (mysql);
mysql_real_connect(mysql, host, user, password, dbase, 0, 0, 0);

   -=| Ben


- Original Message -
From: Anna Fowles-Winkler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 2:58 PM
Subject: Does mysql_real_connect allocate memory?


 

Hi,

Does the MySQL C API function mysql_real connect allocate memory or do I
need to do it?  This is what my code currently does:

MYSQL *mysql;
mysql = new MYSQL
mysql_init(mysql);
mysql_real_connect(mysql, host, user, password, dbase, 0, 0, 0);

Thanks,
Anna



-
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: fulltext, trying to index 2 character words

2002-11-20 Thread Sergei Golubchik
Hi!

On Nov 18, Kevin Lewandowski wrote:
 I'm using mysql fulltext indexes and want them to see words of 2 or 
 more characters, and no stopwords. I've edited the appropriate files 
 (ftdefs.h, ft_static.c), then recompile, install, restart mysql, 
 rebuild indexes, and there is no change. It still uses a minimum of 4 
 characters). I'm using mysql 3.23.52-max. Am I missing something? Can 
 anyone help?

What changes, exactly did you make in ftdefs.h and ft_static.c ?
How did you test, whether 2-char words are indexed or not ?
 
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: datetime arithmetic

2002-11-20 Thread Felipe D. Ramalho
Sorry, but I've omitted part of the where clause to make the message shorter
and now I see that it was important. Here goes the select again:

SELECT A.cod_call, A.cod_link, A.nr_call , A.status,
   B.dthr_occurrence as open,
   DATE_SUB(C.dthr_occurence, INTERVAL B.dthr_occurrence HOUR_MINUTE) AS
during,
   DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence HOUR_MINUTE)
AS late

FROM CALL A, OCCURRENCE B, OCCURRENCE C, OCCURRENCE D

WHERE A.COD_CALL= B.COD_CALL AND
  A.COD_CALL= C.COD_CALL AND
  A.COD_CALL= D.COD_CALL AND
  A.COD_LINK= '$lnk' AND
  B.DESC_OCCURRENCE = 'open' AND
  C.DESC_OCCURRENCE = 'close'AND
  D.DESC_OCCURRENCE = 'stop' AND
 (B.DTHR_OCCURRENCE BETWEEN '$datef' AND '$datet')



- Original Message -
From: Keith C. Ivey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Felipe D. Ramalho [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 3:09 PM
Subject: Re: datetime arithmetic


 On 20 Nov 2002, at 14:40, Felipe D. Ramalho wrote:

  SELECT ...,  B.dthr_occurrence as open,
   DATE_SUB(C.dthr_occurrence, INTERVAL B.dthr_occurrence
  HOUR_MINUTE) AS during,
   DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence
  HOUR_MINUTE) AS late
 
  FROM CALL A, OCCURRENCE B, OCCURRENCE C, OCCURRENCE D

 The DATE_SUBs in your query make no sense.  You're treating the same
 column as both a date and an HH:MM string representing a duration
 in hours and minutes.  It can't be both.

 --
 Keith C. Ivey [EMAIL PROTECTED]
 Tobacco Documents Online
 http://tobaccodocuments.org
 Phone 202-667-6653





-
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: fulltext, trying to index 2 character words

2002-11-20 Thread Kevin Lewandowski
Hi, Sergei.

In myisam/ftdefs.h I changed:

#define MIN_WORK_LEN 4

to:

#define MIN_WORD_LEN 2

and I commented out the line:

#define COMPILE_STOPWORDS_IN
(this should leave out stopwords right?)

There were no changes to ftstatic.c

recompile, reinstall, restart mysql.

To test I dropped and recreated the fulltext index on the existing 
table. Fulltext search didn't find any 2 or 3 character words.

I also created a new table (from the articles example in the mysql 
manual) and that didn't see any 2 or 3 character words either.

thanks

On Wednesday, November 20, 2002, at 09:18 AM, Sergei Golubchik wrote:

Hi!

On Nov 18, Kevin Lewandowski wrote:

I'm using mysql fulltext indexes and want them to see words of 2 or
more characters, and no stopwords. I've edited the appropriate files
(ftdefs.h, ft_static.c), then recompile, install, restart mysql,
rebuild indexes, and there is no change. It still uses a minimum of 4
characters). I'm using mysql 3.23.52-max. Am I missing something? Can
anyone help?


What changes, exactly did you make in ftdefs.h and ft_static.c ?
How did you test, whether 2-char words are indexed or not ?

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





Kevin Lewandowski
Discogs - http://www.discogs.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: datetime arithmetic

2002-11-20 Thread Keith C. Ivey
On 20 Nov 2002, at 15:30, Felipe D. Ramalho wrote:

 Sorry, but I've omitted part of the where clause to make the message shorter
 and now I see that it was important. Here goes the select again:
 
 SELECT A.cod_call, A.cod_link, A.nr_call , A.status,
B.dthr_occurrence as open,
DATE_SUB(C.dthr_occurence, INTERVAL B.dthr_occurrence HOUR_MINUTE) AS
 during,
DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence HOUR_MINUTE)
 AS late

I don't see that the WHERE clause is relevant.  The problem is with 
the types of the arguments you're giving to DATE_SUB().  It appears 
from your query that dthr_occurrence is a DATETIME column, so it's 
appropriate to use it as the first argument to DATE_SUB().  However, 
the expression in the second argument is supposed to be a string 
indicating an interval.

In this case, since you've said HOUR_MINUTE, MySQL is expecting a 
string giving a number of hours and a number of minutes.  Instead 
you're giving it something like '2002-11-20 12:54:43', which is not 
hours and minutes, so you get a NULL result.  You have to give it 
something like '12:54', or whatever interval it is you're trying to 
subtract.

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

-
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




Index using..

2002-11-20 Thread Fabrizio Nesti
Hello, it may be a simple question, but I can't get to it:

  Why this simple query does not use the PRIMARY key (which is oai_ui)?

mysql explain select * from idb_metadata where oai_ui like 'doi:10.1088/0%';
+--+--+---+--+-+--+++
| table| type | possible_keys | key  | key_len | ref  | rows   | Extra  |
+--+--+---+--+-+--+++
| idb_metadata | ALL  | PRIMARY   | NULL |NULL | NULL | 178035 | where used |
+--+--+---+--+-+--+++

  While this is correctly using it

mysql explain select oai_ui from idb_metadata where oai_ui like 'doi:10.1088/0%';
+--+---+---+-+-+--++-+
| table| type  | possible_keys | key | key_len | ref  | rows   | Extra 
|  |
+--+---+---+-+-+--++-+
| idb_metadata | range | PRIMARY   | PRIMARY |  50 | NULL | 137387 | where 
|used; Using index |
+--+---+---+-+-+--++-+

The change is just that I select * instead of the column itself.

Thanks in advance to whoever can help..
running crazy in tuning,
Thanks

Fabrizio Nesti -- MediaLab -- SISSA -- IT




PS: System info:

Server:  3.23.38-max-log
Table desc (it has 178035 records):
mysql desc idb_metadata;
+-+---+--+-+-+---+
| Field   | Type  | Null | Key | Default | Extra |
+-+---+--+-+-+---+
| oai_ui  | varchar(50)   |  | PRI | |   |
| download| date  | YES  | | NULL|   |
| datestamp   | date  | YES  | | NULL|   |
| updated | timestamp(14) | YES  | | NULL|   |
| submission  | date  | YES  | MUL | NULL|   |
| replacement | date  | YES  | MUL | NULL|   |
| title   | text  | YES  | | NULL|   |
| abstract| text  | YES  | | NULL|   |
| comment | text  | YES  | | NULL|   |
| journal | tinytext  | YES  | | NULL|   |
| url | tinytext  | YES  | | NULL|   |
| type| tinytext  | YES  | | NULL|   |
| language| tinytext  | YES  | | NULL|   |
| rights  | tinytext  | YES  | | NULL|   |
| publisher   | tinytext  | YES  | | NULL|   |
| contributor | tinytext  | YES  | | NULL|   |
| format  | tinytext  | YES  | | NULL|   |
| source  | tinytext  | YES  | | NULL|   |
| relation| tinytext  | YES  | | NULL|   |
| coverage| tinytext  | YES  | | NULL|   |
| profiles| tinyint(4)| YES  | | 1   |   |
+-+---+--+-+-+---+








-
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: Index using..

2002-11-20 Thread Joseph Bueno
Hi,

From the manual (http://www.mysql.com/doc/en/MySQL_indexes.html):

Fabrizio Nesti wrote:
 Hello, it may be a simple question, but I can't get to it:
 
   Why this simple query does not use the PRIMARY key (which is oai_ui)?
 
 mysql explain select * from idb_metadata where oai_ui like 'doi:10.1088/0%';
 +--+--+---+--+-+--+++
 | table| type | possible_keys | key  | key_len | ref  | rows   | Extra  |
 +--+--+---+--+-+--+++
 | idb_metadata | ALL  | PRIMARY   | NULL |NULL | NULL | 178035 | where used |
 +--+--+---+--+-+--+++
 
If the use of the index would require MySQL to access more than 30% of
the rows in the table. (In this case a table scan is probably much
faster, as this will require us to do much fewer seeks.)

   While this is correctly using it
 
 mysql explain select oai_ui from idb_metadata where oai_ui like 'doi:10.1088/0%';
 
+--+---+---+-+-+--++-+
 | table| type  | possible_keys | key | key_len | ref  | rows   | Extra   
|
 
+--+---+---+-+-+--++-+
 | idb_metadata | range | PRIMARY   | PRIMARY |  50 | NULL | 137387 | where 
used; Using index |
 
+--+---+---+-+-+--++-+
 

In some cases a query can be optimised to retrieve values without
consulting the datafile. If all used columns for some table are numeric
and form a leftmost prefix for some key, the values may be retrieved
from the index tree for greater speed:


 The change is just that I select * instead of the column itself.
 
 Thanks in advance to whoever can help..
 running crazy in tuning,
 Thanks
 
 Fabrizio Nesti -- MediaLab -- SISSA -- IT
 
 
 
 
 PS: System info:
 
 Server:  3.23.38-max-log
 Table desc (it has 178035 records):
 mysql desc idb_metadata;
 +-+---+--+-+-+---+
 | Field   | Type  | Null | Key | Default | Extra |
 +-+---+--+-+-+---+
 | oai_ui  | varchar(50)   |  | PRI | |   |
 | download| date  | YES  | | NULL|   |
 | datestamp   | date  | YES  | | NULL|   |
 | updated | timestamp(14) | YES  | | NULL|   |
 | submission  | date  | YES  | MUL | NULL|   |
 | replacement | date  | YES  | MUL | NULL|   |
 | title   | text  | YES  | | NULL|   |
 | abstract| text  | YES  | | NULL|   |
 | comment | text  | YES  | | NULL|   |
 | journal | tinytext  | YES  | | NULL|   |
 | url | tinytext  | YES  | | NULL|   |
 | type| tinytext  | YES  | | NULL|   |
 | language| tinytext  | YES  | | NULL|   |
 | rights  | tinytext  | YES  | | NULL|   |
 | publisher   | tinytext  | YES  | | NULL|   |
 | contributor | tinytext  | YES  | | NULL|   |
 | format  | tinytext  | YES  | | NULL|   |
 | source  | tinytext  | YES  | | NULL|   |
 | relation| tinytext  | YES  | | NULL|   |
 | coverage| tinytext  | YES  | | NULL|   |
 | profiles| tinyint(4)| YES  | | 1   |   |
 +-+---+--+-+-+---+
 
 

Hope this Helps
-- 
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




The dreaded move from Oracle to MySQL

2002-11-20 Thread Wesley Brown
Well, This is my first attempt at moving from Oracle to MySQL on such a
large scale and so far it isn't going well at all. We are running oracle
7.3.4.0.1 and MySQL 4.0.4-0 standard. We are moving 101 tables with a total
of 45 millon records over. I have tried several diffrent methods including
using a MS-SQL server to act as go between using DTS services. We have run
into two problems, one, we don't get all the data over we loose rows and the
like. Two it is super slow on the order of 18 to 30 hours to do a pull. We
need a way to move the data in a resonable amount of time around 8 hours is
the goal. Things I have tried so far include using MS-SQL as a go between
fast but with data loss, using a custom ADO application to move the data and
handle any transforms we get the data but it REAL slow, and trying to get
the oracledump.pl perl script to run with no success. If anyone has had a
chance to do this type of migration please point me in the right direction.
I would really hate to stay with Oracle for the only reason that we can't
get the data off of it and on to another box :)

Thanks,
Wes


-
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: Index using..

2002-11-20 Thread Fabrizio Nesti
On Wed, 20 Nov 2002, Joseph Bueno wrote:

 Fabrizio Nesti wrote:
 
Why this simple query does not use the PRIMARY key (which is oai_ui)?
 
  mysql explain select * from idb_metadata where oai_ui like 'doi:10.1088/0%';

While this is correctly using it
  mysql explain select oai_ui from idb_metadata where oai_ui like 'doi:10.1088/0%';
  
+--+---+---+-+-+--++-+
  | table| type  | possible_keys | key | key_len | ref  | rows   | Extra 
  |
  
+--+---+---+-+-+--++-+
  | idb_metadata | range | PRIMARY   | PRIMARY |  50 | NULL | 137387 | where 
used; Using index |
  
+--+---+---+-+-+--++-+

 In some cases a query can be optimised to retrieve values without
 consulting the datafile. If all used columns for some table are numeric
 and form a leftmost prefix for some key, the values may be retrieved
 from the index tree for greater speed:

Thanks!
Of course I read the manual... without actually reading. :)
On the second sentence, how does it apply, since the key is not numeric
(varchar)?

Thanks again, so I suppose we just have to LIMIT it.

Fabrizio


-
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: datetime arithmetic

2002-11-20 Thread Felipe D. Ramalho
Sorry, but I've omitted part of the where clause to make the message shorter
and now I see that it was important. Here goes the select again:

SELECT A.cod_call, A.cod_link, A.nr_call , A.status,
   B.dthr_occurrence as open,
   DATE_SUB(C.dthr_occurence, INTERVAL B.dthr_occurrence HOUR_MINUTE) AS
during,
   DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence HOUR_MINUTE)
AS late

FROM CALL A, OCCURRENCE B, OCCURRENCE C, OCCURRENCE D

WHERE A.COD_CALL= B.COD_CALL AND
  A.COD_CALL= C.COD_CALL AND
  A.COD_CALL= D.COD_CALL AND
  A.COD_LINK= '$lnk' AND
  B.DESC_OCCURRENCE = 'open' AND
  C.DESC_OCCURRENCE = 'close'AND
  D.DESC_OCCURRENCE = 'stop' AND
 (B.DTHR_OCCURRENCE BETWEEN '$datef' AND '$datet')

Now... another possibility? Why it isn't working?

---
Felipe D. Ramalho
Estagiário - Datapuc - Suporte Tecnológico
+55 31 3249-7300


- Original Message -
From: Keith C. Ivey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: Felipe D. Ramalho [EMAIL PROTECTED]
Sent: Wednesday, November 20, 2002 3:09 PM
Subject: Re: datetime arithmetic


 On 20 Nov 2002, at 14:40, Felipe D. Ramalho wrote:

  SELECT ...,  B.dthr_occurrence as open,
   DATE_SUB(C.dthr_occurrence, INTERVAL B.dthr_occurrence
  HOUR_MINUTE) AS during,
   DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence
  HOUR_MINUTE) AS late
 
  FROM CALL A, OCCURRENCE B, OCCURRENCE C, OCCURRENCE D

 The DATE_SUBs in your query make no sense.  You're treating the same
 column as both a date and an HH:MM string representing a duration
 in hours and minutes.  It can't be both.

 --
 Keith C. Ivey [EMAIL PROTECTED]
 Tobacco Documents Online
 http://tobaccodocuments.org
 Phone 202-667-6653

- Original Message -
 Hi,

 I'd like to obtain the number of hours and minutes between two fields
 datetime and I'm trying to proceed just like the documentation says.

 SELECT ...,  B.dthr_occurrence as open,
  DATE_SUB(C.dthr_occurrence, INTERVAL B.dthr_occurrence
 HOUR_MINUTE) AS during,
  DATE_SUB(D.dthr_occurrence, INTERVAL B.dthr_occurrence
 HOUR_MINUTE) AS late

 FROM CALL A, OCCURRENCE B, OCCURRENCE C, OCCURRENCE D

 WHERE A.COD_CALL = B.COD_CALL AND
   A.COD_CALL = C.COD_CALL AND
   A.COD_CALL = D.COD_CALL AND
   A.COD_LINK = '$lnk'  AND
   B.DESC_OCCURRENCE = 'open'   AND
   C.DESC_OCCURRENCE = 'close'   AND
   D.DESC_OCCURRENCE = 'stop'AND
  (B.DTHR_OCCURRENCE BETWEEN '$datef' AND '$datet')

 But there is a problem. At the end this query returns a the correct
result,
 but all the
 lines with the fields during and late in blank.

 The function DATE_SUB is returning NULL and there isn't more examples.


 Any idea about what to do?

 []s,

 ---
 Felipe D. Ramalho
 Estagiário - Datapuc - Suporte Tecnológico
 +55 31 3249-7300




-
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: The dreaded move from Oracle to MySQL

2002-11-20 Thread Scott Pippin


Scott Pippin
[EMAIL PROTECTED]

 Wesley Brown [EMAIL PROTECTED] 11/20/02 11:24AM 
Well, This is my first attempt at moving from Oracle to MySQL on such
a
large scale and so far it isn't going well at all. We are running
oracle
7.3.4.0.1 and MySQL 4.0.4-0 standard. We are moving 101 tables with a
total
of 45 millon records over. I have tried several diffrent methods
including
using a MS-SQL server to act as go between using DTS services. We have
run
into two problems, one, we don't get all the data over we loose rows
and the
like. Two it is super slow on the order of 18 to 30 hours to do a
pull. We
need a way to move the data in a resonable amount of time around 8
hours is
the goal. Things I have tried so far include using MS-SQL as a go
between
fast but with data loss, using a custom ADO application to move the
data and
handle any transforms we get the data but it REAL slow, and trying to
get
the oracledump.pl perl script to run with no success. If anyone has
had a
chance to do this type of migration please point me in the right
direction.
I would really hate to stay with Oracle for the only reason that we
can't
get the data off of it and on to another box :)

Thanks,
Wes

Oracle has an export utility. Did you try that?

We ran in to the same problems exporting our data from oracle to mysql.
 We used PowerBuilder(it has a data-pipeline feature under its database
menu).  This allowed us to connect through ODBC and create the table
then import the data.  Unfortunately we had to do this for each table.

I hope this gives you a few more ideas.




-
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: The dreaded move from Oracle to MySQL

2002-11-20 Thread Simon Windsor
Hi

I have moved huge amounts of data around in the past, from Oracle to Oracle, 
and Oracle to MySQL.

The problems to consider are

- export speed
- load speed

It can take hours to download a large database, nevermind re-loading it into 
another database. It is usually best to export the data into a simple file 
that can be read whilst you are writing to it.

Load speed is tricky. Do not have any indexes. Use the MySQL LOAD command, it 
is fast.

To do this I would do the following,

- on Oracle server
- - Create a NFS device
- - Create a FIFO pipe, using mknod
- - export data from Oracle to FIFO pipe

- on MySQL server
- - Mount remote NFS device
- - Use MySQL Load command to load data, or write your own loader in perl
- - when load is finished, build the MySQL indexes


I hope that this helps

Simon
 
On Wednesday 20 Nov 2002 6:24 pm, Wesley Brown wrote:
 Well, This is my first attempt at moving from Oracle to MySQL on such a
 large scale and so far it isn't going well at all. We are running oracle
 7.3.4.0.1 and MySQL 4.0.4-0 standard. We are moving 101 tables with a total
 of 45 millon records over. I have tried several diffrent methods including
 using a MS-SQL server to act as go between using DTS services. We have run
 into two problems, one, we don't get all the data over we loose rows and
 the like. Two it is super slow on the order of 18 to 30 hours to do a pull.
 We need a way to move the data in a resonable amount of time around 8 hours
 is the goal. Things I have tried so far include using MS-SQL as a go
 between fast but with data loss, using a custom ADO application to move the
 data and handle any transforms we get the data but it REAL slow, and trying
 to get the oracledump.pl perl script to run with no success. If anyone has
 had a chance to do this type of migration please point me in the right
 direction. I would really hate to stay with Oracle for the only reason that
 we can't get the data off of it and on to another box :)

 Thanks,
 Wes


 -
 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
mail: [EMAIL PROTECTED]
tel: 01454 617689
mob: 07720 447385

-
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: copying tables

2002-11-20 Thread Keith C. Ivey
On 20 Nov 2002, at 12:54, Steve Buehler wrote:

 What I am trying to do is to copy a mysql table to a new
 table name in a PHP script.

Use the query SHOW CREATE TABLE $from_table to get the SQL 
statement for creating the table, then do

$create_table_sql = preg_replace(
'/^CREATE TABLE `[^`]+`/',
CREATE TABLE $to_table,
$create_table_sql
);

to modify the SQL to create the new table.  Execute the query to 
create the empty table.  To fill it, simply do

INSERT INTO $to_table SELECT * FROM $from_table 

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

-
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




AIX 4.2.1 (RS6000) MySQL 3.23.x Binary Package

2002-11-20 Thread Christophe . Banal
Hello All,

I have done quite a bit of searching but have not been able to find any
MySQL 3.23.x Binary packages for AIX 4.2.1 (RS6000) any help in locating one
would be very much appreciated.

Thank you,
Christophe Banal

-
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: Strange Error with MySQL 4.0.4 under Win2K

2002-11-20 Thread Listen Hinz
Dear Egor,

thanks for your great advice, finally pointing out the reason for the
problem.

 SH mysql ALTER TABLE auftrag CHANGE Nummer Nummer INT UNSIGNED NOT NULL
 SH PRIMARY KEY;
 SH ERROR 7: Error on rename of '.\trainee\auftrag.MYI' to
 SH '.\trainee\#sql2-648-2.MYI' (Errcode: 13)

 This error can occur on Windows if you use lower_case_table_names=1.

Which is turned on by default with MySQL 4.0.x. Is this a bug or a feature?
;-)

Regards,
--
  Stefan Hinz [EMAIL PROTECTED]
  CEO / Geschäftsleitung iConnect GmbH http://iConnect.de
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3


- Original Message -
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 19, 2002 7:52 PM
Subject: re: Strange Error with MySQL 4.0.4 under Win2K


 Stefan,
 Sunday, November 17, 2002, 5:12:52 PM, you wrote:

 SH yesterday I imported some tables from MS Access via ODBC into my brand
 SH new MySQL 4.0.4 server. Everything went fine, but the tables did not
 SH have a primary key, so I did the following:

 SH mysql ALTER TABLE auftrag CHANGE Nummer Nummer INT UNSIGNED NOT NULL
 SH PRIMARY KEY;
 SH ERROR 7: Error on rename of '.\trainee\auftrag.MYI' to
 SH '.\trainee\#sql2-648-2.MYI' (Errcode: 13)

 This error can occur on Windows if you use lower_case_table_names=1.

 SH As PERROR says, 13 is permission denied. What's that? I can do the
 SH following:

 SH mysql CREATE TABLE auftrag_2 SELECT * FROM auftrag;

 SH Now, I can ALTER the auftrag_2 TABLE with no problems at all.

 SH Trying a workaround, I switched the default-table-type to innodb. Now,
 SH all the Access tables I import become innoDB tables, and I can ALTER
 SH TABLE auftrag like above without getting error 13.

 SH However, innoDB tables have a MyISAM style .frm file. I get a quite
 SH similar error when I try the following:

 SH mysql ALTER TABLE auftrag ADD FOREIGN KEY (Auftraggeber) REFERENCES
 SH auftraggeber(Schl);
 SH ERROR 1005: Can't create '.\trainee\#sql-6fc_2.frm'. (Error: 150)

 SH Seems to be an (internal) temporary table problem. Does anyone know
 SH what's happening, and how to solve this prob?

 Nope. It's not the same error. This error means that your foreign key
 definition is not correctly formed.




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




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

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



-
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: AIX 4.2.1 (RS6000) MySQL 3.23.x Binary Package

2002-11-20 Thread Lenz Grimmer
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Wednesday 20 November 2002 20:32, [EMAIL PROTECTED] wrote:

 I have done quite a bit of searching but have not been able to find any
 MySQL 3.23.x Binary packages for AIX 4.2.1 (RS6000) any help in locating
 one would be very much appreciated.

Sorry, there is none (at least not from MySQL AB). We do only have AIX 4.3 
build systems available.

Bye,
LenZ
- -- 
For technical support contracts, visit https://order.mysql.com/?ref=mlgr
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Lenz Grimmer [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Production Engineer
/_/  /_/\_, /___/\___\_\___/   Hamburg, Germany
   ___/   www.mysql.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE92+UhSVDhKrJykfIRAuEXAJ9cqu1sLr3rx7scfdekZDdvAf+AnQCeLtYu
miItP0Wa2+qjdsEJdbL4bfc=
=hCsX
-END PGP SIGNATURE-

-
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: The dreaded move from Oracle to MySQL

2002-11-20 Thread Wesley Brown
Well, it looks like Simon has the best possible answer so far. I did a test
dump into a delimited file from Oracle and imported that using the LOAD
command in mysql and sustaned about 11,000 inserts a second. This is with no
indexes on the mysql tables at all. I have also tried using the dbtools
import function but it will ether time out or just hang on the big tables.

--Simon Says
To do this I would do the following,

- on Oracle server
- - Create a NFS device
- - Create a FIFO pipe, using mknod
- - export data from Oracle to FIFO pipe

- on MySQL server
- - Mount remote NFS device
- - Use MySQL Load command to load data, or write your own loader in perl
- - when load is finished, build the MySQL indexes

Can you explain this procedure to me a little better or point me to
something I can read? I still have to convince the person who manages the
Oracle box to open up an NFS share. Another way we could increase load times
would be to use 4 scripts to load data from 4 tables at once. We have the
bandwith to handle that and the MySQL box seems to be handling request just
fine at 11,000 inserts its still not tapping out both procs or killing the
disk I/O.

Thanks to everyone who responded so quickly!

Cheers,
Wes


-
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: The dreaded move from Oracle to MySQL

2002-11-20 Thread Ryan Fox
 Can you explain this procedure to me a little better or point me to
 something I can read? I still have to convince the person who manages the
 Oracle box to open up an NFS share.

The point of using NFS to transfer the files from the oracle box to the
mysql box is to avoid copying the data twice.  If this isn't possible
(because the oracle box doesn't already have nfs set up, and the admin
doesn't want to make changes...), you can copy the data via any other means.
CD-R's, DLT, FTP, scp, wget,  .  NFS would likely be the easiest to use,
and cuts out an intermediate step of copying the data to a second location,
but it is not necessary.

SQL

Ryan

 Another way we could increase load times
 would be to use 4 scripts to load data from 4 tables at once. We have the
 bandwith to handle that and the MySQL box seems to be handling request
just
 fine at 11,000 inserts its still not tapping out both procs or killing the
 disk I/O.


Though I don't think you'd see much (any?) speed up by doing this, I'll
defer to the good judgement of other list members than have more data than
me.


-
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




SELECT Statement Question

2002-11-20 Thread Boris Posenjak
Hi

I am a beginner in using mysql on Windows platform, and I have a question regarding
the use of SELECT * from TABLE_NAME statement within the mysql prompt.

I have a table of consisting of three columns POSTCODE, SUBURB, STATE where
the primary key is a composite of all three fields.

When I run SELECT * FROM POSTCODE; in mysql prompt I get garbled display of
data and some of my data is not shown. 
However when viewed from within a tool like PHP MYADMIN all the data is displayed
correctly. 

Is this a bug or a limitation of mysql? Or am I doing something wrong? 

Any advice/help would be most appreciated.

Thanks

Best regards

Boris

-
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: SELECT Statement Question

2002-11-20 Thread Fernando Grijalba
You should write:

SELECT postcode FROM TABLE_NAME;

This will display the postcode from your table?

Jfernand
** sql **

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: November 20, 2002 16:12
To: [EMAIL PROTECTED]
Subject: SELECT Statement Question


Hi

I am a beginner in using mysql on Windows platform, and I have a question
regarding
the use of SELECT * from TABLE_NAME statement within the mysql prompt.

I have a table of consisting of three columns POSTCODE, SUBURB, STATE where
the primary key is a composite of all three fields.

When I run SELECT * FROM POSTCODE; in mysql prompt I get garbled display of
data and some of my data is not shown.
However when viewed from within a tool like PHP MYADMIN all the data is
displayed
correctly.

Is this a bug or a limitation of mysql? Or am I doing something wrong?

Any advice/help would be most appreciated.

Thanks

Best regards

Boris

-
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: copying tables

2002-11-20 Thread Steve Buehler
Thank You.  I am not sure which one is faster because I don't have any HUGE 
tables to test it on, but someone from the PHP mailing list gave me the 
following that works like a charm.
create table table2 select * from table1

Thanks
Steve

At 02:09 PM 11/20/2002 -0500, you wrote:
On 20 Nov 2002, at 12:54, Steve Buehler wrote:

 What I am trying to do is to copy a mysql table to a new
 table name in a PHP script.

Use the query SHOW CREATE TABLE $from_table to get the SQL
statement for creating the table, then do

$create_table_sql = preg_replace(
'/^CREATE TABLE `[^`]+`/',
CREATE TABLE $to_table,
$create_table_sql
);

to modify the SQL to create the new table.  Execute the query to
create the empty table.  To fill it, simply do

INSERT INTO $to_table SELECT * FROM $from_table

--
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

-
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


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3




--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
ow3


-
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 on windows

2002-11-20 Thread CoastResearch
TERRIBLE!

at least with ver mysql-3.23.53 on Win98. It crashes my machine 
after a while and when I close it, it sends the hadr drive into an 
infinite loop doing who knows what.



On 20 Nov 2002, at 11:02, Simon Windsor wrote:

 Hi
 
 I have been asked to support/bug-fix a Windows based web site 
using MySQL. 
 
 I have used MySQL on Linux/FreeBSD for 3/4 years, but never 
on Windows.
 
 How does MySQL compare on Linux and Windows for stability 
and performance ? 
 
 Simon
 -- 
 Simon Windsor
 mail: [EMAIL PROTECTED]
 
 

Regards
Mike

-
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: SELECT Statement Question

2002-11-20 Thread Ray
 When I run SELECT * FROM POSTCODE; in mysql prompt I get garbled display of
 data and some of my data is not shown.

the garbled display is probably due to the results being wider then the 
screen/terminal, and since the mysql client doesn't implement a horizontal 
scrollbar like a gui/web mysql client does, it makes wide output hard to 
understand or use. 

Is this a bug or a limitation of mysql? Or am I doing something wrong? 

that could be considered a limit of the text mysql client or of the terminal 
your using.

-- 
mysql, sql, query

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

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




RE: The dreaded move from Oracle to MySQL

2002-11-20 Thread Andrew Braithwaite
Wesley,

Forgive me because I'm not overly familiar with Oracle, and this is an
unproven idea

If you can run the oracle export function from unix shell, you could do
something like the following

-- Install the mysql client on the oracle db server (will be quick and won't
need any downtime)

-- grant permissions on the new mysql server to allow the newly installed
remote client access to it

-- make sure the mysql client on the oracle server can write to the new
mysql db ok

-- create all the required tables on the new mysql server's db (leaving out
indicies if you want to gain performance)

-- In a script (using variables and loops), run something like the following
from shell on the oracle server (where t is the table name):

[shell]# Oraclexportutility --tabdelim t  t; mysqlimport multimaps t;sleep
5;rm -f t

(where Oraclexportutility --tabdelim t is the oracle export widget that I
know nothing about!!)

I know that the same method works with:

[shell]# mysql -B -N --execute=select * from t multimaps  t; mysqlimport
multimaps t;sleep 5;rm -f t

If you can find a way to pipe the output straight to the mysql import
utility without writing a copy to disk then that's even better! (I drew a
blank at this one..)  Also, if your tables are small enough to use a ramdisk
for the temp table t then that's good too.

You could run several of these occurences at once (although it would hammer
your disks) to make the most of the bandwith available.

There are lots of options to mysqlimport such as:
-C, --compress  Use compression in server/client protocol.
-f, --force Continue even if we get an sql-error.
-i, --ignoreIf duplicate unique key was found, keep old row.
-r, --replace   If duplicate unique key was found, replace old row.

And (I quote) If one uses sockets to connect to the MySQL server, the server
will open and
read the text file directly.

As I said, these are ideas  I hope it will at least give you some ideas
too...

Cheers,

Andrew


 

-Original Message-
From: Wesley Brown [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, 20 November 2002 20:24
To: Simon Windsor; [EMAIL PROTECTED]
Subject: RE: The dreaded move from Oracle to MySQL


Well, it looks like Simon has the best possible answer so far. I did a test
dump into a delimited file from Oracle and imported that using the LOAD
command in mysql and sustaned about 11,000 inserts a second. This is with no
indexes on the mysql tables at all. I have also tried using the dbtools
import function but it will ether time out or just hang on the big tables.

--Simon Says
To do this I would do the following,

- on Oracle server
- - Create a NFS device
- - Create a FIFO pipe, using mknod
- - export data from Oracle to FIFO pipe

- on MySQL server
- - Mount remote NFS device
- - Use MySQL Load command to load data, or write your own loader in perl
- - when load is finished, build the MySQL indexes

Can you explain this procedure to me a little better or point me to
something I can read? I still have to convince the person who manages the
Oracle box to open up an NFS share. Another way we could increase load times
would be to use 4 scripts to load data from 4 tables at once. We have the
bandwith to handle that and the MySQL box seems to be handling request just
fine at 11,000 inserts its still not tapping out both procs or killing the
disk I/O.

Thanks to everyone who responded so quickly!

Cheers,
Wes


-
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




help with a query accross multiple tables (pt 2)

2002-11-20 Thread Justin French
Hi all,

I have the following query i'm running through a PHP script:

SELECT DISTINCT board_threads.*
FROM board_threads
LEFT JOIN  board_replies
ON board_threads.id = board_replies.threadid
WHERE (board_threads.stamp  '{$startDate}' OR board_replies.stamp 
'{$startDate}')
ORDER BY board_threads.id DESC


Quick translation:  Show threads on a msg board, only if:
a) the thread was created in the last 7 days
b) the thread has replies within the last 7 days

The stamp field in both tables is a unix time stamp.


It works as expected, and I'm happy, however, I'd liek to know a few things
(to help me learn):

1. Is there anyway this can be optimised?


2. Why was I getting SOME threads returned twice when I didn't have
DISTINCT in there?


3. Currently, the results are ordered by board_threads.id... is it possible
to order them by date?   The issue is that there are multiple dates to
consider...

- board_threads.stamp
  (the timestamp the thread was created)
- board_replies.stamp
  (the timestamp each reply was created -- there may be zero or more
replies, so the newest stamp of these should be taken)


Any help appreciated, or links to a magical page that enables me to find out
for myself :)


Thanks,

Justin French

http://Indent.com.au
Web Developent  
Graphic Design



-
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




importing form a file (question)

2002-11-20 Thread Stick Dragon
I had a free mysql database and admined with phpmyadmin. well i got a back 
up from called backup.sql

in side the file it looks like this

# Table structure for table `phpbb_auth_access`
#

CREATE TABLE phpbb_auth_access (
 group_id mediumint(8) NOT NULL default '0',
 forum_id smallint(5) unsigned NOT NULL default '0',
editied for space
 KEY forum_id (forum_id)
) TYPE=MyISAM;

#
# Dumping data for table `phpbb_auth_access`
#

INSERT INTO phpbb_auth_access VALUES (21,10,1,1,1,1,1,1,1,1,1,'','','');
INSERT INTO phpbb_auth_access VALUES (4,9,1,1,1,1,1,1,1,1,1,'','','');
editied for space
INSERT INTO phpbb_auth_access VALUES (19,10,1,1,1,1,1,1,1,1,1,'','','');
# 

is there a way to run, and restore the database with this file. i dont have 
phpmyadmin installed, didnt really like the prog and trying to learn mysql 
through the console.

_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail


-
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: copying tables

2002-11-20 Thread Keith C. Ivey
On 20 Nov 2002, at 16:01, Steve Buehler wrote:

 Thank You.  I am not sure which one is faster because I don't have any HUGE 
 tables to test it on, but someone from the PHP mailing list gave me the 
 following that works like a charm.
 create table table2 select * from table1

The problem with that method is that it doesn't preserve indexes (and 
other things, like defaults).  But if you don't have any of those it 
should be fine.

(By the way, I tried CCing you on the earlier message but got back a 
bounce saying no MX record was found for vespro.com.  You might want 
to check your DNS setup.)

[Filter fodder: SQL]

-- 
Keith C. Ivey [EMAIL PROTECTED]
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

-
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




LIMIT clause

2002-11-20 Thread JohnMeyer
When you specify a limit clause, do you start at 0 or at 1?
The reason why I ask is that, on one query, it seems to be picking up the 
second record first when I use 1 e.g LIMIT 1, 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



Re: importing form a file (question)

2002-11-20 Thread Daniel Kasak
Stick Dragon wrote:


I had a free mysql database and admined with phpmyadmin. well i got a 
back up from called backup.sql

in side the file it looks like this

# Table structure for table `phpbb_auth_access`
#

CREATE TABLE phpbb_auth_access (
 group_id mediumint(8) NOT NULL default '0',
 forum_id smallint(5) unsigned NOT NULL default '0',
editied for space
 KEY forum_id (forum_id)
) TYPE=MyISAM;

#
# Dumping data for table `phpbb_auth_access`
#

INSERT INTO phpbb_auth_access VALUES (21,10,1,1,1,1,1,1,1,1,1,'','','');
INSERT INTO phpbb_auth_access VALUES (4,9,1,1,1,1,1,1,1,1,1,'','','');
editied for space
INSERT INTO phpbb_auth_access VALUES (19,10,1,1,1,1,1,1,1,1,1,'','','');
# 

is there a way to run, and restore the database with this file. i dont 
have phpmyadmin installed, didnt really like the prog and trying to 
learn mysql through the console.

mysql  backup.sql -p
You may want to drop the tables before running the script, as it will 
re-create the tables.

--
Daniel Kasak
IT Developer
* NUS Consulting Group*
Level 18, 168 Walker Street
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: www.nusconsulting.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: MySQL Delphi 6

2002-11-20 Thread RBRoa
In my situation I used Delphi 6 and MySQL as a client/server application. I
tried DBX before but it gives me more headache, more on connection
issue...so I decided to switch to WinZeos project as a component in
Delphi...for now I use the component as my basic connector to my server. I
also heard that Delphi 6 needs an update from Borland about the issue, a
patch to improve the DBX component.



R.B.Roa
Traffic Management Engineer
PhilCom Corporation
Tel. No.(Office) (088) 858-1028
(Home) (088) 858-8889
Mobile No. (63) (919-3085267)


-Original Message-
From:   Patricio Díaz G. [SMTP:[EMAIL PROTECTED]]
Sent:   Thursday, November 21, 2002 8:10 AM
To: [EMAIL PROTECTED]
Subject:Re: MySQL  Delphi 6

Thanks for anwering to my request.
I started to practice with Delphi and Kylix in my free time, first
with
Kylix, later with Delphi. With Kylix I had no problems to connect to
the
MySQL server, may be becouse I was coding int the same machine where
it is,
but now I'm tring Delphi 6 and I can't connect to it. I'm using the
standart
dbExpress TSQLConnection component, I configure it as the manual
says, but
when I set it's Connected property to True, it says DBX error:
Invalid
Username/Password.

What I want to know is if there is somebody that could make work
Delphi 6
with MySQL in a remote box together, or if somebody knoks certainly
that
Delphi 6 has a bug so it can't connect to a remote MySQL.

Regards,

Patricio


-
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 1148 The error used Command is not allowed with this MySQL -Version

2002-11-20 Thread Morris, Geoffrey E
Use the mysqlc.exe client instead of mysql.exe

-- Geoff Morris

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 20, 2002 7:28 AM
To: [EMAIL PROTECTED]
Subject: Error 1148 The error used Command is not allowed with this
MySQL -Version



Hello,
I downloded MySQL-Version 3.23 for Windows XP from MySQL-webpage. If I try
to load a Database from a textfile I got message Error 1148 The error used
Command is not allowed with this MySQL-Version.
I used following Command: LOAD DATA LOCAL INFILE verlagdaten.txt INTO
TABLE verlag;

Any ideas for help?

Best regards,

Klaus Wagner




-
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: LIMIT clause

2002-11-20 Thread Georg Richter
On Thursday 21 November 2002 00:31, JohnMeyer wrote:
 When you specify a limit clause, do you start at 0 or at 1?
 The reason why I ask is that, on one query, it seems to be picking up the
 second record first when I use 1 e.g LIMIT 1, 10.



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

From: http://www.mysql.com/doc/en/SELECT.html

The LIMIT clause can be used to constrain the number of rows returned by the 
SELECT statement. LIMIT takes one or two numeric arguments. The arguments 
must be integer constants. If two arguments are given, the first specifies 
the offset of the first row to return, the second specifies the maximum 
number of rows to return. The offset of the initial row is 0 (not 1): 

Regards

Georg

-
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




Setting up a password for MySQL on Windows.

2002-11-20 Thread Trystano
Hi, this is my first dabble of using MySQL and am having trouble setting a 
password.
I have installed MySQL on Windows XP. I've gone through the manual, but I 
can't really find how to do it. If you could post me the coomand line I need 
to enter, it would be great. Thanks.

Trystan Hughes

-
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: The dreaded move from Oracle to MySQL

2002-11-20 Thread John Ragan

since you're comfortable with rolling your own 
tools, here are some observations about the ado 
approach, and which could be applied to odbc as 
well.

i'm running an oracle enterprise server in a test 
environment for corereader, and i've noticed 
that, although oracle sometimes takes a while to 
wake up, after you have its attention, it throws 
data at you very fast.  sometimes a developer 
does not use connections properly.  in your case, 
i would create a single connection and keep it 
open for the duration of the 45 million record 
move.

after the connection is open, i would not move 
records.  instead, i would ask oracle for the 
biggest record set that the infrastructure can 
handle.  it will come back to you very fast.  
then i would do the inserts into mysql.  when 
that data set is done, i would retrieve another. 

i would log the operation.  i always expect a an 
operation of that size to overwhelm the 
infrastructure, so i would keep a running check 
of where the operation is.  i would write that 
log into a local disk file.  if the process 
crashes, you pick up from where it went down.

be sure that oracle's nolog is set for every 
table.  in fact, turn off all logging everywhere 
except for your app's log.  also, insure that 
there are no indexes in the mysql side until 
you're finished.  i'm still becoming familiar 
with mysql, but insure that there's no 
transaction logging going on.

glad to hear that you had no errors before, but 
be careful of oracle's data typing.

if you have the resources, copy the app to 
additional boxes.  run all of them simultaneously 
against the servers.  they'll bump into each 
other, but there's enough latency in all the 
systems to let them all operate.  (hopefully, 
you're running on at least a hundred meg network 
for this.)  for your operation, it would be worth 
it to borrow five or ten machines from the rest 
of the organization for a couple of days.

if you run multiple apps, increase the query 
timeout of all of the connections.

that's the way that i would do it.


 Well, This is my first attempt at moving from Oracle to MySQL on such a
 large scale and so far it isn't going well at all. We are running oracle
 7.3.4.0.1 and MySQL 4.0.4-0 standard. We are moving 101 tables with a total
 of 45 millon records over. I have tried several diffrent methods including
 using a MS-SQL server to act as go between using DTS services. We have run
 into two problems, one, we don't get all the data over we loose rows and the
 like. Two it is super slow on the order of 18 to 30 hours to do a pull. We
 need a way to move the data in a resonable amount of time around 8 hours is
 the goal. Things I have tried so far include using MS-SQL as a go between
 fast but with data loss, using a custom ADO application to move the data and
 handle any transforms we get the data but it REAL slow, and trying to get
 the oracledump.pl perl script to run with no success. If anyone has had a
 chance to do this type of migration please point me in the right direction.
 I would really hate to stay with Oracle for the only reason that we can't
 get the data off of it and on to another box :)
 
 Thanks,
 Wes
 
 



-- 
John Ragan
[EMAIL PROTECTED]
http://www.CoreReader.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: SELECT Statement Question

2002-11-20 Thread John Ragan

thanks for the chuckle.  we've all been beginners 
and i still do dumb things with sql.

download corereader from http://corereader.com

it will let you click on the database objects to 
build your queries.  when you click on your table 
name and your field name, it will return the data 
to you and, if you care to look at it, it will 
show you the correct query of 

  select * from table_name

instead of your 

  select * from postcode



 Hi
 
 I am a beginner in using mysql on Windows platform, and I have a question regarding
 the use of SELECT * from TABLE_NAME statement within the mysql prompt.
 
 I have a table of consisting of three columns POSTCODE, SUBURB, STATE where
 the primary key is a composite of all three fields.
 
 When I run SELECT * FROM POSTCODE; in mysql prompt I get garbled display of
 data and some of my data is not shown. 
 However when viewed from within a tool like PHP MYADMIN all the data is displayed
 correctly. 
 
 Is this a bug or a limitation of mysql? Or am I doing something wrong? 
 
 Any advice/help would be most appreciated.
 
 Thanks
 
 Best regards
 
 Boris
 



-- 
John Ragan
[EMAIL PROTECTED]
http://www.CoreReader.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: MySQL on windows

2002-11-20 Thread John Ragan

my experience is rather limited since i use linux 
only as a file server.  after installations of 
mysql on win2k and nt4.0 sp6, i can say that it 
came up without incident, and has been running 
for months in the corereader test environment.  
it was far far easier to install than oracle, and 
easier to install than mssql.  when i reboot the 
windows box, mysql has always popped back up.

my philosophy with tools is if it doesn't keep 
running after i install it, i don't need it.  so 
far, mysql seems to be a keeper.


 TERRIBLE!
 
 at least with ver mysql-3.23.53 on Win98. It crashes my machine 
 after a while and when I close it, it sends the hadr drive into an 
 infinite loop doing who knows what.
 
 
 
 On 20 Nov 2002, at 11:02, Simon Windsor wrote:
 
  Hi
  
  I have been asked to support/bug-fix a Windows based web site 
 using MySQL. 
  
  I have used MySQL on Linux/FreeBSD for 3/4 years, but never 
 on Windows.
  
  How does MySQL compare on Linux and Windows for stability 
 and performance ? 
  
  Simon
  -- 
  Simon Windsor
  mail: [EMAIL PROTECTED]
  
  
 
 Regards
 Mike
 



-- 
John Ragan
[EMAIL PROTECTED]
http://www.CoreReader.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




Character Based Front end for mysql

2002-11-20 Thread RP
I have recently installed msql v 3.21 on my UNIX server (SCO Openserver 
Enterprise). Can someone steer me to where I might find a UNIX character 
based front end (NOT GUI) so that I might be able to interactively add, 
edit, delete, and browse the records of my database.
Thanks,


--Ray [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 about Sum()

2002-11-20 Thread Daniel Chicayban
Query:
SELECT Count(id) AS Taken FROM ClassGuests WHERE id=5
Returns 1 record, value 0

Query:
SELECT Sum(nGuests) AS Taken FROM ClassGuests WHERE id=5
Returns 1 record, value '' (nothing)

And
Query:
SELECT Count(id)+Sum(nGuests) AS Taken FROM ClassGuests WHERE id=5
Returns 1 record, value '' (nothing)

I expected to be 0, but it's not. And because of that I need to convert 
this through code. Is that anyway to force Sum() to return 0 if nothing found?

Thanks.
Daniel 


-
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 on windows

2002-11-20 Thread Dan Cumpian
I've been running MySQL on Windows 2000 and Windows XP as local services
on my DESKTOP, (I know, I know) without any problems. In fact, I hardly
even know that the services are running except when I process a large
chunk of data...

Dan Cumpian


-Original Message-
From: John Ragan [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, November 20, 2002 9:18 PM
To: [EMAIL PROTECTED]
Subject: Re: MySQL on windows


my experience is rather limited since i use linux 
only as a file server.  after installations of 
mysql on win2k and nt4.0 sp6, i can say that it 
came up without incident, and has been running 
for months in the corereader test environment.  
it was far far easier to install than oracle, and 
easier to install than mssql.  when i reboot the 
windows box, mysql has always popped back up.

my philosophy with tools is if it doesn't keep 
running after i install it, i don't need it.  so 
far, mysql seems to be a keeper.


 TERRIBLE!
 
 at least with ver mysql-3.23.53 on Win98. It crashes my machine 
 after a while and when I close it, it sends the hadr drive into an 
 infinite loop doing who knows what.
 
 
 
 On 20 Nov 2002, at 11:02, Simon Windsor wrote:
 
  Hi
  
  I have been asked to support/bug-fix a Windows based web site 
 using MySQL. 
  
  I have used MySQL on Linux/FreeBSD for 3/4 years, but never 
 on Windows.
  
  How does MySQL compare on Linux and Windows for stability 
 and performance ? 
  
  Simon
  -- 
  Simon Windsor
  mail: [EMAIL PROTECTED]
  
  
 
 Regards
 Mike
 



-- 
John Ragan
[EMAIL PROTECTED]
http://www.CoreReader.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: question about Sum()

2002-11-20 Thread Paul DuBois
At 21:38 -0500 11/20/02, Daniel Chicayban wrote:

Query:
SELECT Count(id) AS Taken FROM ClassGuests WHERE id=5
Returns 1 record, value 0

Query:
SELECT Sum(nGuests) AS Taken FROM ClassGuests WHERE id=5
Returns 1 record, value '' (nothing)

And
Query:
SELECT Count(id)+Sum(nGuests) AS Taken FROM ClassGuests WHERE id=5
Returns 1 record, value '' (nothing)

I expected to be 0, but it's not. And because of that I need to 
convert this through code. Is that anyway to force Sum() to return 0 
if nothing found?

Thanks.
Daniel

My quess is that you're issuing these queries through some API?
If so, you're probably not getting '' back, but NULL.  And if
*that's* so, you can detect that by checking for whatever value
your API uses to represent NULL.

-
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 query error

2002-11-20 Thread Dan Nelson
In the last episode (Nov 21), ck nuke said:
 I have a problem about : mysql query
 I need help for this.
 Sever: mysql Version: 4.0.4-bata
   SELECT p.pid, p.dateline, t.tid, t.replies FROM cdb_threads t, 
 cdb_posts p WHERE p.tid=t.tid AND t.fid='24' ORDER BY p.dateline DESC LIMIT 
 0,1
 When use this command, no result
 ---
   SELECT p.pid, p.dateline, t.tid, t.replies FROM cdb_threads t, 
 cdb_posts p WHERE p.tid=t.tid AND t.fid='24' ORDER BY p.pid DESC LIMIT 0,1
 When use this command, have one result
 ---
   SELECT pid FROM cdb_posts ORDER BY dateline DESC
 When use this command, have results
 ---
 Don't know where is the mistake???

Upgrade to 4.0.5.  From the changelog:

  * Fixed a newly introduced bug that caused 'ORDER BY ... LIMIT #' to
not return all rows.

-- 
Dan Nelson
[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




needing help with files

2002-11-20 Thread theapparatus

Greets:

I just have a quick question.  I've been setting up a
website using a MySQL database loaded with a large
number of articles but I'm having a problem.

Some of the articles did not load correctly into the
database.  Is there a method of loading a text (well,
in this case a *.html file) file directly into a field within
a column?

Any ideas?

Thanks,
Mike





-
Introducing NetZero Long Distance
1st month Free!
Sign up today at: www.netzerolongdistance.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: importing form a file (question)

2002-11-20 Thread John Coder
On Wed, 2002-11-20 at 18:19, Stick Dragon wrote:
 I had a free mysql database and admined with phpmyadmin. well i got a back 
 up from called backup.sql
 
 in side the file it looks like this
 
 # Table structure for table `phpbb_auth_access`
 #
 
 CREATE TABLE phpbb_auth_access (
   group_id mediumint(8) NOT NULL default '0',
   forum_id smallint(5) unsigned NOT NULL default '0',
 editied for space
   KEY forum_id (forum_id)
 ) TYPE=MyISAM;
 
 #
 # Dumping data for table `phpbb_auth_access`
 #
 
 INSERT INTO phpbb_auth_access VALUES (21,10,1,1,1,1,1,1,1,1,1,'','','');
 INSERT INTO phpbb_auth_access VALUES (4,9,1,1,1,1,1,1,1,1,1,'','','');
 editied for space
 INSERT INTO phpbb_auth_access VALUES (19,10,1,1,1,1,1,1,1,1,1,'','','');
 # 
 
 is there a way to run, and restore the database with this file. i dont have 
 phpmyadmin installed, didnt really like the prog and trying to learn mysql 
 through the console.

you can run this type of file through the console. at the mysql prompt
type:
\. file.sql

without the  of course.
look at the help blurb when you do a \h at the mysql prompt.


John Coder


-
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




store an image as BLOB

2002-11-20 Thread Fam. Tarniceru
 Hi,
 
 I would like to know how to store an image as a BLOB in MySQL. (from
 Delphi).
 
 Sincerely,
 
 Adrian Tarniceru




---
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus.
Xnet automatically scans all messages for viruses using RAV AntiVirus.


Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. 
Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti 
fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat de 
virusi.

Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. 
Please be aware that there is a risk involved whenever opening e-mail attachments to 
your computer and that MobiFon is not responsible for any damages caused by viruses.


-
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




  1   2   >