primary key

2001-03-31 Thread developer

how to use more than one field in a table as combined primary key.
e-mail= [EMAIL PROTECTED]



Strange idea?

2001-03-31 Thread Alexander Belyaev

Hello,
please let me know, if you are have some ideas about following:


--
mysql set @a='1';
Query OK, 0 rows affected (0.00 sec)


mysql select @a:=concat(@a,',',id) from message where id10 and id1;
+---+
| @a:=concat(@a,',',id) |
+---+
| 1,2   |
| 1,2,3 |
| 1,2,3,4   |
| 1,2,3,4,5 |
| 1,2,3,4,5,6   |
| 1,2,3,4,5,6,7 |
| 1,2,3,4,5,6,7,8   |
| 1,2,3,4,5,6,7,8,9 |
+---+
8 rows in set (0.01 sec)

mysql select id from message where id in(@a);
++
| id |
++
|  1 |
++
1 row in set (0.00 sec)

--

Alexander


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

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




primery key

2001-03-31 Thread deepak gupta

how to use more than one field as combined primary key
 emailk= [EMAIL PROTECTED]

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.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




MySQL 3.23.33: mysql_character_set_name function in libmysql.dll

2001-03-31 Thread mySQLDAC

Hello John,

We are developing the next version of MySQLDAC (MySQL Direct access
components for Delphi/C++ Builder).

We've found
const char * STDCALL mysql_character_set_name(MYSQL *mysql) in mysqlh.h

But we've not found this function in libmysql.dll (ver.3.23.33)

Is ther alternative ways to get information about DB's charset? Will
this function realisation appear in the next versions?

Thank you.
---
Best regards,
Edward Smirnov 
microOLAP Technologies LLC
mailto:[EMAIL PROTECTED]

Delphi/C++ Builder DB Connectivity components for:

mySQL  - http://www.microolap.com/mysqldac.htm
Sybase ASA - http://www.microolap.com/asadac.htm
Sybase ASE - http://www.microolap.com/asedac.htm



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

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: Before start of result set

2001-03-31 Thread Carlos Godoy

I obtain the next message error in the servlets where I have to modify the
content of the tables.
This error has appeared without changes in the servlets code.

Message:   Before start of result set
SQLState:  null
ErrorCode: 0

Does anybody know where is the problem?

Thanks.

Carlos Godoy


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

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: Symbolic Links to 'data' and 'form' files not resolving properly using mysql.

2001-03-31 Thread Sinisa Milivojevic

[EMAIL PROTECTED] writes:
  Description:
   I have installed MySQL version 3.23.36 (having previously used 3.23.34a)  After 
 I restarted the daemon,  I ran the mysql 'monitor' program to check on the existing 
 databases and tables.  Mysql reported for each table: "Didn't find any fields in 
 table 'table-name'".   This error had shown up in 3.23.34a for tables that had no 
 records (which, since we weren't using them, were removed, which resolved that 
 issue).  I thought that the tables may have become 'corrupt', so I used "mysql" to 
 recreate/reload the tables.  The 'index' files were created (and appeared to be 
 'filled'), but the 'data' files had only been 'created' when I recieved the error 
 "Can not locate file "/index/customer.MYD". "/index" is where the "customer.MYI" is 
 located (and pointed to by a symbolic link), while the data portion ("customer.MYD") 
 is in "/data" (pointed to by a symbolic link).  I would assume that a bug has been 
 introduced where the same value of the 'realpath' call for the 'index' portion of th!
e f!
  ile, is being re-used to locate the data portion (instead of another call to get the 
 'realpath' of the data portion).  
  
  How-To-Repeat:
   Create a table, and place the index portion (.MYI) in one directory, and the 
 'form' (.frm) and data portion (.MYD) in another.  Create 'symbolic' links to the 
 files from your "/var/databasename" directory, and restart "mysql".  Also, create the 
 'symbolic' links first (no existing table) pointing to the 2 different directories, 
 and try to use 'mysql  load_script' to create the actual files
  
  Fix:
   I have place all 3 parts of each table (.frm, .MYD, .MYI) in the same directory 
 for now (so I could use the latest version of the "mysql" engine) and redirected all 
 'symbolic' links to that area.
  
  Submitter-Id:   [EMAIL PROTECTED]
  Originator: root
  Organization:  YubbyDubby
  MySQL support: none
  Synopsis:   MySQL 3.23.36 not resolving 'realpath' to .MYD files.
  Severity:   serious
  Priority:   medium
  Category:   mysql
  Class:  sw-bug
  Release:mysql-3.23.36 (Source distribution)
  Server: lt-mysqladmin  Ver 8.18 Distrib 3.23.36, for pc-linux-gnu on i686
  Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
  This software comes with ABSOLUTELY NO WARRANTY. This is free software,
  and you are welcome to modify and redistribute it under the GPL license
  
  Server version   3.23.36
  Protocol version 10
  Connection   Localhost via UNIX socket
  UNIX socket  /tmp/mysql.sock
  Uptime:  16 hours 10 min 27 sec
  
  Threads: 1  Questions: 787  Slow queries: 0  Opens: 22  Flush tables: 1  Open 
 tables: 15 Queries per second avg: 0.014
  Environment:
   
  System: Linux uxdb1 2.2.17-14smp #1 SMP Mon Feb 5 18:40:03 EST 2001 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/i386-redhat-linux/egcs-2.91.66/specs
  gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
  Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
  LIBC: 
  lrwxrwxrwx1 root root   13 Sep 29  2000 /lib/libc.so.6 - 
 libc-2.1.3.so
  -rwxr-xr-x1 root root  4101836 Jan 15 07:49 /lib/libc-2.1.3.so
  -rw-r--r--1 root root 20273324 Jan 15 07:49 /usr/lib/libc.a
  -rw-r--r--1 root root  178 Jan 15 07:49 /usr/lib/libc.so
  Configure command: ./configure  --prefix=/usr/local/mysql --with-berkeley-db
  Perl: This is perl, version 5.005_03 built for i386-linux
  

Hi!

MySQL treatment of symbolic links in ALTER and REPAIR is documented in
our manual.


Regards,

Sinisa

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

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

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




Re: Error message: [Incorrect information in file: './ts1/tbl_status.frm']

2001-03-31 Thread Sinisa Milivojevic

Silvio Picano writes:
  Received the error again this morning;
  I was able to copy an older copy of .frm file into 
  tbl_status.frm (via Sinisa's response), and the problems 
  went away; all data appears to be intact. 
  
  [Largest *.MYD files is 186 mbytes  *.MYI is 32 mbytes.
  Note that all database directories  files reside on an 
  NFS automounted file-system, and not a local disk.]
  
  
  Then tried to reproduce the problem interactively.
  
mysql ALTER TABLE tbl_status RENAME tbl_status_bac;
Query OK, 0 rows affected (0.02 sec)
  
mysql ALTER TABLE tbl_status_bac RENAME tbl_status;   
ERROR 1033: Incorrect information in file: './ts1/tbl_status_bac.frm'
  
  
  Hmmm, so I restored the above .frm file again.
  Then shutdown the server:
$ ./bin/mysqladmin -u .. -p shutdown
  
  Tried to restart, and now cannot restart the server:
$ ./bin/safe_mysqld 
Starting mysqld daemon with databases from ...
010330 10:18:14  mysqld ended
  
$ less var/p
010330 10:18:14  mysqld started
010330 10:18:14  /fs5/b/spicano/dev/local/mysql/libexec/mysqld:
  Incorrect information in file: './mysql/host.frm'

010330 10:18:14  /fs5/b/spicano/dev/local/mysql/libexec/mysqld: Normal
  shutdown
010330 10:18:14  /fs5/b/spicano/dev/local/mysql/libexec/mysqld:
  Shutdown Complete
010330 10:18:14  mysqld ended
  
  
  Might the NFS dependence be a problem?
  
  Silvio
  


Yes, it could , particularly if you do not have --skip-locking as
mysqld startup or if some other processes access the files.


Regards,

Sinisa

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

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

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




Re: MySQL 3.23.33: mysql_character_set_name function in libmysql.dll

2001-03-31 Thread Sinisa Milivojevic

mySQLDAC writes:
  Hello John,
  
  We are developing the next version of MySQLDAC (MySQL Direct access
  components for Delphi/C++ Builder).
  
  We've found
  const char * STDCALL mysql_character_set_name(MYSQL *mysql) in mysqlh.h
  
  But we've not found this function in libmysql.dll (ver.3.23.33)
  
  Is ther alternative ways to get information about DB's charset? Will
  this function realisation appear in the next versions?
  
  Thank you.
  ---
  Best regards,
  Edward Smirnov 
  microOLAP Technologies LLC
  mailto:[EMAIL PROTECTED]
  
  Delphi/C++ Builder DB Connectivity components for:
  
  mySQL  - http://www.microolap.com/mysqldac.htm
  Sybase ASA - http://www.microolap.com/asadac.htm
  Sybase ASE - http://www.microolap.com/asedac.htm
  


Hi!

There is no such function in mysql.h.


Regards,

Sinisa

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

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

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




Re: Doubt

2001-03-31 Thread Sinisa Milivojevic

subba reddy pidugu writes:
  Hi !
  
  
  We have small doub't regarding your software,
  We are using WindowsNT operating system we are installed Mysql database after that. 
 we want how to create a databasae and create a user and how to  set the password 
 specified  user. please give answar as soon as possible,
  
  bye
  Thank You
  N.S.Reddy.Pidugu
  
  
  
  

Hi!

Download mysqlgui for your workstation and use grant and password
dialogues.


Regards,

Sinisa

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

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

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




Re[2]: MySQL 3.23.33: mysql_character_set_name function in libmysql.dll

2001-03-31 Thread Edward Smirnov

Hello Sinisa,

Saturday, March 31, 2001, 3:45:27 PM, you wrote:

SM There is no such function in mysql.h.

Small piece from mysql.h is below:
**
char * STDCALL mysql_error(MYSQL *mysql);
char * STDCALL mysql_info(MYSQL *mysql);
unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
const char * STDCALL mysql_character_set_name(MYSQL *mysql);
 ^^^
MYSQL * STDCALL mysql_init(MYSQL *mysql);
**

Moreover, this function is described in
manual_Clients.htm#mysql_character_set_name, Chapter 23.4.5 named
mysql_character_set_name.

Check it once more, please!

SM   const char * STDCALL mysql_character_set_name(MYSQL *mysql) in mysql.h
SM   
SM   But we've not found this function in libmysql.dll (ver.3.23.33)
SM   
SM   Is ther alternative ways to get information about DB's charset? Will
SM   this function realisation appear in the next versions?

---
Best regards,
Edward Smirnov 
microOLAP Technologies LLC
mailto:[EMAIL PROTECTED]

Delphi/C++ Builder DB Connectivity components for:

mySQL  - http://www.microolap.com/mysqldac.htm
Sybase ASA - http://www.microolap.com/asadac.htm
Sybase ASE - http://www.microolap.com/asedac.htm



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

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




Connection_from_Java

2001-03-31 Thread F P

Dear MySQL Team
first of all, excuse my English.  I’m from Argentina,
I’m a java developer and use MySQL database.
I connect to MySQL to Type4 Driver JDBC fron Java.
I have one machine with Mysql server in port 3306 and
another machine with an application in Java.
I want to know how to start a client, and also how to
write a URL to call a database?
Could you send me please an example to connect and use
databases with SSH.
I look forward to hearing from you soon.
Yours faithfully. 
e-mail:[EMAIL PROTECTED]
Name:Fernando A Perez
Address:12 de Abril 277
CP:3280
Provincia:Entre Rios
Pais:Argentina
Tel:054 03447 424385


_
Lo probaste?
Correo gratis y para toda la vida en http://correo.yahoo.com.ar

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

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]: MySQL 3.23.33: mysql_character_set_name function in libmysql.dll

2001-03-31 Thread Sinisa Milivojevic

Edward Smirnov writes:
  Hello Sinisa,
  
  Saturday, March 31, 2001, 3:45:27 PM, you wrote:
  
  SM There is no such function in mysql.h.
  
  Small piece from mysql.h is below:
  **
  char * STDCALL mysql_error(MYSQL *mysql);
  char * STDCALL mysql_info(MYSQL *mysql);
  unsigned long STDCALL mysql_thread_id(MYSQL *mysql);
  const char * STDCALL mysql_character_set_name(MYSQL *mysql);
   ^^^
  MYSQL * STDCALL mysql_init(MYSQL *mysql);
  **
  
  Moreover, this function is described in
  manual_Clients.htm#mysql_character_set_name, Chapter 23.4.5 named
  mysql_character_set_name.
  
  Check it once more, please!

Well, you are right, I have not read well function name first time.

Try to get latest Win32 client and check if it is there.

It is in libmysql.c, so it should be there. 

If it is not, well, just add it :

const char * STDCALL mysql_character_set_name(MYSQL *mysql)
{
  return mysql-charset-name;
}



Regards,

Sinisa

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

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

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




RE: MySQL++ Compile / link problems on freebsd

2001-03-31 Thread Sander Pilon



 Hi Sander!

 On Thu, Mar 29, 2001 at 02:11:02PM +0200, Sander Pilon wrote:


  I'm getting a whole lot of mysql++ link problems on freebsd :/
 
  Used gcc 2.95.3, latest mysql++
 
  The program links fine under linux  win32.
 
  Any idea's?
 
  [...]

 What version of FreeBSD are you currently using?  I am the
 maintainer of the
 FreeBSD port of MySQL++ and it compiles for me just fine.  I'm
 sure that you
 wasn't using our excellent Ports Collection when you got those awful error
 messages. ;)



FreeBSD 4.2, stable.

But I rewrote mysql++ (at least, the functionality I was using) so that the
same build compiled on linux, win32, and freebsd, ditched all the stream
stuff (but kept the cool query  operator), ditched all templates (still
can't figure out why they were needed :) and on top of that it shaved about
10 minutes of compile time from our application. (mysql++ is a beast)

(The windows port was, unfortunately, not entirely to our satisfaction
because the stream 'manipulators' (quote, escape) weren't working very well
for us.)

Anyway, I'll probably throw it online if anyone is interested in it - it
borrows its concepts and even a few lines of code from mysql++ so that's the
least I can do.

And oh... whoever thought of that
quote-as-define-to-enum-as-stream-manipulator-thingy is a total madman with
small bit of genious mixed in. Took me a while to figure that one out.

Regards,

-Sander


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

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++ Compile / link problems on freebsd

2001-03-31 Thread Sinisa Milivojevic

Sander Pilon writes:
  
  
  FreeBSD 4.2, stable.
  
  But I rewrote mysql++ (at least, the functionality I was using) so that the
  same build compiled on linux, win32, and freebsd, ditched all the stream
  stuff (but kept the cool query  operator), ditched all templates (still
  can't figure out why they were needed :) and on top of that it shaved about
  10 minutes of compile time from our application. (mysql++ is a beast)
  
  (The windows port was, unfortunately, not entirely to our satisfaction
  because the stream 'manipulators' (quote, escape) weren't working very well
  for us.)
  
  Anyway, I'll probably throw it online if anyone is interested in it - it
  borrows its concepts and even a few lines of code from mysql++ so that's the
  least I can do.
  
  And oh... whoever thought of that
  quote-as-define-to-enum-as-stream-manipulator-thingy is a total madman with
  small bit of genious mixed in. Took me a while to figure that one out.
  
  Regards,
  
  -Sander
  
  
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  
  


I truly do not see why you had to ditch things from MySQL as it works
just fine on Linux, FreeBSD, True64, Windows... with GNU, Compaq,
Borland and VC++ compiler. There is currently only one bug in 1.7.8,
for which I have sent fix to all that have hit it.

Integration of the versions for different compilers is on the
way. Borland version is integrated and is in the testing, while Compaq
integration is in process.

There was no need of stripping MySQL++ of it's features. Regarding the
above madman stuff, I take it as a compliment.


Regards,

Sinisa

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

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

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




Selecting 3 days worth of data with an offset of 5 days from now()

2001-03-31 Thread Stefen Lars

Hello all

I am looking for a way to return 3 days worth of data with an offset of five 
days (in the past) from today.

For example, say we had the following dates and today is 2001-03-31. First 
we do:

select name, datestamp from visitor_data order by datestamp desc;

and are returned with this list

namedatestamp

jon 2001-03-31
peter   2001-03-29
sam 2001-03-26
joe 2001-03-25
pete2001-03-25
zed 2001-03-25
chris   2001-03-24
paul2001-03-22
simon   2001-03-22

Now, I am looking for a way to return just the following data:

sam 2001-03-26
joe 2001-03-25
pete2001-03-25
zed 2001-03-25
chris   2001-03-24

How can this be done?

I would be really very grateful if someone could point me in the right 
direction or offer a link to a resource with some example of what I would 
like to do. I already looked in the manual and the example:

SELECT something FROM table WHERE TO_DAYS(NOW()) - TO_DAYS(date_field) = 
30;

is interesting, but is not really what I want to do.

If anyone can help me, I thank you whole-heartedly in advance.

S.



_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

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




RE: Connection_from_Java

2001-03-31 Thread M a x i m i l i a n o L u c i u s

Fernando,

Te sugiero que veas la pgina http://mmmysql.sourceforge.net/ por un JDBC y
en su docs vas a encontrar ejemplos de como resolver tu problema.
Si necesitas mayo ayuda, no tengo problema en enviarte porciones de cdigo
donde se resulve este problema.

Maximiliano.
- Original Message -
From: F P [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 31, 2001 9:09 AM
Subject: Connection_from_Java


 Dear MySQL Team
 first of all, excuse my English.  I'm from Argentina,
 I'm a java developer and use MySQL database.
 I connect to MySQL to Type4 Driver JDBC fron Java.
 I have one machine with Mysql server in port 3306 and
 another machine with an application in Java.
 I want to know how to start a client, and also how to
 write a URL to call a database?
 Could you send me please an example to connect and use
 databases with SSH.
 I look forward to hearing from you soon.
 Yours faithfully.
 e-mail:[EMAIL PROTECTED]
 Name:Fernando A Perez
 Address:12 de Abril 277
 CP:3280
 Provincia:Entre Rios
 Pais:Argentina
 Tel:054 03447 424385


 _
 Lo probaste?
 Correo gratis y para toda la vida en http://correo.yahoo.com.ar

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

 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: Selecting 3 days worth of data with an offset of 5 days from now()

2001-03-31 Thread Gary Huntress

Try this:

select * from visitor where
 datestamp between
 date_sub(now(), interval 5 day) and
 date_sub(now(), interval 2 day)
 order by datestamp desc;

Regards,

Gary "SuperID" Huntress

===
FreeSQL.org offering free database hosting to developers
Visit http://superid.dyndns.org:8080/freesql/index.php

- Original Message -
From: "Stefen Lars" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 31, 2001 1:31 PM
Subject: Selecting 3 days worth of data with an offset of 5 days from now()


 Hello all

 I am looking for a way to return 3 days worth of data with an offset of
five
 days (in the past) from today.

 For example, say we had the following dates and today is 2001-03-31. First
 we do:

 select name, datestamp from visitor_data order by datestamp desc;

 and are returned with this list

 name datestamp

 jon 2001-03-31
 peter 2001-03-29
 sam 2001-03-26
 joe 2001-03-25
 pete 2001-03-25
 zed 2001-03-25
 chris 2001-03-24
 paul 2001-03-22
 simon 2001-03-22

 Now, I am looking for a way to return just the following data:

 sam 2001-03-26
 joe 2001-03-25
 pete 2001-03-25
 zed 2001-03-25
 chris 2001-03-24

 How can this be done?

 I would be really very grateful if someone could point me in the right
 direction or offer a link to a resource with some example of what I would
 like to do. I already looked in the manual and the example:

 SELECT something FROM table WHERE TO_DAYS(NOW()) - TO_DAYS(date_field) =
 30;

 is interesting, but is not really what I want to do.

 If anyone can help me, I thank you whole-heartedly in advance.

 S.



 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

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



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

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




Please patch mysqld.cc for Darwin/OS X

2001-03-31 Thread Michael Widenius


Hi!

 "Scott" == Scott Ellsworth [EMAIL PROTECTED] writes:

Scott When compiling .36 under OS X release, the following error occurs:
Scott c++ -DMYSQL_SERVER  
Scott -DDEFAULT_MYSQL_HOME="\"/usr/local/mysql\"" 
Scott -DDATADIR="\"/usr/local/mysql/var\""-DSHAREDIR="\"/usr/local/mysql/share/mysql\
Scott ""-DHAVE_CONFIG_H -I../bdb/build_unix 
Scott -I../innobase/include   -I./../include   
Scott -I./../regex-I. -I../include -I.. -I.-O3 
Scott -DDBUG_OFF -O3 -fomit-frame-pointer  -fno-implicit-templates 
Scott -traditional-cpp -DHAVE_DARWIN_THREADS -traditional-cpp 
Scott -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -c mysqld.cc
Scott mysqld.cc: In function `void init_signals()':
Scott mysqld.cc:1241: assignment to `void (*)(int)' from `void (*)()'
Scott make[3]: *** [mysqld.o] Error 1
Scott make[2]: *** [all-recursive] Error 1
Scott make[1]: *** [all-recursive] Error 1
Scott make: *** [all-recursive-am] Error 2

Scott This is fixable by removing the #ifdef DARWIN_THREADS protection, near 
Scott line 1241 and just using the
Scott  sa.sa_handler=handle_segfault;
Scott code in all cases.  This appears to have been a Darwin 1.2 to 1.3 
Scott change, though I have only recently been following it.

Scott (This does appear to have been a bad cast, and thus the change is a good 
Scott one.)

cut

Fixed. Thanks!

Regards,
Monty

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

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: Selecting 3 days worth of data with an offset of 5 days from now()

2001-03-31 Thread Stefen Lars

Hello Gary

Thank you for your timely response, however MySQL server version 3.21.33b 
responded:

ERROR 1064: parse error near '(now(), interval 5 day) and
date_sub(now(), interval 2 day)
order by datestamp d' at line 2

:-((

when I entered exactly what you suggested. What am I doing wrong?

S.


From: "Gary Huntress" [EMAIL PROTECTED]
To: "Stefen Lars" [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: Selecting 3 days worth of data with an offset of 5 days from 
now()
Date: Sat, 31 Mar 2001 09:04:48 -0500

Try this:

select * from visitor where
  datestamp between
  date_sub(now(), interval 5 day) and
  date_sub(now(), interval 2 day)
  order by datestamp desc;

Regards,

Gary "SuperID" Huntress

===
FreeSQL.org offering free database hosting to developers
Visit http://superid.dyndns.org:8080/freesql/index.php

- Original Message -
From: "Stefen Lars" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 31, 2001 1:31 PM
Subject: Selecting 3 days worth of data with an offset of 5 days from now()


  Hello all
 
  I am looking for a way to return 3 days worth of data with an offset of
five
  days (in the past) from today.
 
  For example, say we had the following dates and today is 2001-03-31. 
First
  we do:
 
  select name, datestamp from visitor_data order by datestamp desc;
 
  and are returned with this list
 
  name datestamp
 
  jon 2001-03-31
  peter 2001-03-29
  sam 2001-03-26
  joe 2001-03-25
  pete 2001-03-25
  zed 2001-03-25
  chris 2001-03-24
  paul 2001-03-22
  simon 2001-03-22
 
  Now, I am looking for a way to return just the following data:
 
  sam 2001-03-26
  joe 2001-03-25
  pete 2001-03-25
  zed 2001-03-25
  chris 2001-03-24
 
  How can this be done?
 
  I would be really very grateful if someone could point me in the right
  direction or offer a link to a resource with some example of what I 
would
  like to do. I already looked in the manual and the example:
 
  SELECT something FROM table WHERE TO_DAYS(NOW()) - TO_DAYS(date_field) 
=
  30;
 
  is interesting, but is not really what I want to do.
 
  If anyone can help me, I thank you whole-heartedly in advance.
 
  S.
 
 
 
  
_
  Get Your Private, Free E-mail from MSN Hotmail at 
http://www.hotmail.com.
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

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




Re: Selecting 3 days worth of data with an offset of 5 days from now()

2001-03-31 Thread Gary Huntress

Yes, the problem is the version that you are using.  The date_add and
date_sub functions are new in mysql 3.22.  How painful would it be for you
to upgrade to the current version?

Given the amount of development since version 3.21, it might be advisable to
go to 3.23.

Regards,

Gary "SuperID" Huntress

===
FreeSQL.org offering free database hosting to developers
Visit http://superid.dyndns.org:8080/freesql/index.php


- Original Message -
From: "Stefen Lars" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Saturday, March 31, 2001 2:25 PM
Subject: Re: Selecting 3 days worth of data with an offset of 5 days from
now()


 Hello Gary

 Thank you for your timely response, however MySQL server version 3.21.33b
 responded:

 ERROR 1064: parse error near '(now(), interval 5 day) and
 date_sub(now(), interval 2 day)
 order by datestamp d' at line 2

 :-((

 when I entered exactly what you suggested. What am I doing wrong?

 S.


 From: "Gary Huntress" [EMAIL PROTECTED]
 To: "Stefen Lars" [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: Selecting 3 days worth of data with an offset of 5 days from
 now()
 Date: Sat, 31 Mar 2001 09:04:48 -0500
 
 Try this:
 
 select * from visitor where
   datestamp between
   date_sub(now(), interval 5 day) and
   date_sub(now(), interval 2 day)
   order by datestamp desc;
 
 Regards,
 
 Gary "SuperID" Huntress
 
 ===
 FreeSQL.org offering free database hosting to developers
 Visit http://superid.dyndns.org:8080/freesql/index.php
 
 - Original Message -
 From: "Stefen Lars" [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, March 31, 2001 1:31 PM
 Subject: Selecting 3 days worth of data with an offset of 5 days from
now()
 
 
   Hello all
  
   I am looking for a way to return 3 days worth of data with an offset
of
 five
   days (in the past) from today.
  
   For example, say we had the following dates and today is 2001-03-31.
 First
   we do:
  
   select name, datestamp from visitor_data order by datestamp desc;
  
   and are returned with this list
  
   name datestamp
  
   jon 2001-03-31
   peter 2001-03-29
   sam 2001-03-26
   joe 2001-03-25
   pete 2001-03-25
   zed 2001-03-25
   chris 2001-03-24
   paul 2001-03-22
   simon 2001-03-22
  
   Now, I am looking for a way to return just the following data:
  
   sam 2001-03-26
   joe 2001-03-25
   pete 2001-03-25
   zed 2001-03-25
   chris 2001-03-24
  
   How can this be done?
  
   I would be really very grateful if someone could point me in the right
   direction or offer a link to a resource with some example of what I
 would
   like to do. I already looked in the manual and the example:
  
   SELECT something FROM table WHERE TO_DAYS(NOW()) - TO_DAYS(date_field)
 =
   30;
  
   is interesting, but is not really what I want to do.
  
   If anyone can help me, I thank you whole-heartedly in advance.
  
   S.
  
  
  
  
 _
   Get Your Private, Free E-mail from MSN Hotmail at
 http://www.hotmail.com.
  
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   To request this thread, e-mail [EMAIL PROTECTED]
   To unsubscribe, e-mail
 [EMAIL PROTECTED]
   Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  
 

 _
 Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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

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



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

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




Sorting and Ordering

2001-03-31 Thread Scott Bowling

Hello all,

I'm stumped with the following issue and I don't know how to resolve it (I
think that sentence is just rhetoric)


I have the following SQL Statement and results:

mysql SELECT   MAST.CODE
- ,MAST.ADVRT_NBR
- ,MAST.ADVRT_ID
- ,TAB.PACK_INC
- ,TAB.SIZE
- ,TAB.QUEUE
-   FROM   ADVRT_MAST AS MAST
- INNER JOIN  LEVEL_3 AS TAB
- ON  TAB.ADVRT_NBR = MAST.ADVRT_NBR
-AND  TAB.ADVRT_ID  = MAST.ADVRT_ID
-  WHERE  MAST.TYPE = 'S'
-AND  MAST.ADVRT_STATUS = 'A';
++---+--+--+--+---+
| CODE   | ADVRT_NBR | ADVRT_ID | PACK_INC | SIZE | QUEUE |
++---+--+--+--+---+
| INSERT LATER CODE FOR 1| 1 |2 |1 |   60 | 2 |
| INSERT LATER CODE FOR 2| 10001 |2 |1 |  100 | 3 |
| INSERT LATER CODE FOR 2| 10001 |2 |2 |  100 |12 |
++---+--+--+--+---+
3 rows in set (0.05 sec)

The keys are ADVRT_NBR, ADVRT_ID,PACK_INC.

I'm trying to find the maximum QUEUE value and use the keys for further
processing.  This is the statement that I developed:


mysql SELECT   MAST.CODE
- ,MAST.ADVRT_NBR
- ,MAST.ADVRT_ID
- ,TAB.PACK_INC
- ,TAB.SIZE
- ,MAX(TAB.QUEUE) AS MAX
-   FROM   ADVRT_MAST AS MAST
- INNER JOIN  LEVEL_3 AS TAB
- ON  TAB.ADVRT_NBR = MAST.ADVRT_NBR
-AND  TAB.ADVRT_ID  = MAST.ADVRT_ID
-  WHERE  MAST.TYPE = 'S'
-AND  MAST.ADVRT_STATUS = 'A'
-   GROUP BY   MAST.ADVRT_NBR
- ,MAST.ADVRT_ID
-   ORDER BY  MAX DESC;

++---+--+--+--+--+
| CODE   | ADVRT_NBR | ADVRT_ID | PACK_INC | SIZE | MAX  |
++---+--+--+--+--+
| INSERT LATER CODE FOR 2| 10001 |2 |1 |  100 |   12 |
| INSERT LATER CODE FOR 1| 1 |2 |1 |   60 |2 |
++---+--+--+--+--+

The results set is incorrect because the PACK_INC is not correct (well,
according to my expected results), it should be a "2" and not a "1" for the
maximum queue value.  I understand that I am grouping by the first two keys
(ADVRT_NBR,ADVRT_ID) but how do I get the correct PACK_INC based off of the
maximum QUEUE?

Another item is that I AM still interested in the next highest QUEUE
value


Any help would be greatly appreciated...
Scott


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

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 not freeing memory

2001-03-31 Thread Benjamin Pflugmann

Hello.

As I said in my last mail, you can tell MySQL how much memory to use.

On Fri, Mar 30, 2001 at 03:44:14PM +0100, [EMAIL PROTECTED] wrote:
 At 18:52 29/03/01 +0200, you wrote:
 
 Hello again!
 
 Sorry but didn't see your other comments on first reading.
 
 I thought that the key cache meant that mysqld would only hold
 key/indexes in memory and that the data the indexs point to would
 still be read/written from disk.

Yes.

 It's just that it seems to me that mysqld allocates memory for the
 indexes and the data they point to, to enable the data set to be
 retrieved.

Correct.

 And that when an additional table is 
 used by a client,  the server's memory manager allocates additional memory 
 to cope with new  query rather than using the memory that it has already 
 grabbed.

Correct. As long as it hasn't reached the specified limit.

 I can't belive that it should work this way because mysqld would would 
 allways eat up memory to the sum of all the data of all the tables used. 

It wouldn't because there is a limit, which you should to a reasonable
value.

 The only way I have found of forcing mysqld to deallocate memory is
 to drop one of the tables previously used in a select statement -
 not much use!  I have read 90% of MySQL by Paul DuBois and can't
 find an answer!? Any ideas?  cheers

Have a look at the output of "mysqladmin variables", especially
key_buffer_size (I think it's named so).

 Shaun.
 
 i'm using:-
 mysql version 3.23.33
 Linux Box - kernel 2.4 (swap disabled)
 
[...]
 
 Yes. MySQL has a key cache (and some other caches) which are used to
 optimize speed. You can specify the size of the caches on start-up.
 

Bye,

Benjamin.

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

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




Re: Can't recover a bad corrupeted table...

2001-03-31 Thread Bob Hall

Let me see if I understand you correctly. You created a new table 
(CREATE TABLE?) and you imported data from a file that had nothing to 
do with MySQL (comma or tab delimited file?), and therefore couldn't 
be affected by whatever crashed your server. And this brand new table 
with pristine data was corrupted?

I have limited experience maintaining MySQL databases on Linux, and I 
have very limited knowledge of the internal workings of MySQL. The 
only thing that I know of that you haven't mentioned trying is 
recreating the table description file from backup. However, if CREATE 
TABLE statements are creating corrupted tables, then I believe that 
the server itself is corrupted. If I were in your shoes, I would 
reinstall, after backing up everything short of the refrigerator. 
Perhaps someone else can give you better advice.

Bob Hall

I tried -r
I tried -o
I tried to truncate the table and re-build the index from scratch.
I tried to create ex-novo a table, import data from scratch and it 
result in a corrupted table.

None of these seems to work

Bob Hall wrote:

Sir, I looked quickly through the mass of data supplied below, and 
it looks like you only tried m



  with the -r -q option combination. Try it with just -r. If that 
doesn't work, try it with -o. If that doesn't work, restore from 
backup.

Got backup?

Bob Hall

Antonio gulli wrote:

   Any help is appreciated
  
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 158 to server version: 3.23.36-log
  
   myisamchk  -V
   myisamchk  Ver 1.45 for pc-linux-gnu at i686
  
   a) Trying a recovery.
  
   myisamchk -r -q -Osort_key_blocks=16 keywords
   - check key delete-chain
   - check record delete-chain
   - recovering (with keycache) MyISAM-table 'keywords.MYI'
   Data records: 2062985
   7000
   [root@ideare queries]# myisamchk -r -q -Osort_key_blocks=16
   -Okey_buffer_size=256M -Oread_buffer_size=256M -Osort_buffer_size=256M
   keywords
   - check key delete-chain
   - check record delete-chain
   - recovering (with keycache) MyISAM-table 'keywords.MYI'
   Data records: 2062985
  
   -
  
   - check key delete-chain
   - check record delete-chain
   - recovering (with keycache) MyISAM-table 'keywords.MYI'
   Data records: 2062985
  
   b) Trying a check 
  
   Database changed
   mysql CHECK TABLE keywords;
   
+--+---+--+--- 
-+|
   Table| Op| Msg_type |
   Msg_text
   
|+--+---+--+-- 
--+|
   keywords | check | error| Key in wrong position at page
   24942592 || queries.keywords | check | error|
   Corrupt
   
|+--+---+--+-- 
--+2
   rows in set (10.12 sec)
  
   yisamchk -a -Osort_key_blocks=16 -Okey_buffer_size=256M
   -Oread_buffer_size=256M -Osort_buffer_size=256M keywords
   \Checking MyISAM file: keywords
   Data records: 2062985   Deleted blocks:   0
   myisamchk: warning: Table is marked as crashed
   - check file-size
   - check key delete-chain
   - check record delete-chain
   - check index reference
   - check data record references index: 1
   - check data record references index: 2
   - check data record references index: 3
   myisamchk: error: Key in wrong position at page 24942592
   - check record links
   myisamchk: error: Keypointers and record positions doesn't match
   MyISAM-table 'keywords' is corrupted
  
   3) Describe this table ...
  
myisamchk -dvv keywords
  
   MyISAM file: keywords
   Record format:   Packed
   Character set:   latin1 (8)
   File-version:1
   Creation time:   2001-03-28 10:02:22
   Recover time:2001-03-29 11:01:02
   Status:  crashed
   Data records:  2062985  Deleted blocks: 0
   Datafile parts:2062985  Deleted data:   0
   Datafile pointer (bytes):4  Keyfile pointer (bytes):4
   Datafile length:  79274620  Keyfile length:  99454976
   Max datafile length:4294967294  Max keyfile length: 4398046510079
   Recordlength:  281
  
   table description:
   Key Start Len Index   Type Rec/key Root
   Blocksize
   1   5 254 fulltext varchar packed 0
   26022912   2048
   1 4   float  0
   2   266   16  multip. char packed stripped NULL  0
   56983552   1024
   3   2 255 multip. char packed stripped NULL  0
   30499840   2048
  
   Field Start Length Nullpos Nullbit Type
   1 1 1
   2 2 2551   1   no endspace
   3 257   4  1   2   no zeros
   4 261   2  1   4   no zeros
   5 263   3  1   8   no zeros
   6 266   16 1   16  no endspace
  
   4) Re-check it 

A complete newbie here (long post)

2001-03-31 Thread Tatti

I have spent the past 24 hours trying to install and configure MySql on my account at 
my ISP. Every try failes.

I have three different instructions and none works. 

Installing is no problem. What I can't do is change password to one I want or even run 
the server without changing the dafault password. I cant even log in with default pwd.

Below is a cutpaste of a mailings between me and someone who tried helping me. See if 
you can figure it out.

 start MySql:
 bin/safe_mysqld 
 
Gave the following result:
bin/mysqld: Fatal error: Can't find messagefile 
'/usr/local/mysql/share/mysql/english/errmsg.sys

 
 bin/mysql
 
Same error message as above

Later:
 bin/mysql
 
And that gave:
ERROR 1045: Access denied for user 'stage1@localhost' (Using Password: NO)

Yet later:
 start MySql:
 bin/safe_mysqld 
 
Now I got:
Starting mysql daemon with databases from /home/stage1/.www/mysql-x.xx.xxetcetcetc/data
rm: cannot unlink '/tmp/mysql.sock':operation not permitted
010331 13:57:50 mysqld ended

Full instructions I got from my friend was the following:
As root, untar into /usr/local:

tar xvfz mysql-xx.xx.xx.tar.gz

create a symlink to a mysql directory:
ln -s mysql-xx.xx.xx mysql

cd to mysql and prep the database:
cd mysql
scripts/mysql_install_db

start MySql:
bin/safe_mysqld 

now connect to it:

bin/mysql

(no parameters!)

And you're there.

Well, I followed his instructions and they worked as far as what I pasted above.

My plan is to phpnuke the entire site and therefore I need the MySQL. To add to it all 
I have absolutely no knowledge of either Linux or Unix. But I intend to learn.

Thanks in advance for any help I get.

Cheers
Tatti



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

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: linux innobase benchmarking and BSD problem

2001-03-31 Thread Heikki Tuuri

Thank you Dan!

I do not have access to a FreeBSD computer during this weekend but
your stack prints already tell the origin of the problem.

I have implemented my own mutexes in the purpose that I can use
an assembler instruction for the atomic test-and-set operation
needed in a mutex. But for now I have done the test-and-set
with pthread_mutex_trylock: it provides an atomic operation
on an OS mutex which I can use in place of test-and-set.

It seems that if a thread does not acquire a mutex with the
first try, then something goes wrong and the thread is left in a loop.
The stack prints show that FreeBSD uses a spin wait also in the
case a trylock fails. This may be associated with the problem.
More logical would be that FreeBSD would return with a failure
code if trylock fails.

A fix would be to replace pthread_mutex_trylock with
the XCHG instruction to implement test-and-set. But that would not
work on non-Intel FreeBSD platforms.

I will dig into the FreeBSD documentation and try to find a
solution from there.

Best regards,

Heikki

At 03:52 PM 3/30/01 -0600, you wrote:
In the last episode (Mar 30), Heikki Tuuri said:
 The FreeBSD bug is known. I will run tests on our FreeBSD machine in
 the next few days. Obviously there is something wrong with the
 FreeBSD port. Was it so that it hung and used 100 % of CPU? That has
 been reported also from Italy.

I have a similar problem, on FreeBSD 5 (i.e. -current).  I can insert
records one at a time with no problem, but if I try to update more than
~250 records at a time, it hangs, consuming 100% cpu.  gdb'ing a corefile of
the process, it looks like a mutex/spinlock problem of some sort. 
Deleting records dies if I delete between 100 and 150 records in one
go.  Does innobase create a mutex for each record processed?  Maybe
there's a limit on 256 held mutices per thread on FreeBSD or something.

-- mysqld hung on "insert into temp (value) select ip from iptable limit 300":
(gdb) thread apply all bt

Thread 1 (process 764):
#0  0x28288163 in _get_curthread ()
at /usr/src/lib/libc_r/uthread/uthread_kern.c:1145
#1  0x28280064 in _spinlock_debug (lck=0xbfaa9ecc, 
fname=0x28280138
"\203”€\020\205””\017\2055\213\205–\213U\b\211B\004\213E\f\
211B\b\213E\020\211B\f\215‘•–[^_\211ˆž]”œ$FreeBSD:
src/lib/libc_r/arch/i386/_atomic_lock.S,v 1.3 1999/08/28 00:03:01 peter Exp
$", lineno=149551536)
at /usr/src/lib/libc_r/uthread/uthread_spinlock.c:83
#2  0x282854d6 in mutex_trylock_common (mutex=0xbfaa9ecc)
at /usr/src/lib/libc_r/uthread/uthread_mutex.c:311
#3  0x28285712 in __pthread_mutex_trylock (mutex=0x8ea3090)
at /usr/src/lib/libc_r/uthread/uthread_mutex.c:441
#4  0x8193d4b in mutex_spin_wait (mutex=0x8ea308c) at ../include/os0sync.ic:38
#5  0x8126ead in srv_master_thread (arg=0x0) at ../include/sync0sync.ic:220
#6  0x2827f18c in _thread_start ()
at /usr/src/lib/libc_r/uthread/uthread_create.c:326
#7  0x0 in ?? ()
(gdb) 


-- mysqld hung on "delete from temp limit 150":
(gdb) info threads;
* 1 process 26111  0x28361b54 in gettimeofday () from /usr/lib/libc.so.5
(gdb) where
#0  0x28361b54 in gettimeofday () from /usr/lib/libc.so.5
#1  0x28280949 in _thread_sig_handler (sig=0, info=0x828a660, ucp=0x282808d1)
at /usr/src/lib/libc_r/uthread/uthread_sig.c:93
#2  0xbfbfffac in ?? ()
#3  0x28287ffb in _thread_kern_sig_defer ()
at /usr/src/lib/libc_r/uthread/uthread_kern.c:1049
#4  0x282854bf in mutex_trylock_common (mutex=0x0)
at /usr/src/lib/libc_r/uthread/uthread_mutex.c:308
#5  0x28285712 in __pthread_mutex_trylock (mutex=0x8ea3210)
at /usr/src/lib/libc_r/uthread/uthread_mutex.c:441
#6  0x8193d4b in mutex_spin_wait (mutex=0x8ea320c) at ../include/os0sync.ic:38
#7  0x8165a84 in buf_page_get_gen (space=0, offset=6, rw_latch=2, guess=0x0,
mode=10, mtr=0xbfaa95d0) at ../include/sync0sync.ic:220
#8  0x81576d9 in trx_purge_truncate_rseg_history (rseg=0x8ebd10c,
limit_trx_no={high = 0, low = 7946}, limit_undo_no={high = 0, low = 0})
at ../include/trx0rseg.ic:25
#9  0x8157bdd in trx_purge_truncate_history () at trx0purge.c:545
#10 0x81589c7 in trx_purge_fetch_next_rec (roll_ptr=0xbfaa9ee4,
cell=0x8ec016c, heap=0x8ebfe0c) at trx0purge.c:564
#11 0x813a2b6 in row_purge (node=0x8ec0134, thr=0x8ec00d4) at row0purge.c:481
#12 0x813a4fe in row_purge_step (thr=0x8ec00d4) at row0purge.c:548
#13 0x8129aa2 in que_run_threads (thr=0x8ec00d4) at que0que.c:1223
#14 0x8158f95 in trx_purge () at trx0purge.c:1050
#15 0x8126fb5 in srv_master_thread (arg=0x0) at srv0srv.c:1901
#16 0x2827f18c in _thread_start ()
at /usr/src/lib/libc_r/uthread/uthread_create.c:326
#17 0x0 in ?? ()
(gdb)


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

Re: CVS does not work!

2001-03-31 Thread John Dean

Hi
Since the cvs is hosted on sourceforge, I think you should direct your 
comments to them. We have no control over the sourceforge cvs server.

On Saturday 31 March 2001 16:40, Matthias Brunner wrote:
 Hello!

 As I tried to get the latest mysql version through CVS I encountered the
 following error:

 mb@:~  cvs
 -d:pserver:[EMAIL PROTECTED]:/cvsroot/mysql login
 (Logging in to [EMAIL PROTECTED])
 CVS password:
 mb@:~  cvs -z3
 -d:pserver:[EMAIL PROTECTED]:/cvsroot/mysql co
 mysql-4.0
 cvs server: Updating mysql-4.0
 cvs [server aborted]: cannot stat /home/cvs/locks-master: No such file
 or directory
 cvs [server aborted]: cannot stat /home/cvs/locks-master: No such file
 or directory


 Am I doing anything wrong? Is there a alternative CVS server? Or do I
 have to wait for "official" snapshots?

 Best regards!

-- 
Regards
John

MySQL Development Team 
   __  ___  __   __
  /  |/  /_ __/ __/ __ \/ /   John Dean [EMAIL PROTECTED] 
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/ 
/_/  /_/\_, /___/\___\_\/ Mansfield, England, UK 
   ___/ 

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

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




Re: Can't recover a bad corrupeted table...

2001-03-31 Thread Antonio Gulli

Hello Bob, first at all thank you for your support.

Bob Hall wrote:

 Let me see if I understand you correctly. You created a new table 
 (CREATE TABLE?) and you imported data from a file that had nothing to 
 do with MySQL (comma or tab delimited file?), and therefore couldn't 
 be affected by whatever crashed your server. And this brand new table 
 with pristine data was corrupted?

Yep this is whats happen. I first i got a corrupted table, i tried to 
repair the table following all known
strategies... then i create a table from scratch and use a perl program 
for importing data, but at the end
i got a corrupted table and no way to rapair it. This is the schema:

1)
use queries
drop table keywords;
create table keywords (querystring varchar(255), numref int(11), 
multiword smallin
t(6), date date, origine varchar(16));
create FULLTEXT INDEX qfindex ON keywords(querystring);
create INDEX qindex ON keywords(querystring);
create INDEX orindex ON keywords(origine);

2) Importing data with perl program

3) Corrupted table

 
 I have limited experience maintaining MySQL databases on Linux, and I 
 have very limited knowledge of the internal workings of MySQL. The 
 only thing that I know of that you haven't mentioned trying is 
 recreating the table description file from backup. However, if CREATE 
 TABLE statements are creating corrupted tables, then I believe that 
 the server itself is corrupted. If I were in your shoes, I would 
 reinstall, after backing up everything short of the refrigerator. 
 Perhaps someone else can give you better advice.

The strange thing is that this is a production server used by a lot of 
programs and they works.
Now i'm tring to use ISAM (instead of MYISAM) table with such schema:

use queries
drop table keywords;
create table keywords (querystring varchar(255) NOT NULL, numref 
int(11), multiwor
d smallint(6), date date, origine varchar(16) NOT NULL) TYPE = ISAM;
create INDEX qindex ON keywords(querystring);
create INDEX orindex ON keywords(origine);

I don't know if this work at the moment it is importing...

Notice a strange thing, ISAM ask for not null definition of indexed 
fields, MYISAM not .. why ?

 
 Bob Hall
 
 I tried -r
 I tried -o
 I tried to truncate the table and re-build the index from scratch.
 I tried to create ex-novo a table, import data from scratch and it 
 result in a corrupted table.
 
 None of these seems to work
 
 Bob Hall wrote:
 
 Sir, I looked quickly through the mass of data supplied below, and 
 it looks like you only tried m
 
 
 
 
  with the -r -q option combination. Try it with just -r. If that 
 doesn't work, try it with -o. If that doesn't work, restore from 
 backup.
 
 Got backup?
 
 Bob Hall
 
 Antonio gulli wrote:
 
   Any help is appreciated
  
   Welcome to the MySQL monitor.  Commands end with ; or \g.
   Your MySQL connection id is 158 to server version: 3.23.36-log
  
   myisamchk  -V
   myisamchk  Ver 1.45 for pc-linux-gnu at i686
  
   a) Trying a recovery.
  
   myisamchk -r -q -Osort_key_blocks=16 keywords
   - check key delete-chain
   - check record delete-chain
   - recovering (with keycache) MyISAM-table 'keywords.MYI'
   Data records: 2062985
   7000
   [root@ideare queries]# myisamchk -r -q -Osort_key_blocks=16
   -Okey_buffer_size=256M -Oread_buffer_size=256M 
 -Osort_buffer_size=256M
   keywords
   - check key delete-chain
   - check record delete-chain
   - recovering (with keycache) MyISAM-table 'keywords.MYI'
   Data records: 2062985
  
   -
  
   - check key delete-chain
   - check record delete-chain
   - recovering (with keycache) MyISAM-table 'keywords.MYI'
   Data records: 2062985
  
   b) Trying a check 
  
   Database changed
   mysql CHECK TABLE keywords;
   
 +--+---+--+--- 
 -+|
   Table| Op| Msg_type |
   Msg_text
   
 |+--+---+--+-- 
 --+|
   keywords | check | error| Key in wrong position at page
   24942592 || queries.keywords | check | error|
   Corrupt
   
 |+--+---+--+-- 
 --+2
   rows in set (10.12 sec)
  
   yisamchk -a -Osort_key_blocks=16 -Okey_buffer_size=256M
   -Oread_buffer_size=256M -Osort_buffer_size=256M keywords
   \Checking MyISAM file: keywords
   Data records: 2062985   Deleted blocks:   0
   myisamchk: warning: Table is marked as crashed
   - check file-size
   - check key delete-chain
   - check record delete-chain
   - check index reference
   - check data record references index: 1
   - check data record references index: 2
   - check data record references index: 3
   myisamchk: error: Key in wrong position at page 24942592
   - check record links
   myisamchk: error: Keypointers and record positions doesn't match
   MyISAM-table 'keywords' is corrupted
  
   3) Describe this table ...
  
myisamchk -dvv keywords
  
   MyISAM file:

how to copy the mysql bin and data dir to another machine and make it work without the lib files?..

2001-03-31 Thread jagadeesh

hi
 i have installed mysql binary distribution and the perl modules DBI,mysql modules on 
one machine and want to copy the data and the bin directory ,  to onother machine and 
make it work in that machine ,without copying the lib directory , is it possible

if yes , how do i do it ..

thanks 

very eagerly waiting for a clue

bye
jagadeesh

_
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.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




Last_Insert_ID ()

2001-03-31 Thread P.V. Sajan

Helllo All !!

I 've a problem i want to retrieve the primary key value of the last
Inserted record in a table and use it in another table.
My Table is
TRANS
( transID int not null auto_increment primary key,
.

...
..
)
Ordertable
(OrderID int not null auto_increment primary key,
transID int  = this represents the last inserted record's primary key
.
...
...
..
) ;

I did
select Last_Insert_Id () from trans ;
| last_insert_id() |
+--+
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
|   18 |
+--+
19 rows in set (0.05 sec)
how is that 18 times but 19 rows ???
Next i did select Last_Insert_Id (transid) from trans ;
result
| last_Insert_Id(transId) |
+-+
|   1 |
|   2 |
|   3 |
|   4 |
|   5 |
|   6 |
|   7 |
|   8 |
|   9 |
|  10 |
|  11 |
|  12 |
|  13 |
|  14 |
|  15 |
|  16 |
|  17 |
|  18 |
|  19 |
+-+
19 rows in set (0.00 sec)

Surely it beats me , Could anyone explain this
I just want to retrieve a single value  that's 19
or should i do a   select  count(*) from trans to get that value 
Any help will be greatly appreciated
Best Regards
Sajan





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

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




Re: Need examples of companies using mysql

2001-03-31 Thread Jim Gillaspy @ bellsouth.net

I use MySQL for my personal web site, but as the Director of Information
Systems (I suppose I am one of those higher ups) I can't imagine using MySQL
for mission critical applications until it has transaction support (commit
and rollback).
Jim Gillaspy
- Original Message -
From: "Jason Maderios" [EMAIL PROTECTED]
To: "'Mike Roberts'" [EMAIL PROTECTED]; "Anthony R. J. Ball"
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 30, 2001 4:35 PM
Subject: RE: Need examples of companies using mysql


 If he is talking about the Samples that come with Paul DuBois book MySQL
 thay are at:

 http://www.mysql.com/Downloads/Contrib/Examples/samp_db.tar.gz

 Jason Maderios


 -Original Message-
 From: Mike Roberts [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 30, 2001 5:21 PM
 To: Anthony R. J. Ball
 Cc: [EMAIL PROTECTED]
 Subject: Re: Need examples of companies using mysql


 I asked for the same things awhile back. But you got more responses
 then I did!

 I got the yahoo address from
 Jeremy D . Zawodny
 http://biz.yahoo.com/ne.html

 Thanks Jeremy, its a good site


 At 02:48 PM 3/30/2001 -0500, you wrote:

Now that our use of MySQL is being questioned (but
 they are pretty much convinced). What the higher-ups
 want to know is a few examples of medium to large
 companies using mysql for mission critical stuff.
 
If any one can provide some I would be much appreciated.
 We are a financial company using mysql to back a bunch
 of our new fast-cgi stuff that is about to be opened to
 users, so anything in that genre would be all the better.
 
Examples of generally what kinds of machines there are
 run on could be cool too, but by no means necessary.
 
We are currently running on Solaris 2.7 with like,
 4 processors and 4 gigs of RAM, I myself have full
 faith in mysql.
 
  Thanks - Ant
 
 --
   ___  __  ____  _  _  _  _    
 / __)(  )(  )  /__\( \/ )( ___)  ( \( )( ___)(_  _)
 \__ \ )(__)(  /(__)\\  /  )__))  (  )__)   )(
 (___/(__)(__)(__)\/  ()()(_)\_)() (__)
 Go ahead, jump. 100,000 lemmings can't be wrong.
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 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: Need examples of companies using mysql

2001-03-31 Thread Hemendra Rana

but I thought 3.23 supports transactions.. doesn't it?? Even I am facing the
similar question from higher ups about MySQL and its support for
transactions and how stable is the version 3.23 with trasactions.

-Original Message-
From: Jim Gillaspy @ bellsouth.net [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 31, 2001 1:13 PM
Cc: [EMAIL PROTECTED]
Subject: Re: Need examples of companies using mysql


I use MySQL for my personal web site, but as the Director of Information
Systems (I suppose I am one of those higher ups) I can't imagine
using MySQL
for mission critical applications until it has transaction support (commit
and rollback).
Jim Gillaspy
- Original Message -
From: "Jason Maderios" [EMAIL PROTECTED]
To: "'Mike Roberts'" [EMAIL PROTECTED]; "Anthony R. J. Ball"
[EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, March 30, 2001 4:35 PM
Subject: RE: Need examples of companies using mysql


 If he is talking about the Samples that come with Paul DuBois book MySQL
 thay are at:

 http://www.mysql.com/Downloads/Contrib/Examples/samp_db.tar.gz

 Jason Maderios


 -Original Message-
 From: Mike Roberts [mailto:[EMAIL PROTECTED]]
 Sent: Friday, March 30, 2001 5:21 PM
 To: Anthony R. J. Ball
 Cc: [EMAIL PROTECTED]
 Subject: Re: Need examples of companies using mysql


 I asked for the same things awhile back. But you got more responses
 then I did!

 I got the yahoo address from
 Jeremy D . Zawodny
 http://biz.yahoo.com/ne.html

 Thanks Jeremy, its a good site


 At 02:48 PM 3/30/2001 -0500, you wrote:

Now that our use of MySQL is being questioned (but
 they are pretty much convinced). What the higher-ups
 want to know is a few examples of medium to large
 companies using mysql for mission critical stuff.
 
If any one can provide some I would be much appreciated.
 We are a financial company using mysql to back a bunch
 of our new fast-cgi stuff that is about to be opened to
 users, so anything in that genre would be all the better.
 
Examples of generally what kinds of machines there are
 run on could be cool too, but by no means necessary.
 
We are currently running on Solaris 2.7 with like,
 4 processors and 4 gigs of RAM, I myself have full
 faith in mysql.
 
  Thanks - Ant
 
 --
   ___  __  ____  _  _  _  _    
 / __)(  )(  )  /__\( \/ )( ___)  ( \( )( ___)(_  _)
 \__ \ )(__)(  /(__)\\  /  )__))  (  )__)   )(
 (___/(__)(__)(__)\/  ()()(_)\_)() (__)
 Go ahead, jump. 100,000 lemmings can't be wrong.
 
 
 -
 Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
 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


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

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




Mac OS X

2001-03-31 Thread Erick Schmidt

Can anyone tell me where to get and how to install MySQL on the new Mac 
OS X?

Thanks for your help!!

[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: How to have faster select?

2001-03-31 Thread Chai-Hup Chen

Hi,
  Here is the fulltext index I add:

CREATE TABLE Books (
  isbn char(10) NOT NULL default '',
  Title char(255) NOT NULL default '',
  FULLTEXT KEY full_title (Title)
) TYPE=MyISAM;

  select count(*) from Books  -- 2028971
  select count(*) from Books where Title like "% cisco %"
+--+
| count(*) |
+--+
|   86 |
+--+
1 row in set (1 min 15.58 sec)

  Look like the fulltext index is not functioning ... Any idea?

BTW, my mysql is 3.23.36 under Linux kernel 2.2.18, CPU P3 866, RAM 1GB

Best Regards,
Hup



 Why don't use FULLTEXT index ? This select doesn't use normal index so
 you have a sort of linear search

 Chai-Hup Chen wrote:

  Hi,
I find in our database, select "% string %" is very slow (1
  minute).  The database size have only 2M rows,  any idea how could I get
  faster response?  Thanks a lot.
 
  CREATE TABLE Books (
isbn char(10) NOT NULL default '',
Title char(255) NOT NULL default '',
KEY isbn (isbn),
KEY Title (Title)
  }
 
  select count(*) from Books  - 2028971
 
  select count(*) from Books where Title like "% cisco %";
  +--+
  | count(*) |
  +--+
  |   86 |
  +--+
  1 row in set (1 min 25.09 sec)
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 

 --
 --
 Antonio Gulli'Ideare S.p.a  tel: (+39) 050  575300
 [EMAIL PROTECTED]  Lungarno Mediceo 56   fax: (+39) 050  575583
 whois:   AG2-ORG  I-56126 Pisa, Italy   http://www.ideare.com net:

 print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",
 )]}\EsMsKsN0[lN*1lK[d2%Sa2/d0X+d*lMLa^*lN%0]dsXx++lMlN/dsM0J]dsJxp"|dc`





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

 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: How to have faster select?

2001-03-31 Thread MikemickaloBlezien

On Sat, 31 Mar 2001 11:46:54 -0800 (PST), Chai-Hup Chen [EMAIL PROTECTED]   wrote:

Try this:

SELECT count(*) FROM Books WHERE MATCH Title AGAINST 'cisco'

We use a FULLTEXT index search in a couple of our table for business referral
searches, and it works like a charm!

Hope this helps 

Hi,
  Here is the fulltext index I add:

CREATE TABLE Books (
  isbn char(10) NOT NULL default '',
  Title char(255) NOT NULL default '',
  FULLTEXT KEY full_title (Title)
) TYPE=MyISAM;

  select count(*) from Books  -- 2028971
  select count(*) from Books where Title like "% cisco %"
+--+
| count(*) |
+--+
|   86 |
+--+
1 row in set (1 min 15.58 sec)

  Look like the fulltext index is not functioning ... Any idea?

Mike(mickalo)Blezien

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















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

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




Mac OS X

2001-03-31 Thread Erick Schmidt

Does anyone know where to get MySQL for the new Mac OSX and how to install
it?

Thanks for the help.


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

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




Indexes - Yes I know people ask this hundreds of times

2001-03-31 Thread Richard Clarke

This email was delivered to you by The Free Internet,
a Business Online Group company. http://www.thefreeinternet.net
---
Hi,
I realise this mailing list must get bombarded with questions about
indexes but can someone please spare a moment to help me out here.

Here is my database and index's and table size.

mysql desc accounting;
+---+---+--+-+-+---+
| Field | Type  | Null | Key | Default | Extra |
+---+---+--+-+-+---+
| NAS_IP_Address| varchar(16)   |  | PRI | |   |
| Called_Station_Id | varchar(22)   |  | PRI | |   |
| Acct_Session_Time | int(11)   | YES  | | NULL|   |
| Acct_Start_Time   | timestamp(14) | YES  | PRI | NULL|   |
| Acct_Stop_Time| timestamp(14) | YES  | PRI | NULL|   |
| Timestamp | timestamp(14) | YES  | | NULL|   |
| GW_IP_Address | varchar(16)   | YES  | | NULL|   |
+---+---+--+-+-+---+
7 rows in set (0.00 sec)

mysql show index from accounting;
+++--+--+---+---
+-+--++-+
| Table  | Non_unique | Key_name | Seq_in_index | Column_name   |
Collation | Cardinality | Sub_part | Packed | Comment |
+++--+--+---+---
+-+--++-+
| accounting |  0 | PRIMARY  |1 | NAS_IP_Address| A
|  10 | NULL | NULL   | |
| accounting |  0 | PRIMARY  |2 | Called_Station_Id | A
|  616136 | NULL | NULL   | |
| accounting |  0 | PRIMARY  |3 | Acct_Start_Time   | A
| 2464545 | NULL | NULL   | |
| accounting |  0 | PRIMARY  |4 | Acct_Stop_Time| A
| 2464545 | NULL | NULL   | |
| accounting |  1 | date |1 | Acct_Start_Time   | A
| 1232272 | NULL | NULL   | |
| accounting |  1 | date |2 | Acct_Stop_Time| A
| 2464545 | NULL | NULL   | |
+++--+--+---+---
+-+--++-+
6 rows in set (0.01 sec)

mysql select count(*) from accounting;
+--+
| count(*) |
+--+
|  2464545 |
+--+
1 row in set (0.00 sec)

===
Ok so I am trying to do Acct_Session_Time sum's under Time ranges. for
example,
select sum(acct_session_time) from accounting where acct_start_time between
'2001031900' AND '20010325235959';

mysql explain select sum(acct_session_time) from accounting where
acct_start_time between '2001031900' AND '20010325235959';
++--+---+--+-+--+-+-
---+
| table  | type | possible_keys | key  | key_len | ref  | rows|
Extra  |
++--+---+--+-+--+-+-
---+
| accounting | ALL  | date  | NULL |NULL | NULL | 2464545 |
where used |
++--+---+--+-+--+-+-
---+
1 row in set (0.00 sec)

So mysql has decided not to use the date index. A quick count(*) under the
range tells me,
mysql select count(*) from accounting where acct_start_time between
'2001031900' AND '20010325235959';;
+--+
| count(*) |
+--+
|   793651 |
+--+
1 row in set (1 min 22.97 sec)

this is 32% of the total size so mysql chooses to ignore my index.
However by adding a limit statement to the query to force use of the index
the following results appear when using the index and when not using the
index

mysql select sum(acct_session_time) from accounting where acct_start_time
between '2001031900' AND '20010325235959';
 ++
| sum(acct_session_time) |
++
|   54794345 |
++
1 row in set (5 min 54.17 sec)

mysql select sum(acct_session_time) from accounting where acct_start_time
between '2001031900' AND '20010325235959' limit 1;
++
| sum(acct_session_time) |
++
|   54794345 |
++
1 row in set (1 min 46.64 sec)

Ok so obviously mysql's choice to not use indexes is completely silly. Is
there anyway for me to force it to change the 30% to 40%?
We keep some of our data in an archive table because initial logic told us
that a smaller table would mean faster selects. However with index's this
isn't true right? so should I copy the archive data back into the current
table and that way the query is more likely to be less than 30%. Or is that
then gonna seriously affect other 

fairly new to Linux, very new to MySQL

2001-03-31 Thread Jack Handy

Pie Charts

I have just downloaded and installed the most recent stable version on my
Redhat 6.1 server.  I can't figure out how to access the MySQL server
application itself!  (Yes I have actually started the daemon) I did download
a GUI client app but I can't get past the password and I couldn't find a
default password for the root account in the documentation.

Microsoft has made me stupid but I'm trying to heal myself.  If I can figure
out how to get logged in I think I'll be OK.

Please help.

Much appreciated,

Jack






Re: How to have faster select?

2001-03-31 Thread MikemickaloBlezien

On Sat, 31 Mar 2001 12:39:59 -0800 (PST), Chai-Hup Chen [EMAIL PROTECTED]   wrote:

I think if you take a look at the MySQL docs on FULLTEXT it'll explain it alot
better then I probably could.

http://www.mysql.com/doc/M/y/MySQL_full-text_search.html

  Thanks a lot, the select is much faster now.  But I find something
weird, it return nothing when match against the string "the", which
return 255568 entries when select "% the %", is it possible mysql
does not indexed some words for some reason?


select count(*) from Books where match Title against ('cisco');
+--+
| count(*) |
+--+
|  222 |
+--+
1 row in set (1.76 sec)




select count(*) from Books where Title like "% the %";
+--+
| count(*) |
+--+
|   255568 |
+--+
1 row in set (1 min 23.17 sec)

select count(*) from Books where match Title against ('the');
+--+
| count(*) |
+--+
|0 |
+--+
1 row in set (0.00 sec)


 SELECT count(*) FROM Books WHERE MATCH Title AGAINST 'cisco'

 We use a FULLTEXT index search in a couple of our table for business referral
 searches, and it works like a charm!

 Hope this helps

 Hi,
   Here is the fulltext index I add:
 
 CREATE TABLE Books (
   isbn char(10) NOT NULL default '',
   Title char(255) NOT NULL default '',
   FULLTEXT KEY full_title (Title)
 ) TYPE=MyISAM;
 
   select count(*) from Books  -- 2028971
   select count(*) from Books where Title like "% cisco %"
 +--+
 | count(*) |
 +--+
 |   86 |
 +--+
 1 row in set (1 min 15.58 sec)
 
   Look like the fulltext index is not functioning ... Any idea?

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

Mike(mickalo)Blezien

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















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

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




Re: A complete newbie here (long post)

2001-03-31 Thread Eric Fitzgerald

Make sure that /tmp is writable by the user running MySQL.

You say you are setting MySQL up on your account, do you have access to the
root account on this box?  If not, are you sure that the box your on doesn't
already have MySQL running?

- Original Message -
From: "Tatti" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 31, 2001 7:32 AM
Subject: A complete newbie here (long post)


 I have spent the past 24 hours trying to install and configure MySql on my
account at my ISP. Every try failes.

 I have three different instructions and none works.

 Installing is no problem. What I can't do is change password to one I want
or even run the server without changing the dafault password. I cant even
log in with default pwd.

 Below is a cutpaste of a mailings between me and someone who tried
helping me. See if you can figure it out.

  start MySql:
  bin/safe_mysqld 
 
 Gave the following result:
 bin/mysqld: Fatal error: Can't find messagefile
'/usr/local/mysql/share/mysql/english/errmsg.sys

 
  bin/mysql
 
 Same error message as above

 Later:
  bin/mysql
 
 And that gave:
 ERROR 1045: Access denied for user 'stage1@localhost' (Using Password: NO)

 Yet later:
  start MySql:
  bin/safe_mysqld 
 
 Now I got:
 Starting mysql daemon with databases from
/home/stage1/.www/mysql-x.xx.xxetcetcetc/data
 rm: cannot unlink '/tmp/mysql.sock':operation not permitted
 010331 13:57:50 mysqld ended

 Full instructions I got from my friend was the following:
 As root, untar into /usr/local:

 tar xvfz mysql-xx.xx.xx.tar.gz

 create a symlink to a mysql directory:
 ln -s mysql-xx.xx.xx mysql

 cd to mysql and prep the database:
 cd mysql
 scripts/mysql_install_db

 start MySql:
 bin/safe_mysqld 

 now connect to it:

 bin/mysql

 (no parameters!)

 And you're there.

 Well, I followed his instructions and they worked as far as what I pasted
above.

 My plan is to phpnuke the entire site and therefore I need the MySQL. To
add to it all I have absolutely no knowledge of either Linux or Unix. But I
intend to learn.

 Thanks in advance for any help I get.

 Cheers
 Tatti



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

 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: Odd issue

2001-03-31 Thread Lindsay Adams

Oliver,

Well,I decided to try out some new stuff, and was going to compile PHP 4,
but got stuck at the following when running configure:
checking for flex... no
checking for lex... no
./configure: flex: command not found
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: lex: command not found
configure: error: cannot find output from lex; giving up

What package do I need, to install lex?
Is it in the dev package?



On 3/30/01 5:32 AM, "Oliver Hingst" [EMAIL PROTECTED] wrote:

 Hello,
 I have a Cobalt Qube2.
 I have recently compiled Apache 1.3.19, PHP4.0.3pl1 and MySQL 3.23.33.
 Even though, everything compiled normally. I am unable to load PHP4 as a
 DSO. When I run 'apachectl configtest', I get this error:
 
 Syntax error on line 239 of /etc/httpd/conf/httpd.conf:
 Cannot load /usr/lib/apache/libphp4.so into server:
 /usr/local/mysql/lib/mysql/libmysqlclient.so.10: undefined symbol:
 my_message_no_curses
 
 What does that mean ?
 
 I have compiled MySQL with these ./configure options:
 
 ./configure --disable-assembler --with-low-memory --prefix=/usr/local/mysql
 
 PHP:
 
 ./configure --with-apxs \
 --enable-versioning \
 --with-mysql=/usr/local/mysql
 --enable-track-vars \
 --enable-ftp \
 --with-mm=/usr/local/lib \
 --with-zlib \
 --with-xml
 
 
 
 
 -
 Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
 
 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 hangs

2001-03-31 Thread Ide, Jim


OpenBSD 2.8
swap partition is 256mb
/tmp partition is 1gb
Pentium III 667mhz, 256mb ram
MySQL 3.22.32 (installed by: pkg_add mysql-3.22.32.tgz)
df reports that I have plenty of free disk space

I have a table that has 422,000 rows, and has a key field defined as:
integer unsigned not null auto_increment primary key.

I loaded the data into the table from a MS Access 97 database using MyODBC.

mysqld was started with:
safe_mysqld --user=mysql 

If I type:
cd /path/to/MyDB
mysqldump --opt MyDB MyTable  MyTable.backup 
ls -l MyTable*

mysqldump will start dumping MyTable, and MyTable.backup grows in size.
After about a minute, MyTable.backup stops growing in size (according to ls
-l).
'top' shows that mysqld has over 99% of cpu.  Note that this box is a
dedicated
db server, and no other major processes are running.  Nothing changes after
10,
20, 30 minutes.  After killing mysqldump, mysqld is still at 99% cpu.  I
then
kill -9 mysqld, and cpu % goes to zero.

I have similar behavior when I try to create an index on this table.  For
example,
if I type
mysql create index MyIndex on MyTable ( MyField );
'top' shows that mysqld is at 99% cpu, and the index is still not done being
built
after 30 minutes (the identical data is on a linux box, and the index takes
3 minutes
to build.

Any ideas?

Many thanks -
Jim








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

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




Re: fairly new to Linux, very new to MySQL

2001-03-31 Thread Lindsay Adams

The initial install has no password for root.

Fix this by running the command line client as follows:

Mysql -u root

That will allow you to connect.
Then give root a password!

The userids in mysql are completely separate from any security model that
your OS uses. 
Therefore,passwords, are not the same in both places.

On 3/31/01 12:47 PM, "Jack Handy" [EMAIL PROTECTED] wrote:

 Pie Charts
 
 I have just downloaded and installed the most recent stable version on my
 Redhat 6.1 server.  I can't figure out how to access the MySQL server
 application itself!  (Yes I have actually started the daemon) I did download
 a GUI client app but I can't get past the password and I couldn't find a
 default password for the root account in the documentation.
 
 Microsoft has made me stupid but I'm trying to heal myself.  If I can figure
 out how to get logged in I think I'll be OK.
 
 Please help.
 
 Much appreciated,
 
 Jack
 
 
 
 


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

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: flex [was: Odd issue]

2001-03-31 Thread Steve Werby

"Lindsay Adams" [EMAIL PROTECTED] wrote:
 Well,I decided to try out some new stuff, and was going to compile PHP 4,
 but got stuck at the following when running configure:
 checking for flex... no
 checking for lex... no


I've installed flex from source on Cobalt RaQs.  It's a simple install.  It
will probably install just fine on the Qube2.  You should be able to find
the official source for it using google.  If not I can send you the source
for flex-2.5.4.  It seems you installed MySQL in /usr/local/mysql.  Be
careful if you do this b/c the /usr and /var partitions on the Cobalts are
pretty small and if you do logging or have large databases the partitions
will fill up fast.  You might be better off installing onto /home.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


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

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




RE: Dual Processor and MySQL !

2001-03-31 Thread Hamid Hashemi Golpayegani

Therefore if I am using Linux for my MySQL server both of my CPU's will help
to serv the MySQL queries if I am installing the SMP in my kernel right ?!
I am using RedHat 6.2 with Linux 2.2.14-5.0smp #1 SMP .

--
Regards


   /  Seyyed Hamid Reza/WINDOWS FOR NOW  !!/
  /  Hashemi Golpayegani  /  Linux for future , FreeBSD for ever  /
 /Morva System Co.   / - /
/  Network Administrator/ [EMAIL PROTECTED]   ,   ICQ# : 42209876 /
===


-Original Message-
From: Benjamin Pflugmann [mailto:[EMAIL PROTECTED]]
Sent: Saturday, March 31, 2001 6:56 PM
To: Hamid Hashemi Golpayegani
Cc: [EMAIL PROTECTED]
Subject: Re: Dual Processor and MySQL !


Hi.

Whether MySQL can benefit from several CPUs or not depends on whether
the OS you are going to use, can split threads to these CPUs.

I know Linux can (quite good, indeed). AFAIK, FreeBSD had a user space
threads implementation and therefore could not use multiple CPUs. I
cannot say, whether this still holds true. I can neither say about
other operating systems.

Bye,

Benjamin.



On Sat, Mar 31, 2001 at 06:39:17PM +0330, [EMAIL PROTECTED] wrote:
 Hi ,

 Sorry for this question may be this question asked before but I can't find
 it .
 I want to know that an SMP Dual CPU machine for a MySQL server is better
 that a single CPU machine ?!
 I mean is the MySQl use the both CPU's for processing or not ?
 and how much affect on the responding and which parameters are going
better
 in this 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




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

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: mysqldump hangs

2001-03-31 Thread Chris Cameron

I should start reading this list more..

I've had a similar problem, and good luck finding many people who'll help
you with OBSD problems on this list (or any problems for that matter).

Anywho, it's ports specific I think. I installed MySQL from source
compiling with -O6 and the proper arch (likely not i386) and it stopped
crapping when I did heavy things (like using Pronto).

So I'd suggest compiling and installing it from source rather than ports.
No it doesn't uninstall nicely, but you can do a
--prefix="/usr/local/mysql" and --eprefix="/usr/local/mysql" I believe
(pulling this off the top of my head).

And if you run into the "out of virtual mem" problem mail me and I can
help you with that (basically compile sql_yacc.c by itself).


Hope this helps,
Chris

--
"Anyone who cannot cope with mathematics is not fully human. At best he
is a tolerable subhuman who has learned to wear shoes, bathe and not make
messes in the house."
- Lazarus Long, "Time Enough for Love"



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

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




var directory

2001-03-31 Thread Joseph Bannon

How do I set the location of the var directory when I
install?

Joseph


Say I'm Hot! - Post Your Picture!
http://www.sayimhot.com

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/?.refer=text

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

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: Dual Processor and MySQL !

2001-03-31 Thread Jeremy D . Zawodny

On Sun, Apr 01, 2001 at 02:55:02AM +0330, Hamid Hashemi Golpayegani wrote:

 Therefore if I am using Linux for my MySQL server both of my CPU's
 will help to serv the MySQL queries if I am installing the SMP in my
 kernel right ?!

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

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

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: ---- Virus Detected ----

2001-03-31 Thread Lindsay Adams

On 3/31/01 1:51 PM, "[EMAIL PROTECTED]" [EMAIL PROTECTED]
wrote:

 MailMarshal (an automated content monitoring gateway) has stopped
 the following message:
 
  Message: B00049bf4.0001.mml
  From:[EMAIL PROTECTED]
  To:  [EMAIL PROTECTED]
  Subject: Re: Odd issue
 
 Because it believes an attachment to this message contains a virus.
 The virus scanning software used was: F-Prot
 
 Please clean the file and resend it.
 http://www.marshalsoftware.com
 

Is anyone else on this list getting responses like this returned to them?
I have run Virex, Symantec Antivirus, and even disenfectant. The emails I
sent out had no file attachments. I email from a mac, and don't have any
macro viruses in the MS apps I don't even use.

So, is anyone else getting these?


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

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




got an error in my error log !

2001-03-31 Thread Hamid Hashemi Golpayegani

Hi ,

I have installed the MySQL 3.23.5-alpha-log on a RedHat 6.2 Linux with 512
Megabyte of RAM and 2 PIII 550 CPU installed on this machine .
This is machine is very high load SQL server that do all of my accounting
and web report for my customers .
Works quite well . But I have a Radius server that patched to authenticate
through MySQL server against passwd and this also working fine . The bad
things that bothering me is that I show this error in my MySQL error log
everytime :
010401  3:47:24  Aborted connection 6132751 to db: 'morva' user: 'radius
' (Got an error reading communication packets)
this error happen a lot for only radius user that a Cistron Radius (
Compiled with a gcc on another machine with a patch for authenticate through
MySQL ) . I have a lot of users that works through perl , php , C and alone
MySQL clients on this and another machine and working fine without any
errors in error log . Also my radius works fine without any problem but I
don't know why get this error in my error log . any Suggestion ?

--
Regards


   /  Seyyed Hamid Reza/WINDOWS FOR NOW  !!/
  /  Hashemi Golpayegani  /  Linux for future , FreeBSD for ever  /
 /Morva System Co.   / - /
/  Network Administrator/ [EMAIL PROTECTED]   ,   ICQ# : 42209876 /
===



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

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: ---- Virus Detected ----

2001-03-31 Thread Hamid Hashemi Golpayegani

I am getting this warning also and I have installed Norton Antivirus 2001
with the lastest update and sure that don't have any viruses .

--
Regards


   /  Seyyed Hamid Reza/WINDOWS FOR NOW  !!/
  /  Hashemi Golpayegani  /  Linux for future , FreeBSD for ever  /
 /Morva System Co.   / - /
/  Network Administrator/ [EMAIL PROTECTED]   ,   ICQ# : 42209876 /
===


-Original Message-
From: Lindsay Adams [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 01, 2001 2:54 AM
To: [EMAIL PROTECTED]
Subject: Re:  Virus Detected 


On 3/31/01 1:51 PM, "[EMAIL PROTECTED]" [EMAIL PROTECTED]
wrote:

 MailMarshal (an automated content monitoring gateway) has stopped
 the following message:

  Message: B00049bf4.0001.mml
  From:[EMAIL PROTECTED]
  To:  [EMAIL PROTECTED]
  Subject: Re: Odd issue

 Because it believes an attachment to this message contains a virus.
 The virus scanning software used was: F-Prot

 Please clean the file and resend it.
 http://www.marshalsoftware.com


Is anyone else on this list getting responses like this returned to them?
I have run Virex, Symantec Antivirus, and even disenfectant. The emails I
sent out had no file attachments. I email from a mac, and don't have any
macro viruses in the MS apps I don't even use.

So, is anyone else getting these?


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

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: ---- Virus Detected ----

2001-03-31 Thread Gary Huntress

I have received several of the same messages, and I too believe that I'm
virus free (I just updated and ran NAV).

Since the message is signed with an ad for marshal software, which is sells
anti-virus services, I am viewing this as 100% spam.

Gary

- Original Message -
From: "Lindsay Adams" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, March 31, 2001 6:24 PM
Subject: Re:  Virus Detected 


 On 3/31/01 1:51 PM, "[EMAIL PROTECTED]" [EMAIL PROTECTED]
 wrote:

  MailMarshal (an automated content monitoring gateway) has stopped
  the following message:
 
   Message: B00049bf4.0001.mml
   From:[EMAIL PROTECTED]
   To:  [EMAIL PROTECTED]
   Subject: Re: Odd issue
 
  Because it believes an attachment to this message contains a virus.
  The virus scanning software used was: F-Prot
 
  Please clean the file and resend it.
  http://www.marshalsoftware.com
 

 Is anyone else on this list getting responses like this returned to them?
 I have run Virex, Symantec Antivirus, and even disenfectant. The emails I
 sent out had no file attachments. I email from a mac, and don't have any
 macro viruses in the MS apps I don't even use.

 So, is anyone else getting these?


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

 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: ---- Virus Detected ----

2001-03-31 Thread MikemickaloBlezien

On Sun, 1 Apr 2001 04:07:35 +0330, "Hamid Hashemi Golpayegani" [EMAIL PROTECTED]
wrote:

I think everyone is getting bombarded with this virus message. I gotten 3 of the
already!


I am getting this warning also and I have installed Norton Antivirus 2001
with the lastest update and sure that don't have any viruses .

--
Regards

Mike(mickalo)Blezien

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















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

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




Re: ---- Virus Detected ----

2001-03-31 Thread Lindsay Adams

On 3/31/01 3:34 PM, "MikemickaloBlezien" [EMAIL PROTECTED] wrote:

 On Sun, 1 Apr 2001 04:07:35 +0330, "Hamid Hashemi Golpayegani"
 [EMAIL PROTECTED]
 wrote:
 
 I think everyone is getting bombarded with this virus message. I gotten 3 of
 the
 already!
 
 
 I am getting this warning also and I have installed Norton Antivirus 2001
 with the lastest update and sure that don't have any viruses .
 
 --
 Regards
 
 Mike(mickalo)Blezien
 
 Thunder Rain Internet Publishing
 Providing Internet Solutions that work!
 http://www.thunder-rain.com
 Tel: 1(225) 686-2002
 =
 
 
Okay, glad it is not just me.

Hopefully the list administrator is seeing our thread and will block the
address.

I emailed the user in the message, and did not get a virus warning from it.
In the message, I suggested he subscribe with a different email address. If
the list mom/dad blocks his address, he will have to! ;)

I also ran multiple virus checks, and sent an email to myself to insure that
a virus wasn't tacking something on. Even went so far as to read the raw
mail file in my spool/mail folder. NO VIRUS

Again, thanks for the sanity check gang!


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

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: var directory

2001-03-31 Thread Steve Werby

"Joseph Bannon" [EMAIL PROTECTED] wrote:
 How do I set the location of the var directory when I
 install?

./configure --localstatedir=PATH_TO_DATA_DIR See ./configure --help for more
info.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


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

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




installation problem on NetBSD/macppc 1.5

2001-03-31 Thread Philip Brodd

Hi,

I'm having some trouble getting MySQL to install properly on my
NetBSD/macppc 1.5 system from source package.  Here's the MySQL version
information:


% /usr/pkg/libexec/mysqld -V
./mysqld  Ver 3.22.32 for -netbsd on powerpc


And below is the error that occurred when installing the package.  I
haven't been able to find this in the mailing list archives, and I
haven't had any luck on the NetBSD lists.  Any clues?

Thanks.

Phil Brodd


--- snip ---
install -c -o root -g wheel -m 555 -s mysqld /usr/pkg/libexec/mysqld
Making install in tests
`safe_mysqld' is up to date.
`mysql_install_db' is up to date.
/usr/pkg/bin/mysql_install_db --force
Creating db table
Creating host table
Creating user table
Creating func table
Creating tables_priv table
Creating columns_priv table

/usr/pkg/libexec/mysqld: Fatal error: Can't read from messagefile 
'/usr/pkg/share/mysql/english/errmsg.sys'

Installation of grant tables failed!

Examine the logs in /var/mysql for more information.
You can also try to start the mysqld demon with:
/usr/pkg/libexec/mysqld --skip-grant 
You can use the command line tool
/usr/pkg/bin/mysql to connect to the mysql
database and look at the grant tables:

shell /usr/pkg/bin/mysql -u root mysql
mysql show tables

Try 'mysqld --help' if you have problems with paths. Using --log
gives you a log in /var/mysql that may be helpful.

The latest information about MySQL is available on the web at
http://www.mysql.com
Please consult the MySQL manual section: 'Problems running mysql_install_db',
and the manual section that describes problems on your OS.
Another information source is the MySQL email archive.
Please check all of the above before mailing us!
And if you do mail us, you MUST use the /usr/pkg/bin/mysqlbug script!
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
*** Error code 1

Stop.
--- snip ---


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

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: ---- Virus Detected ----

2001-03-31 Thread Van

"MikeBlezien" wrote:
 
 On Sun, 1 Apr 2001 04:07:35 +0330, "Hamid Hashemi Golpayegani" [EMAIL PROTECTED]
 wrote:
 
 I think everyone is getting bombarded with this virus message. I gotten 3 of the
 already!
 
 I am getting this warning also and I have installed Norton Antivirus 2001
 with the lastest update and sure that don't have any viruses .
 
 --
 Regards
 
 Mike(mickalo)Blezien
 
 Thunder Rain Internet Publishing
 Providing Internet Solutions that work!
 http://www.thunder-rain.com
 Tel: 1(225) 686-2002
 =
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

I've never seen this message except in this thread.  So, it's only bombarding
people in the thread, as far as I can tell.

'Course I haven't used a Microsoft Mail program since '95 and am quite certain I
don't send virii.

Just thought I'd pitch in.  Doesn't really seem rampant.

Regards,
Van
-- 
=
Linux rocks!!!   http://www.dedserius.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: Sorting and Ordering

2001-03-31 Thread Benjamin Pflugmann

Hi.

Note, that when you do a GROUP BY, according to ANSI SQL you may
SELECT only the columns grouped by and any grouping functions (like
SUM), i.e. selecting PACK_INC would result in an error.

MySQL extends ANSI SQL in that it allows to select abitrary columns,
but chooses a random value from the group in question, which can be
quite handy in some situations. I.e. it can even happen, that you get
back '1' once and '2' the other time. This feature mainly comes to
use, if either you know that all values in that column are the same,
or if you just want an abitrary value as example.

Btw, the same applies to MAST.CODE and TAB.SIZE.

AFAIK, there is no clean way to do what you want in just one
query. There exists a hack, but better is a work-around with two
queries. You can look both up in the fine manual, also the standard
SQL way of solving this (which won't work with MySQL yet):
http://www.mysql.com/doc/e/x/example-Maximum-column-group-row.html

Bye,

Benjamin.


On Sat, Mar 31, 2001 at 09:01:01AM -0600, [EMAIL PROTECTED] wrote:
[...]
 ++---+--+--+--+---+
 | CODE   | ADVRT_NBR | ADVRT_ID | PACK_INC | SIZE | QUEUE |
 ++---+--+--+--+---+
 | INSERT LATER CODE FOR 1| 1 |2 |1 |   60 | 2 |
 | INSERT LATER CODE FOR 2| 10001 |2 |1 |  100 | 3 |
 | INSERT LATER CODE FOR 2| 10001 |2 |2 |  100 |12 |
 ++---+--+--+--+---+
 3 rows in set (0.05 sec)
 
 The keys are ADVRT_NBR, ADVRT_ID,PACK_INC.
 
 I'm trying to find the maximum QUEUE value and use the keys for further
 processing.  This is the statement that I developed:
 
 
 mysql SELECT   MAST.CODE
 - ,MAST.ADVRT_NBR
 - ,MAST.ADVRT_ID
 - ,TAB.PACK_INC
 - ,TAB.SIZE
 - ,MAX(TAB.QUEUE) AS MAX
 -   FROM   ADVRT_MAST AS MAST
 - INNER JOIN  LEVEL_3 AS TAB
 - ON  TAB.ADVRT_NBR = MAST.ADVRT_NBR
 -AND  TAB.ADVRT_ID  = MAST.ADVRT_ID
 -  WHERE  MAST.TYPE = 'S'
 -AND  MAST.ADVRT_STATUS = 'A'
 -   GROUP BY   MAST.ADVRT_NBR
 - ,MAST.ADVRT_ID
 -   ORDER BY  MAX DESC;
 
 ++---+--+--+--+--+
 | CODE   | ADVRT_NBR | ADVRT_ID | PACK_INC | SIZE | MAX  |
 ++---+--+--+--+--+
 | INSERT LATER CODE FOR 2| 10001 |2 |1 |  100 |   12 |
 | INSERT LATER CODE FOR 1| 1 |2 |1 |   60 |2 |
 ++---+--+--+--+--+
 
 The results set is incorrect because the PACK_INC is not correct (well,
 according to my expected results), it should be a "2" and not a "1" for the
 maximum queue value.  I understand that I am grouping by the first two keys
 (ADVRT_NBR,ADVRT_ID) but how do I get the correct PACK_INC based off of the
 maximum QUEUE?
 
 Another item is that I AM still interested in the next highest QUEUE
 value

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

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: ---- Virus Detected ----

2001-03-31 Thread Benjamin Pflugmann

Hi.

I got the warning too, and also run Linux. So this doesn't seems to be
connected to the operating system. And neither to a certain thread: I
got it on mails to abitrary threads.

Bye,

Benjamin.

On Sat, Mar 31, 2001 at 08:54:08PM -0700, [EMAIL PROTECTED] wrote:
[...]
 
 I've never seen this message except in this thread.  So, it's only bombarding
 people in the thread, as far as I can tell.
 
 'Course I haven't used a Microsoft Mail program since '95 and am quite certain I
 don't send virii.
 
 Just thought I'd pitch in.  Doesn't really seem rampant.
 
 Regards,
 Van

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

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: ---- Virus Detected ----

2001-03-31 Thread Jeremy D . Zawodny

On Sun, Apr 01, 2001 at 07:58:19AM +0200, Benjamin Pflugmann wrote:
 
 I got the warning too, and also run Linux. So this doesn't seems to
 be connected to the operating system. And neither to a certain
 thread: I got it on mails to abitrary threads.

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

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

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




Show grants ??? Doubt

2001-03-31 Thread P.V. Sajan

Hello all !!
mysql show grants for root@localhost;
ERROR 1064: You have an error in your SQL syntax near 'grants for
root@localhost ' at line 1

Could anyone please tell me  where i'm going wrong ..
Thank you
Sajan


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

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




Doubt!!

2001-03-31 Thread P.V. Sajan

Hello all !!
 
Is there any method by whick we can use the Sys Admin commands
like
 Mysqlacess ,
 Mysqldump ,
mysqladmin 
etc
in Java. 
I mean thro ' " PreparedStatement/ Statment " classes
 
Thank you 
Best Regards
Sajan



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

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




SQL script and mySQL

2001-03-31 Thread Vigile

I have a SQL file that I generated on MS SQL 7.  The file looks like this (a portion):

CREATE TABLE [dbo].[Articles] (
 [ArticleID] [int] IDENTITY (1, 1) NOT NULL ,
 [Title] [char] (100) NOT NULL ,
 [AuthorID] [int] NOT NULL ,
 [Date] [datetime] NOT NULL ,
 [SubjectID] [int] NOT NULL ,
 [Pages] [int] NOT NULL ,
 [Image] [text] NOT NULL ,
 [ManuID] [int] NULL ,
 [Publish] [char] (10) NULL ,
 [BuyText] [char] (100) NULL ,
 [BuyLink] [text] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Authors] (
 [AuthorID] [int] IDENTITY (1, 1) NOT NULL ,
 [AuthorName] [char] (50) NOT NULL ,
 [AuthorEmail] [char] (50) NOT NULL 
) ON [PRIMARY]
GO

I am using phpMyAdmin and attempting to run the SQL query on the database that has 
already been created.  I get the error:  MySQL said: You have an error in your SQL 
syntax near '[dbo].[Articles] ( [ArticleID] [int] IDENTITY (1, 1) NOT NULL , [Title] 
[cha' at line 1

What is the syntax problem that I am missing?  And can I make MS SQL output the sql 
file in the correct way?

Ryan Shrout
Athlonmb.com
Production Manager
http://www.athlonmb.com/
[EMAIL PROTECTED]





SQL Import on MySQL

2001-03-31 Thread Ryan Shrout

I have a SQL file that I generated on MS SQL 7.  The file looks like this (a portion):

CREATE TABLE [dbo].[Articles] (
 [ArticleID] [int] IDENTITY (1, 1) NOT NULL ,
 [Title] [char] (100) NOT NULL ,
 [AuthorID] [int] NOT NULL ,
 [Date] [datetime] NOT NULL ,
 [SubjectID] [int] NOT NULL ,
 [Pages] [int] NOT NULL ,
 [Image] [text] NOT NULL ,
 [ManuID] [int] NULL ,
 [Publish] [char] (10) NULL ,
 [BuyText] [char] (100) NULL ,
 [BuyLink] [text] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Authors] (
 [AuthorID] [int] IDENTITY (1, 1) NOT NULL ,
 [AuthorName] [char] (50) NOT NULL ,
 [AuthorEmail] [char] (50) NOT NULL 
) ON [PRIMARY]
GO

I am using phpMyAdmin and attempting to run the SQL query on the database that has 
already been created.  I get the error:  MySQL said: You have an error in your SQL 
syntax near '[dbo].[Articles] ( [ArticleID] [int] IDENTITY (1, 1) NOT NULL , [Title] 
[cha' at line 1

What is the syntax problem that I am missing?  And can I make MS SQL output the sql 
file in the correct way?

Ryan Shrout
Athlonmb.com
Production Manager
http://www.athlonmb.com/
[EMAIL PROTECTED]





Re: Show grants ??? Doubt

2001-03-31 Thread Benjamin Pflugmann

Hello.

You seem to use an older version of MySQL which did not support SHOW
GRANTS. Too see when a feature was introduced, have a look at the
Changes History section in the fine manual.

Bye,

Benjamin.

On Sun, Apr 01, 2001 at 12:27:13PM +0530, [EMAIL PROTECTED] wrote:
 Hello all !!
 mysql show grants for root@localhost;
 ERROR 1064: You have an error in your SQL syntax near 'grants for
 root@localhost ' at line 1
 
 Could anyone please tell me  where i'm going wrong ..
 Thank you
 Sajan

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

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




using default to assign date_entered

2001-03-31 Thread Jack Dempsey

Hi all,

I'm designing a table to hold classified ads...one of the columns i want
to have is date_entered...i was wondering if using a default value of
NOW() is ok...my guess is that its probably both stupid and not the most
sound way to do it (maybe not even possible), but i'd appreciate some
advice from those who know better...
thanks for any thoughts

jack dempsey

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

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: SQL script and mySQL

2001-03-31 Thread Benjamin Pflugmann

Hi.

On Sun, Apr 01, 2001 at 03:30:48AM -0400, [EMAIL PROTECTED] wrote:
 I have a SQL file that I generated on MS SQL 7.  The file looks like this (a 
portion):
 
 CREATE TABLE [dbo].[Articles] (
  [ArticleID] [int] IDENTITY (1, 1) NOT NULL ,
  [Title] [char] (100) NOT NULL ,
[...]
 
 I am using phpMyAdmin and attempting to run the SQL query on the database that has 
already been created.  I get the error:  MySQL said: You have an error in your SQL 
syntax near '[dbo].[Articles] ( [ArticleID] [int] IDENTITY (1, 1) NOT NULL , [Title] 
[cha' at line 1
 
 What is the syntax problem that I am missing?

These brackets [] are not allowed in the context. Try something like

CREATE TABLE dbo.Articles (
  ArticleID int IDENTITY (1, 1) NOT NULL ,
  Title char (100) NOT NULL ,

Next problem is IDENTITY is not known by MySQL. I assume it means
something like PRIMARY KEY AUTO_INCREMENT, and so on...

Summary: Don't use MS SQL dumps, when Standard SQL dumps are needed.

  And can I make MS SQL output the sql file in the correct way?

Sorry, I never used MS SQL, I have to leave that open to someone else.

Bye,

Benjamin.


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

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