Space problem?

2001-02-08 Thread Wyatt James

I am getting a misleading error message saying "duplicate key 127 at key 1" when 
trying to add an item to a table. There is no duplicate (I downloaded then uploaded to 
a new table and get the same error). The unique key is a smallint(4) with 
auto-increment. Is there some limit in MySQL on a Linux server on how many entries a 
table can contain? Each row is only about 1K in size and I read somewhere that you can 
go up to 2gig on a table size.  

Wyatt James
http://www./britcastles.com



Re: HOW DO I CAN DO THIS...

2001-02-08 Thread Tõnu Samuel

"MAN ..." wrote:
> 
> HI THERE, I HAVE A PROBLEM WITH THE ETTIQUETES OF THE DATABASE, I MEAN HOW DO I CAN 
>MAKE A SITE WHERE I CAN UPLOAD INFORMATION WITH A DATABASE, FOR EXAMPLE:
> 
> IF I WANT A PAE WHERE SAYS "PUT YOUR NAME HERE" AND YOU HAVE TO PUT IT IN AN 
>TEXTAREA HOW DO I MAKE THAT THAT NAME CAN GO TO MY DATABASE
> 
> I TRIED PUTIN' THIS
> 
> 
> 
> BUT I DIDNT GET THAT IT ONLY OFFERS ME TO DOWNLOAD THE DATABASE.
> 
> HELP MEE

Read the manual please. And also please buy new keyboard with working
CapsLock key. Current keyboard annoys users.

-- 
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Tonu Samuel <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Tallinn, Estonia
   <___/

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

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




Re: PHP - working with two MySQL serwers

2001-02-08 Thread MB

Anna wrote:

> No.
> As long as you give them different names. :-)
> $connectionLocal=mysql_connect(bleah, bleah, bleah);
> $connectionOther=mysql_connect(bleah, bleah, bleah);
>
> Then in any mysql_query you must, of course, specify
> which connection you are using.
>
> Anna
>

Thanx,
I've already tried (I use Vmware software to "simulate" two linux servers on my
home computer) and it works fine.
Regards
--
Mariusz Brzezinski
WBK SA
tel. +48 61 856 53 57
mobile +48 501 623 123



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

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




Simple datatype question

2001-02-08 Thread Joel Holtzman

Hello, I'm looking at the manual, and I cannot find the answer to this simple question.

What is the datatype in mysql for boolean? In Access it's yes/no.

What about mysql?

Thanks

Joel



Need guidance regarding constant table corruption

2001-02-08 Thread David J. Potter

Hello,
Until recently I have spent most of my time using the major databases such
as Oracle, DB2, Sybase etc.  I am new to MySQL.  At first I was excited
about such a low cost alternative such as MySQL, and I have found Mysql to
be a great database for very small databases, but for large databases it has
been a nightmare due to constant table corruption that is happening many
times on a daily basis.  The corruption is so bad that sometimes even
myisamchk -r won't fix the data and I have to use  --safe-recover.
Hopefully someone can give me some guidance as I really do not want to go
back to using those proprietary and expensive database systems.  I am not
able to move to an Unix operating system because the DSL modem being used
requires Windows and also for other reasons.  My setup is very simple with
only computer, the database resides on that computer, just one Mysql
database server, and only one database with one table.

Here are the specific details:

An example of the error message I get: "[TCX][MyODBC]Incorrect key file for
table: 'domain'. Try to repair it"

This happens while inserting a large number rows at high speed being read
from a text file.  It crashes usually around the 1,000,000th inserted row
into a table.

Hardware: Atlas CS9000
Operating system: Windows 98 Second Edition 4.10.A
CPU: One Intel Pentium III/Coppermine Processor 800Mhz
Motherboard: Shuttle AV11 VIA 693A Motherboard with PC133 & UDMA66 Support
Memory 128MB PC-133 SDRAM

Server version  3.23.32
Protocol version 10
Connection  localhost via TCP/IP
TCP port  3306
Uptime:   19 hours 50 min 34 sec
Threads: 2  Questions: 4551989  Slow queries: 0  Opens: 13  Flush tables: 1
Open tables: 0 Queries per second avg: 63.723

Here is the contents of the mysql.err error log:

C:/MYSQL/bin/mysqld-opt.exe: ready for connections
010207 23:32:23  C:/MYSQL/bin/mysqld-opt.exe: Normal shutdown
010207 23:32:23  C:/MYSQL/bin/mysqld-opt.exe: Shutdown Complete
C:/MYSQL/bin/mysqld-opt.exe: ready for connections

mysqladmin status gives:

Uptime: 71416  Threads: 2  Questions: 4551985  Slow queries: 0  Opens: 13
Flush tables: 1  Open tables: 0 Queries per second avg: 63.739

+--+--+
| Variable_name| Value|
+--+--+
| Aborted_clients  | 0|
| Aborted_connects | 0|
| Bytes_received   | 0|
| Bytes_sent   | 0|
| Connections  | 8|
| Created_tmp_disk_tables  | 0|
| Created_tmp_tables   | 0|
| Created_tmp_files| 0|
| Delayed_insert_threads   | 0|
| Delayed_writes   | 0|
| Delayed_errors   | 0|
| Flush_commands   | 1|
| Handler_delete   | 0|
| Handler_read_first   | 1|
| Handler_read_key | 0|
| Handler_read_next| 0|
| Handler_read_prev| 0|
| Handler_read_rnd | 0|
| Handler_read_rnd_next| 8|
| Handler_update   | 0|
| Handler_write| 4544830  |
| Key_blocks_used  | 7764 |
| Key_read_requests| 38159880 |
| Key_reads| 3032717  |
| Key_write_requests   | 9364345  |
| Key_writes   | 9364345  |
| Max_used_connections | 1|
| Not_flushed_key_blocks   | 0|
| Not_flushed_delayed_rows | 0|
| Open_tables  | 0|
| Open_files   | 0|
| Open_streams | 0|
| Opened_tables| 13   |
| Questions| 4551966  |
| Select_full_join | 0|
| Select_full_range_join   | 0|
| Select_range | 0|
| Select_range_check   | 0|
| Select_scan  | 0|
| Slave_running| OFF  |
| Slave_open_temp_tables   | 0|
| Slow_launch_threads  | 0|
| Slow_queries | 0|
| Sort_merge_passes| 0|
| Sort_range   | 0|
| Sort_rows| 0|
| Sort_scan| 0|
| Threads_cached   | 0|
| Threads_created  | 7|
| Threads_connected| 2|
| Threads_running  | 1|
| Uptime   | 71310|
+--+--+

+-+-

-+
| Variable_name   | Value
|
+-+-

-+
| ansi_mode   | OFF
|
| back_log| 50
|
| basedir | c:\my

Re: Help - SQLBindParameter not used for all parameters error

2001-02-08 Thread Miguel Angel Solórzano

At 10:10 09/02/2001 +0800, Li Sze wrote:
Hi Li,

I will take a look in MyODBC code about the SQLBindParameter and
when I will have a reasonable answer I will send you the reply.

Regards,
Miguel

>Thanks for responding. I've changed the column back to size 1. However, if I
>follow the example from the Microsoft Documentation, that is setting the
>last parameter to &cbValue where cbValue = SQL_NTS, and BufferLength to 0, I
>get a handling exception error when the last SQLParamData is called. The
>SQLParamData is used for my last column where I insert binary data using
>SQLPutData.
>
>The example is for a string of length more than 1 and as such I do not know
>if there is a different workaround to this for single character entries. I
>have tried applying all the working examples that I have come arcross to my
>program but to no avail. I really have no idea what is going on here. Are
>there any other approaches that I may try out?
>
>Thanks,
>lisze
>
> > At 17:05 08/02/2001 +0800, Li Sze wrote:
> > Hi!
> >
> > If you only need room for 1 character you don't need a column with
> > size 2.
> > The last parameter of SQLBindParameter is a pointer to a buffer for the
> > parameter's length.
> >
> > Then error HY090 means:
> >
> > (DM) The argument ParameterValuePtr was a null pointer, the argument
> > StrLen_or_IndPtr was a null pointer, and the argument InputOutputType was
> > not SQL_PARAM_OUTPUT.
> > (DM) SQL_PARAM_OUTPUT, where the argument ParameterValuePtr was a null
> > pointer, the C type was char or binary, and the BufferLength (cbValueMax)
> > was greater than 0.
> >
> > Take a look in the sample from Microsoft Documentation:
> >
> > #define SALES_PERSON_LEN 10
> > #define STATUS_LEN 6
> >
> > SQLSMALLINT  sOrderID;
> > SQLSMALLINT  sCustID;
> > DATE_STRUCT  dsOpenDate;
> > SQLCHAR szSalesPerson[SALES_PERSON_LEN];
> > SQLCHAR szStatus[STATUS_LEN);
> > SQLINTEGER  cbOrderID = 0, cbCustID = 0, cbOpenDate = 0, cbSalesPerson
> > = SQL_NTS,
> > cbStatus = SQL_NTS;
> > SQLRETURN retcode;
> > SQLHSTMT hstmt;
> >
> > /* Prepare the SQL statement with parameter markers. */
> > retcode = SQLPrepare(hstmt,
> > "INSERT INTO ORDERS (ORDERID, CUSTID, OPENDATE, SALESPERSON,
> > STATUS) VALUES (?, ?, ?, ?, ?)", SQL_NTS);
> > if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
> > /* Specify data types and buffers for OrderID, CustID, OpenDate,
> > SalesPerson, */
> > /* Status parameter data. */
> > SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SSHORT,
> > SQL_INTEGER, 0, 0, &sOrderID, 0, &cbOrderID);
> > SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_SSHORT,
> > SQL_INTEGER, 0, 0, &sCustID, 0, &cbCustID);
> > SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_TYPE_DATE,
> > SQL_TYPE_DATE, 0, 0, &dsOpenDate, 0, &cbOpenDate);
> > SQLBindParameter(hstmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR,
> > SQL_CHAR, SALES_PERSON_LEN, 0, szSalesPerson, 0, &cbSalesPerson);
> > SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR,
> > SQL_CHAR, STATUS_LEN, 0, szStatus, 0, &cbStatus);
> > /* Specify first row of parameter data. */
> > sOrderID = 1001;
> > sCustID = 298;
> > dsOpenDate.year = 1996;
> > dsOpenDate.month = 3;
> > dsOpenDate.day = 8;
> > strcpy(szSalesPerson, "Johnson");
> > strcpy(szStatus, "Closed");
> >
> > /* Execute statement with first row. */
> > retcode = SQLExecute(hstmt);
> > /* Specify second row of parameter data. */
> > sOrderID = 1002;
> > sCustID = 501;
> > dsOpenDate.year = 1996;
> > dsOpenDate.month = 3;
> > dsOpenDate.day = 9;
> > strcpy(szSalesPerson, "Bailey");
> > strcpy(szStatus, "Open");
> >
> > /* Execute statement with second row. */
> > retcode = SQLExecute(hstmt);
> > }
> >
> > Regards,
> > Miguel
> >
>
> >
> > >I have trouble writing a character into the database (the column is
> > >declared as char(2) not null) because I figured that if it appends a null
> > >at the end of the character data I want to insert (i.e.'A\0'), it would
> > >still fit. I bound the parameters first before assigning the data and
> > >executing a statement to write into the database. This is how I bind it:
> > >
> >
> >---
>
> > >g_rc = SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR,
> > >2, 0, (SQLPOINTER)chDataPart, 1, NULL);
> > >->if I put NULL in the last parameter in the SQLBindParameter function, I
> > >get the following error for the SQLParamData function call,
> > >
> > >Error code: HY090
> > >Error message: SQLBindParameter not used for all parameters.
> > >
> > >However, I see many working examples that sets the last parameter to NULL
> > >when it is a string. I'm not sure if it works for a character. I've
> > >checked the manual and list archives and found out that the above error
> > >message means [there is an error in the number of parameters in an insert
> > >statement]. What does this mean?
> > >
> >
> >--

Re: MySQL vs Access; you'd *think* the choice is obvious...

2001-02-08 Thread Jonor Lacuesta

OBDC's strength is that it is almost universal in accessing files, not 
speed, and that may be the reason why using the jet engine will produce 
quicker results. I don't know if it will work on your end, but I moved from 
using MyOdbc to the following statement in accessing mysql database:

strConnection = 
"driver={MySQL};server=localhsot;uid=username;pwd=password;database=databasename"

I use that in my asp applications.



At 06:02 AM 2/9/2001, Quickling wrote:
>Hi,
>
>Question 1:
>---
>We've got a server app that does a lot of 'small' database reads and 
>writes.  We were originally using MS Access via DAO (Jet Engine) and we 
>wanted to tighten up DB performance, so we've written a general ODBC 
>database wrapper object, but mainly just to connect to MySQL.  I figured 
>there'd be ODBC overhead, but its a lot worse than I imagined.
>
>I want to know: does it make sense that our original system, connecting 
>via 'Jet-engine' to Access, is actually much faster than connecting to 
>MySQL via ODBC?  This seems to be what's happened.
>
>I'm wondering if it has to do with the overhead of connecting to a 
>server-based database via a tcp socket (even on localhost) rather than the 
>direct-to-disk Jet engine; maybe because we do so many small reads/updates 
>it's actually faster with Access?  Any thoughts?  Is it worth my time to 
>look into using MySQL directly instead of thru ODBC?
>
>I'm obviously working on Windows (NT), connecting at ODBC version 2.0 to 
>MySQL server 3.23, using a database converted directly from Access to 
>MySQL using the cool (but unstable) DBTools GUI, which kindly retained all 
>keys and indexes (which have been reviewed for speed).
>
>
>Question 2:
>---
>Is there any way in MySQL to compute, inline SQL, the difference between 
>two datetime values?  I couldn't find a function which could do anything 
>but subtract intervals from datetimes...  what I need is the interval!
>
>
>Many thanks in advance,
>
>Jesse
>
>-
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/   (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

*
Jonor Lacuesta
Systems Administrator
Philippinemail.com

"Send free postal letters to the Philippines FREE"
http://www.philippinemail.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: Help with SQL statement please.

2001-02-08 Thread Rolf Hopkins

A recursive algorithm is the term used for an algorithm where a function
calls itself.  Listing the entire directory structure of your hard drive
would employ such an algorithm.  Any good book on programming should explain
recursive algorithms.  You may find that helpful.


- Original Message -
From: "Phil Latio" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 20:52
Subject: Re: Help with SQL statement please.


> I see, I need a recursive algorithm
>
> Can you get them in Woolworths?
>
>
>
> - Original Message -
> From: "Tommie Jones" <[EMAIL PROTECTED]>
> To: "Phil Latio" <[EMAIL PROTECTED]>
> Cc: <>
> Sent: Thursday, February 08, 2001 12:18 PM
> Subject: Re: Help with SQL statement please.
>
>
> > If I am not mistaken I think you are trying to do a nested select.
> >
> > This is not possible in Mysql.  I've had similar problems.
> > You will have to use some sort of recursive algorithm in your perl code
> > (if you are using perl)
> > to accomplish this.
> > Phil Latio wrote:
> > >
> > > I hope somebody may of come across this sort of problem before dealing
> with
> > > counting total records in subcategories.
> > >
> > > I have two tables sslinks which contains links (URL) information and
> > > sslinkcats which contains category information.
> > >
> > > The category table "sslinkcats" has a field called "lcat_id" (which is
> an
> > > autonumber) and also "lcat_cat" which is the "lcat_id" value of the
> parent
> > > category. For example cricket would be under sport and the "lcat_cat"
of
> > > cricket would be "lcat_id" of sport.
> > >
> > > The problem is that the below statement will only count the number of
> links
> > > in each particular category.
> > >
> > > $sql = "SELECT sslinkcats.lcat_id, COUNT(*) AS NumLinks
> > >  FROM sslinks, sslinkcats
> > >  WHERE link_cat = sslinkcats.lcat_id
> > >  AND link_validated = 'yes'
> > >  GROUP BY link_cat";
> > >
> > > I want to display the total amount of links under the category sport
to
> > > include all subcategories like football,cricket,cricket rugby. Also if
> > > cricket had subcategories, then I would these counted too.
> > >
> > > I am sure the answer is looking at me but I just can't see it.
Therefore
> any
> > > pointers or assistance would be very welcome.
> > >
> > > (ps. If you have read this message before, apologies but I was
informed
> that
> > > this is the correct category for this type of question. Sorry)
> > >
> > > -
> > > Before posting, please check:
> > >http://www.mysql.com/manual.php   (the manual)
> > >http://lists.mysql.com/   (the list archive)
> > >
> > > 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: auto_increment

2001-02-08 Thread Paul DuBois

At 4:00 PM -0500 2/8/01, Paul E. Miller wrote:
>I encountered something really handy while playing
>around with mysql.  The documented behavior for
>auto_increment is that it uses the next highest number no
>matter what.
>
>I noticed though, when I have a two element primary key,
>that the auto_increment behavies in a majik uber-cool way.
>I want to use this new found majik, but I'm afraid that
>since it's not documented I won't be able to rely on it in
>future versions.
>
>Is it here to stay?

Yes, it was added in version 3.23.5.  You've discovered the meaning of
this item in the 3.23.5 change notes:

@item
One can now with MyISAM have the auto_increment part as a sub part:
@code{CREATE TABLE foo (a int not null auto_increment, b char(5), 
primary key (b
,a))}

Just make sure the AUTO_INCREMENT column is the last column of the index.

>
> Example:
>
> CREATE temporary TABLE neato (
>   type smallint unsigned not null,
>   id   smallint unsigned not null auto_increment,
>
>   PRIMARY KEY (type, id)
> );
>
> insert into neato(type)
> values (1), (1), (1), (2), (2), (2), (2);
>
> select * from neato;
>
> +--++
> | type | id |
> +--++
> |1 |  1 |
> |1 |  2 |
> |1 |  3 |
> |2 |  1 |
> |2 |  2 |
> |2 |  3 |
> |2 |  4 |
> +--++
> 7 rows in set (0.19 sec)
>
>Will it do this in the future? or just in the version I
>have?


-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




Re: Help - SQLBindParameter not used for all parameters error

2001-02-08 Thread Li Sze

Thanks for responding. I've changed the column back to size 1. However, if I
follow the example from the Microsoft Documentation, that is setting the
last parameter to &cbValue where cbValue = SQL_NTS, and BufferLength to 0, I
get a handling exception error when the last SQLParamData is called. The
SQLParamData is used for my last column where I insert binary data using
SQLPutData.

The example is for a string of length more than 1 and as such I do not know
if there is a different workaround to this for single character entries. I
have tried applying all the working examples that I have come arcross to my
program but to no avail. I really have no idea what is going on here. Are
there any other approaches that I may try out?

Thanks,
lisze

> At 17:05 08/02/2001 +0800, Li Sze wrote:
> Hi!
>
> If you only need room for 1 character you don't need a column with
> size 2.
> The last parameter of SQLBindParameter is a pointer to a buffer for the
> parameter's length.
>
> Then error HY090 means:
>
> (DM) The argument ParameterValuePtr was a null pointer, the argument
> StrLen_or_IndPtr was a null pointer, and the argument InputOutputType was
> not SQL_PARAM_OUTPUT.
> (DM) SQL_PARAM_OUTPUT, where the argument ParameterValuePtr was a null
> pointer, the C type was char or binary, and the BufferLength (cbValueMax)
> was greater than 0.
>
> Take a look in the sample from Microsoft Documentation:
>
> #define SALES_PERSON_LEN 10
> #define STATUS_LEN 6
>
> SQLSMALLINT  sOrderID;
> SQLSMALLINT  sCustID;
> DATE_STRUCT  dsOpenDate;
> SQLCHAR szSalesPerson[SALES_PERSON_LEN];
> SQLCHAR szStatus[STATUS_LEN);
> SQLINTEGER  cbOrderID = 0, cbCustID = 0, cbOpenDate = 0, cbSalesPerson
> = SQL_NTS,
> cbStatus = SQL_NTS;
> SQLRETURN retcode;
> SQLHSTMT hstmt;
>
> /* Prepare the SQL statement with parameter markers. */
> retcode = SQLPrepare(hstmt,
> "INSERT INTO ORDERS (ORDERID, CUSTID, OPENDATE, SALESPERSON,
> STATUS) VALUES (?, ?, ?, ?, ?)", SQL_NTS);
> if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
> /* Specify data types and buffers for OrderID, CustID, OpenDate,
> SalesPerson, */
> /* Status parameter data. */
> SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SSHORT,
> SQL_INTEGER, 0, 0, &sOrderID, 0, &cbOrderID);
> SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_SSHORT,
> SQL_INTEGER, 0, 0, &sCustID, 0, &cbCustID);
> SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_TYPE_DATE,
> SQL_TYPE_DATE, 0, 0, &dsOpenDate, 0, &cbOpenDate);
> SQLBindParameter(hstmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR,
> SQL_CHAR, SALES_PERSON_LEN, 0, szSalesPerson, 0, &cbSalesPerson);
> SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR,
> SQL_CHAR, STATUS_LEN, 0, szStatus, 0, &cbStatus);
> /* Specify first row of parameter data. */
> sOrderID = 1001;
> sCustID = 298;
> dsOpenDate.year = 1996;
> dsOpenDate.month = 3;
> dsOpenDate.day = 8;
> strcpy(szSalesPerson, "Johnson");
> strcpy(szStatus, "Closed");
>
> /* Execute statement with first row. */
> retcode = SQLExecute(hstmt);
> /* Specify second row of parameter data. */
> sOrderID = 1002;
> sCustID = 501;
> dsOpenDate.year = 1996;
> dsOpenDate.month = 3;
> dsOpenDate.day = 9;
> strcpy(szSalesPerson, "Bailey");
> strcpy(szStatus, "Open");
>
> /* Execute statement with second row. */
> retcode = SQLExecute(hstmt);
> }
>
> Regards,
> Miguel
>

>
> >I have trouble writing a character into the database (the column is
> >declared as char(2) not null) because I figured that if it appends a null
> >at the end of the character data I want to insert (i.e.'A\0'), it would
> >still fit. I bound the parameters first before assigning the data and
> >executing a statement to write into the database. This is how I bind it:
> >
>
>---

> >g_rc = SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR,
> >2, 0, (SQLPOINTER)chDataPart, 1, NULL);
> >->if I put NULL in the last parameter in the SQLBindParameter function, I
> >get the following error for the SQLParamData function call,
> >
> >Error code: HY090
> >Error message: SQLBindParameter not used for all parameters.
> >
> >However, I see many working examples that sets the last parameter to NULL
> >when it is a string. I'm not sure if it works for a character. I've
> >checked the manual and list archives and found out that the above error
> >message means [there is an error in the number of parameters in an insert
> >statement]. What does this mean?
> >
>
>---

> >g_rc = SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR,
> >2, 0, (SQLPOINTER)chDataPart, 1, 0);
> >->the funny thing is, if I put 0 in the last parameter in the
> >SQLBindParameter function I don't get any error but the character data
> >(i.e. 'A') that I assigned to the bound parameter would not be written
> >into the database.
> >
> >Am I missing out so

BDB

2001-02-08 Thread Michael Widenius


Hi!

> "Peter" == Peter Zaitsev <[EMAIL PROTECTED]> writes:

Peter> Hello mysql,
Peter>   1) Today I tried to reload my tables with backuing up and recovering
Peter>   whole database by mysqldump - it seems like it does not work -
Peter>   mysqld crashed during loading data back even after I've removed all
Peter>   bad tables and bdb logs to have a clean system.

Peter>   This looks like the same problem as I reported with insert test -
Peter>   BDB hanges/crashes during huge multiple insert queries.
Peter>   I've uploaded the mysqldump output wich crashes mysqld during load
Peter>   to the secret directory as layers_la00.sql.gz.
Peter>   The thing is after I've dumped the same data without the extended
Peter>   insert I could load it back without any problems.

I will look at this as after the weekend.

Peter>   2) Then I was loading the data from .sql file I saw the followings:

Peter> onyx:/spylog/db # mysqladmin processlist | grep -v Sleep
Peter> 
+-+---++-++--+---+--+
Peter> | Id  | User  | Host   | db  | Command| Time | State
 | Info
 |
Peter> 
+-+---++-++--+---+--+
Peter> | 34  | root  | localhost  | la00| Field List | 494  | Repair by 
sorting |  
|
Peter> | 36  | root  | localhost  | lacontrol   | Query  | 64   | System lock  
 | insert into layers_la00.g00keywords (counter_id,keyword) values (106339,'RSBAC')
 |
Peter> | 38  | root  | localhost  | la00| Field List | 468  | Waiting for 
table |
  |
Peter> | 39  | root  | localhost  | layers_la00 | Query  | 0| update   
 | INSERT INTO g03dirs VALUES (110912,8288,'pictures/company/itartass/calendar')   
 |
Peter> | 81  | root  | localhost  | la00| Field List | 296  | Waiting for 
table |
  |
Peter> | 121 | titan | php.local  | counter | Query  | 5| System lock  
 | SELECT lsh.begin AS period, sh.hosts7d,sh.visitors7d
Peter>  FROM layers_la00.g00layers_stat_hits AS ls |
Peter> | 125 | root  | localhost  | | Query  | 0|  
 | show processlist
 |
Peter> 
+-+---++-++--+---+--+

Peter> as you see here one thread is doing repear as this happened after
Peter> mysqld crash, but note first insert query in system lock state (I've
Peter> saw several queries at this place, but all of them spent in system
Peter> lock time several tenths of seconds) this can nothing to do with
Peter> recovery (this table was just created by mysqldump couple of minutes
Peter> before) - I habe the only explanation which looks ok the  system lock
Peter> takes place while many inserts are going to othe table (g03dirs) - as
Peter> soon as the table changed all other queries which was in system lock
Peter> state got a chance to run. The other thing is mysqldump does not uses
Peter> lock tables to insert data so this looks like real perfomance
Peter> (concurency) problem Some
Peter> more examples:

The "System Lock" means that you got some problem with fnctl() on your
system.

The fix is to restart mysqld with --skip-locking and without
--enable-locking to ensure that fcntl() lock is not used.

If you are using 'mysqldump --opt', it should generate locks for the
tables.  What command did you use ?

Peter> onyx:/spylog/db # mysqladmin processlist | grep -v Sleep
Peter> 
+-+---++-+-+--++--+
Peter> | Id  | User  | Host   | db  | Command | Time | State  | Info   
   
   |
Peter> 
+-+---++-+-+--++--+
Peter> | 36  | root  | localhost  | lacontrol   | Query   | 384  | update | replace 
into layers_la00.g00stat_404refs (layer_id,id,visitors,load

General MySQL Questions

2001-02-08 Thread Nielsen

Greetings!

I am one of the developers of a MUD, and we have recently decided to rewrite our
entire driver to C++/OOP and use MySQL to store our data, so it has become my
duty to begin to learn about all the facets of MySQL.  I have been going through
FAQs, manuals, etc, and we are also using MySQL++ to interface to the database.
Here are a few general questions that I've got at this point:

1. We would like to make saving/retrieving information from the database
non-blocking, if possible.  Does anyone have any suggestion for this?  Our
thoughts were to write an external program to fetch information and return it to
our main program;  is there any easier way to handle this?  Is it even necessary
to make calls to the database non-blocking?

2. When our driver boots and begins accepting connections, would it be more
feasible to read the various tables into memory structures, rather than querying
the database everytime we need information on a specific item within the game?

Thanks for your help!  Also, if anyone might be willing to help us in a forum
other than the list, a personal reply would be great.  (it would not, of course,
be a paying position, but just for asking advice)

---
Jon A. Nielsen
Lazarus of Spear of Insanity MUD
http://spear.kilnar.com/
telnet://spear.kilnar.com:1066/


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

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




Rookie...

2001-02-08 Thread Ravi Prashanth

Hi,

I'm a total newbie to MySQL. I am creating an application in 
Java/JSP/Oracle. However, my client wants to move to MySQL because of the 
low costs, and I have no idea about MySQL.

I just downloaded the API from MySQL.com

I now need to know the following things :
1. Is there a graphical utility (like SQL Plus for oracle) that I can use 
to manage the database ?
2. I saw something about a MySQL GUI on the site. But it was full of 
classes and stuff. How do I install/use them?
3. I saw a tcFM JDBC driver on the web. Is that the best ? Are there any 
known bugs ?
4. What are the potential problems that could arise with using MySQL in the 
long run ? How easy is it to maintain from the backend ? Do I have to 
necessarily write 'raw code' like CREATE. to create a table ?

I would really really appreciate any kind of information and/or insight 
into any of the stuff above, or even just URL's to good resources on the web.

I've been searching the web, and the resources I've been seeing are pretty 
vague and are not answering my questions.

I feel like the way I felt 5 years back  when facing the web for the first 
time - totally LOST!!

Thanks,

Ravi
http://BabyNamesIndia.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




Aborted connection (Got an error reading communication packets)

2001-02-08 Thread Jonathan Arthur

Hello,

I am experiencing a problem with aborted connections to the db. In
essence, I have an web-based application writing large amounts of data
to a mysql database. The error seems to occur randomly. The only
reproducible part of the problem seems to be that the bigger the data
set the more likely the error is to occur.

The error message in the log is:

  Aborted connection  to db: 
user:  host:  (Got an error reading communication packets)

The server is running Linux (2.2.15-4mdksmp), mysql 3.23.25-beta, and
Apache 1.3.12

Checking the newsgroups has not been particulary helpful. The two main
responses seem to be: upgrade the version of mySQL or the problem is a
network problem.

Can someone confirm whether this is a hardware problem or MySQL version
problem and/or point me in the right direction to dealing sucessfully
with this error?

Thanks for your help

Jonathan


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

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-02-08 Thread Geoff Coffey

Has anybody successfully built 3.23 on Mac OS X Public Beta? Does anybody
know if the version it supposedly builds under is a later beta? I still
can't seem to get it to work properly.

Thanks,

Geoff


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

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 127 when doing query and mysqldump

2001-02-08 Thread Daniel Pook Ngai Lin

Hi,

I am using Mysql-3.23.22.  Recently I encounter one of my database tables give me 
"error 127", whenever I do a "select *" query and mysqldump.  I did a perror command 
and it does not give me any idea what is the meaning of this error number.

Can anybody help? Thanks in advance...

Daniel



Re: Table suggestions..

2001-02-08 Thread hooker

> I am writing an application that will poll  up to 500 devices every 5
> minutes.  For this application I need to keep at least 6 months of data.  If
> I were to use a single record for every update, I would have ~25 million
> records.  Obviously this is not an ideal solution.
> 
> I am interested in getting ideas on how to tackle this.  I was thinking that
> I would have a table that stored all the values for the current day and a
> table for historical data.  After 24 hours the data would be averaged into a
> daily snapshot and stored in another table.  The data from that day would
> then be cleared.  This would only require ~90k records.
> 
> I would appreciate any ideas.  I have written a ton of web applications
> using mySQL, but have never had to scale above 100k entries :)

I've got a similar problem (tracking logins with records kept for a long
time), and my solution is a bit messy, but works. For some values of
"works" anyway. :-)

2 databases, one for current data, another for historical.

One table per day with the date included in the table name. Just after
midnight create empty tables for the next couple of days and move the
oldest table(s) into the historical database, merging the records into
a monthly table on the way. I keep 60 days of data in the current database, 
and all the rest in historical.

Historical queries tend to run a bit slower, but that's life, and people
making such requests are told this up front.

Hope this helps a little.


The Hooker
--
"If you can't copyright mistakes, how are Microsoft going to protect
Windows from pirates?'

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

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




Antwort: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread alexander . skwar


On 08.02.2001 15:09:47 Christian Ribeaud wrote:

> would like that the table put automatically the today's date for every INPUT
as
> default value. What is wrong?

Uhm, why don't you use a timestamp column type then?  Okay, it will also save
the time, but it's easy to extract only the date, if that's all your after.
With a timestamp, you could either not set any value when inserting or set it to
NULL which both would enter the current time (like in NOW()).

> Another question, 'showIt ENUM('TRUE') DEFAULT ERROR' did not work but 'showIt

Sure, because your ENUM did not contain the value 'ERROR' - it's just containing
'TRUE'.

> ENUM('TRUE','FALSE') DEFAULT FALSE' worked fine. I would like to have
something
> like bits or boolean values in my table. How to achieve this? Thanks for the

I use a TinyINT and store a 0 for FALSE and something other than 0 (like 1, or
whatever) for TRUE.  That will only take 1 byte to store what you need.



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

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 vs Access; you'd *think* the choice is obvious...

2001-02-08 Thread Eric Frazier

Hi,

One thing I have always wondered, how do you deal with table locking if you
have a number of people using mySQL with ODBC? 
Does ODBC handle it? Does Access do it? Can mySQL do it with Berkeley? 
I am esp talking if you are using mySQL from many different locations and
working on the same table. 

Thanks,


Eric 


At 05:50 PM 2/8/01 -0500, James Treworgy wrote:
>Actually there is no reason to expect MySQL to perform better than
>Access for a nominally sized database and everything running on one PC.
>Access was designed and optimized for JET whereas ODBC is a
>general-purpose API.
>
>Also, the connection method impacts this significantly, as do the
>complexity of the query.  For a simple test I did comparing connection
>methods from Access check http://www.trewtech.com/sqltest.html
>
>However, to see Access flounder horribly, simply put your MDB backend
>at the other end of an ethernet connection from your frontend.
>Now, for even more pain, add a few more users connecting to it at the
>same time.  Access is _not_ a server and the kiss of death for an
>access database is to try to use it as a backend over a network. It's
>amazing how inefficient a query is when the "server" is actually the
>network filesystem.
>
>Add in absurdly long-running bugs that Microsoft denies exist - well,
>rather, since it's extremely difficult to actually report a bug to
>Microsoft without paying them for the privilege, perhaps they just don't
know - such as
>randomly corrupting memo fields - and it's essentially useless for anything
>but a very small database with a very small number of users, or only
>running on one PC with no network.
>
>Jamie
>
>
>Regards,
> Jamesmailto:[EMAIL PROTECTED]
>
>Thursday, February 08, 2001, 5:02:59 PM, you wrote:
>Q> We've got a server app that does a lot of 'small' database reads and
>Q> writes.  We were originally using MS Access via DAO (Jet Engine) and we 
>Q> wanted to tighten up DB performance, so we've written a general ODBC 
>Q> database wrapper object, but mainly just to connect to MySQL.  I figured 
>Q> there'd be ODBC overhead, but its a lot worse than I imagined.
>
>Q> I want to know: does it make sense that our original system, connecting via 
>Q> 'Jet-engine' to Access, is actually much faster than connecting to MySQL 
>Q> via ODBC?  This seems to be what's happened.
>
>Q> I'm wondering if it has to do with the overhead of connecting to a 
>Q> server-based database via a tcp socket (even on localhost) rather than the 
>Q> direct-to-disk Jet engine; maybe because we do so many small reads/updates 
>Q> it's actually faster with Access?  Any thoughts?  Is it worth my time to 
>Q> look into using MySQL directly instead of thru ODBC?
>
>Q> I'm obviously working on Windows (NT), connecting at ODBC version 2.0 to 
>Q> MySQL server 3.23, using a database converted directly from Access to MySQL 
>Q> using the cool (but unstable) DBTools GUI, which kindly retained all keys 
>Q> and indexes (which have been reviewed for speed).
>
>
>
>-
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/   (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


Frazier Consulting
http://www.kwinternet.com/eric
(250) 655 - 9513




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

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 vs Access; you'd *think* the choice is obvious...

2001-02-08 Thread Peter Skipworth

Re your second query - without looking at the docs,
unix_timestamp(field1) - unix_timestamp(field2) would give you the
difference in seconds - I;m sure there's a cleaner way though!

On Thu, 8
Feb 2001, Quickling wrote:

> Hi,
> 
> Question 1:
> ---
> We've got a server app that does a lot of 'small' database reads and 
> writes.  We were originally using MS Access via DAO (Jet Engine) and we 
> wanted to tighten up DB performance, so we've written a general ODBC 
> database wrapper object, but mainly just to connect to MySQL.  I figured 
> there'd be ODBC overhead, but its a lot worse than I imagined.
> 
> I want to know: does it make sense that our original system, connecting via 
> 'Jet-engine' to Access, is actually much faster than connecting to MySQL 
> via ODBC?  This seems to be what's happened.
> 
> I'm wondering if it has to do with the overhead of connecting to a 
> server-based database via a tcp socket (even on localhost) rather than the 
> direct-to-disk Jet engine; maybe because we do so many small reads/updates 
> it's actually faster with Access?  Any thoughts?  Is it worth my time to 
> look into using MySQL directly instead of thru ODBC?
> 
> I'm obviously working on Windows (NT), connecting at ODBC version 2.0 to 
> MySQL server 3.23, using a database converted directly from Access to MySQL 
> using the cool (but unstable) DBTools GUI, which kindly retained all keys 
> and indexes (which have been reviewed for speed).
> 
> 
> Question 2:
> ---
> Is there any way in MySQL to compute, inline SQL, the difference between 
> two datetime values?  I couldn't find a function which could do anything 
> but subtract intervals from datetimes...  what I need is the interval!
> 
> 
> Many thanks in advance,
> 
> Jesse
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 


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

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




Re: MySQL vs Access; you'd *think* the choice is obvious...

2001-02-08 Thread James Treworgy

Actually there is no reason to expect MySQL to perform better than
Access for a nominally sized database and everything running on one PC.
Access was designed and optimized for JET whereas ODBC is a
general-purpose API.

Also, the connection method impacts this significantly, as do the
complexity of the query.  For a simple test I did comparing connection
methods from Access check http://www.trewtech.com/sqltest.html

However, to see Access flounder horribly, simply put your MDB backend
at the other end of an ethernet connection from your frontend.
Now, for even more pain, add a few more users connecting to it at the
same time.  Access is _not_ a server and the kiss of death for an
access database is to try to use it as a backend over a network. It's
amazing how inefficient a query is when the "server" is actually the
network filesystem.

Add in absurdly long-running bugs that Microsoft denies exist - well,
rather, since it's extremely difficult to actually report a bug to
Microsoft without paying them for the privilege, perhaps they just don't know - such as
randomly corrupting memo fields - and it's essentially useless for anything
but a very small database with a very small number of users, or only
running on one PC with no network.

Jamie


Regards,
 Jamesmailto:[EMAIL PROTECTED]

Thursday, February 08, 2001, 5:02:59 PM, you wrote:
Q> We've got a server app that does a lot of 'small' database reads and
Q> writes.  We were originally using MS Access via DAO (Jet Engine) and we 
Q> wanted to tighten up DB performance, so we've written a general ODBC 
Q> database wrapper object, but mainly just to connect to MySQL.  I figured 
Q> there'd be ODBC overhead, but its a lot worse than I imagined.

Q> I want to know: does it make sense that our original system, connecting via 
Q> 'Jet-engine' to Access, is actually much faster than connecting to MySQL 
Q> via ODBC?  This seems to be what's happened.

Q> I'm wondering if it has to do with the overhead of connecting to a 
Q> server-based database via a tcp socket (even on localhost) rather than the 
Q> direct-to-disk Jet engine; maybe because we do so many small reads/updates 
Q> it's actually faster with Access?  Any thoughts?  Is it worth my time to 
Q> look into using MySQL directly instead of thru ODBC?

Q> I'm obviously working on Windows (NT), connecting at ODBC version 2.0 to 
Q> MySQL server 3.23, using a database converted directly from Access to MySQL 
Q> using the cool (but unstable) DBTools GUI, which kindly retained all keys 
Q> and indexes (which have been reviewed for speed).



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

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: Backup database

2001-02-08 Thread Roger Retamoza

Hola alguien habla español. que pueda ayudarme como se hace copia de
seguridad a tablas exageradamente grande.
He consultado el comando backup table tablas, to 'ruta' .
hay otra forma?.

Gracias.


Roger Retamoza
ICQ 102090754
Barranquilla Colombia



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

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 vs Access; you'd *think* the choice is obvious...

2001-02-08 Thread William R. Mussatto

On Thu, 8 Feb 2001, Quickling wrote:

> Date: Thu, 08 Feb 2001 17:02:59 -0500
> From: Quickling <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: MySQL vs Access; you'd *think* the choice is obvious...
> 
> Hi,
> 
> Question 2:
> ---
> Is there any way in MySQL to compute, inline SQL, the difference between 
> two datetime values?  I couldn't find a function which could do anything 
> but subtract intervals from datetimes...  what I need is the interval!
Try converting both to seconds using UNIXTIME and then subtract the 
converted result.  

Second option, form the target datetime in MMDDHHMMSS format and do a 
straight comparison (assuming that the target comes from a program).

> 
> 
> Many thanks in advance,
> 
> Jesse
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 

Sincerely,

William Mussatto, Senior Systems Engineer
CyberStrategies, Inc
ph. 909-920-9154 ext. 27


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

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 vs Access; you'd *think* the choice is obvious...

2001-02-08 Thread Steve Ruby



Quickling wrote:
> 
> Hi,
> 
> Question 1:
> ---
> We've got a server app that does a lot of 'small' database reads and
> writes.  We were originally using MS Access via DAO (Jet Engine) and we
> wanted to tighten up DB performance, so we've written a general ODBC
> database wrapper object, but mainly just to connect to MySQL.  I figured
> there'd be ODBC overhead, but its a lot worse than I imagined.
> 
> I want to know: does it make sense that our original system, connecting via
> 'Jet-engine' to Access, is actually much faster than connecting to MySQL
> via ODBC?  This seems to be what's happened.
> 
> I'm wondering if it has to do with the overhead of connecting to a
> server-based database via a tcp socket (even on localhost) rather than the
> direct-to-disk Jet engine; maybe because we do so many small reads/updates
> it's actually faster with Access?  Any thoughts?  Is it worth my time to
> look into using MySQL directly instead of thru ODBC?
> 
> I'm obviously working on Windows (NT), connecting at ODBC version 2.0 to
> MySQL server 3.23, using a database converted directly from Access to MySQL
> using the cool (but unstable) DBTools GUI, which kindly retained all keys
> and indexes (which have been reviewed for speed).
> 


If your tables are very small. I've found the same thing that you
did, Access was actually faster on some small queries.. When your tables
get bigger (and it didin't take much 100,000+ rows) then Access started
to go down-hill quickly, occasional corruption, unable to repair, and very
slow on many queries.


> Question 2:
> ---
> Is there any way in MySQL to compute, inline SQL, the difference between
> two datetime values?  I couldn't find a function which could do anything
> but subtract intervals from datetimes...  what I need is the interval!
> 
> Many thanks in advance,
> 
> Jesse
> 

 UNIX_TIMESTAMP(DATE2) - UNIX_TIMESTAMP(DATE1) = seconds
 TO_DAYS(DATE2) - TO_DAYS(Date1) = days

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

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: Maximum Capacity and Stability

2001-02-08 Thread Jon Rosenberg

Well, only use Access if it's a small project.  I've used both MS SQL,
Oracle 7.3 and MySQL.  My MS db is about 8 Gigs and I've only had to rebuild
damaged tables once in the last year...I just upgraded it to SQL server
2000, and it seems fine so far, as well.  Oracle, I had bunches of problems
with..my db on oracle was around 5 gigs, but I got corruption like every few
months..not sure what the problem was, but I don't use oracle anymore.  I've
been using MySQL for about 9 months now, for a linux project, the db is only
a few hundred megs, but i've never had problems with it yet.  Speed wise, in
my projects, MS and oracle were about the same...with MySQL a little faster
than both, but MySQL can't so some of the heavier stuff that MS/Oracle
can...that's my experience with the three...it could be very different for
you, though.
jon


- Original Message -
From: "Joshua J. Kugler" <[EMAIL PROTECTED]>
To: "Chan, Kwok-Hing" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 4:24 PM
Subject: Re: Maximum Capacity and Stability


> I can't speak for the maximum capacities (but I think they are in the
manual
> or FAQ) but as to stability, I've never had MySQL crash or corrupt a
table,
> and I've been running it for several months; almost a year, actualy.
>
> j- k-
>
> On Thursday 08 February 2001 01:19, Chan, Kwok-Hing wrote:
> > Can anyone tell me the maximum capacity (number of tables, records) of
> > MySQL database,
> > and the stability comparison with other databases like MS Access,
Oracle,
> > MS SQL, etc.?
> > Since it is important for decision of database in my project.
> > Thank you very much!
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> --
> Joshua Kugler
> Associated Students of the University of Alaska Fairbanks
> Information Services Director
> [EMAIL PROTECTED]
> 907-474-7601
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail
<[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>


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

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




MySQL vs Access; you'd *think* the choice is obvious...

2001-02-08 Thread Quickling

Hi,

Question 1:
---
We've got a server app that does a lot of 'small' database reads and 
writes.  We were originally using MS Access via DAO (Jet Engine) and we 
wanted to tighten up DB performance, so we've written a general ODBC 
database wrapper object, but mainly just to connect to MySQL.  I figured 
there'd be ODBC overhead, but its a lot worse than I imagined.

I want to know: does it make sense that our original system, connecting via 
'Jet-engine' to Access, is actually much faster than connecting to MySQL 
via ODBC?  This seems to be what's happened.

I'm wondering if it has to do with the overhead of connecting to a 
server-based database via a tcp socket (even on localhost) rather than the 
direct-to-disk Jet engine; maybe because we do so many small reads/updates 
it's actually faster with Access?  Any thoughts?  Is it worth my time to 
look into using MySQL directly instead of thru ODBC?

I'm obviously working on Windows (NT), connecting at ODBC version 2.0 to 
MySQL server 3.23, using a database converted directly from Access to MySQL 
using the cool (but unstable) DBTools GUI, which kindly retained all keys 
and indexes (which have been reviewed for speed).


Question 2:
---
Is there any way in MySQL to compute, inline SQL, the difference between 
two datetime values?  I couldn't find a function which could do anything 
but subtract intervals from datetimes...  what I need is the interval!


Many thanks in advance,

Jesse

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

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




Matching escaped characters

2001-02-08 Thread Greg Ederer

I have a data item (stored as a varchar) that looks like this:

  Mel\'nikova

fieldname='Mel\'nikova' doesn't match it.  Neither does 
fieldname='Mel\\\'nikova'.  fieldname='Mel%nikova' does produce a match, 
and so does fieldname='Mel__nikova' (which leads me to believe that 
mysql treats \' as two characters, rather than as an escaped character).

Is there some way to match this string without resorting to wild cards?

Thanks


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

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




Re: PHP - working with two MySQL serwers

2001-02-08 Thread Mikel King

Or you could (if the two db servers are on the same lan) place a load
ballancer before them and the php connection wouldn't really care because the
two will look like one...;) Or you could write a connector script that checks
the 'health' of each server and then return the connect for that one.

cheers,
mikel


Anna wrote:

>  Original Message -
> From: "MB" <[EMAIL PROTECTED]>
>
> > Hi all,
> > I use replication on MySQL. One of my ideas is to generate HTML pages
> > using PHP.
> > Will I have any troubles using PHP and connecting simultaneously to both
> > servers?
> > Thanks in advance for any comments.
> >
> > Mariusz Brzezinski
>
> No.
> As long as you give them different names. :-)
> $connectionLocal=mysql_connect(bleah, bleah, bleah);
> $connectionOther=mysql_connect(bleah, bleah, bleah);
>
> Then in any mysql_query you must, of course, specify
> which connection you are using.
>
> Anna
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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

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




No Key on LIKE% (was: Performance issues.)

2001-02-08 Thread Steve Ruby



Quentin Bennett wrote:
> 
> Hi,
> 
> For an indexed column, the index is used if the start of the string is used:
> 
> LIKE 'a string of text%' may use an index
> LIKE '%any old string%' will not, since the start of the string is unknown.
> 
> The index will only be used if the server decides that it will be quicker
> than a full table scan.
> 
> Have you got the results of 'explain select ' to see if your index is
> actually being used.
> 
> Regards
> 
> Quentin


While we are (were) on the subject.. Any thoughts why like would not be
using an index in this case?

mysql> explain select * from _data where datatime like '12:00:%';
+---+--+---+--+-+--+-++
| table | type | possible_keys | key  | key_len | ref  | rows| Extra  |
+---+--+---+--+-+--+-++
| _data | ALL  | dataTime  | NULL |NULL | NULL | 5751070 | where used |
+---+--+---+--+-+--+-++
1 row in set (0.06 sec)

mysql> explain select * from _data where datatime like '12%';
+---+--+---+--+-+--+-++
| table | type | possible_keys | key  | key_len | ref  | rows| Extra  |
+---+--+---+--+-+--+-++
| _data | ALL  | dataTime  | NULL |NULL | NULL | 5751070 | where used |
+---+--+---+--+-+--+-++
1 row in set (0.00 sec)


There is a key on dataTime and there are only 94 unique values for datatime...

So why in 5.7mil rows it doesn't use key?   I have the same issue on a
datadatetime column which has 191,000 unique values and it doesn't use
the index either

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

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




FW: mysql-3.23.32-dec-osf5.1-alphaev6 dies on DECthread error in OSF1 V5.1

2001-02-08 Thread Hanneke Kroon

See bugreport below.

-Original Message-
From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
Sent:   Friday, 09 February, 2001 10:38
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject:mysql-3.23.32-dec-osf5.1-alphaev6 dies on DECthread error in OSF1 
V5.1

MySQL binary 3.23.32-dec-osf5.1-alphaev6 version dies on a Decthreads 
operating system call
>Description:
/usr/local/mysql-3.23.32-dec-osf5.1-alphaev6/bin/mysqld: ready for 
connections
010209 07:55:25  mysqld started
/usr/local/mysql-3.23.32-dec-osf5.1-alphaev6/bin/mysqld: ready for 
connections
%DECthreads bugcheck (version V3.18-042), terminating execution.
% Reason:  schReadyForInterrupt:  invalid substate 0x3 for blocked state
% Running on OSF1 V5.1(732) on Compaq AlphaServer ES40, 8192Mb; 4 CPUs, pid 
101603
010209 08:22:25  mysqld restarted
/usr/local/mysql-3.23.32-dec-osf5.1-alphaev6/bin/mysqld: ready for 
connections
%DECthreads bugcheck (version V3.18-042), terminating execution.
% Reason:  schReadyForInterrupt:  invalid substate 0x3 for blocked state
% Running on OSF1 V5.1(732) on Compaq AlphaServer ES40, 8192Mb; 4 CPUs, pid 
101851
010209 08:51:59  mysqld restarted
/usr/local/mysql-3.23.32-dec-osf5.1-alphaev6/bin/mysqld: ready for 
connections

The same error message is given for an earlier mysql version running on a 
different compaq alpha server:
/data/mysql-3.22.30-dec-osf4.0f-alphaev6/bin/mysqld: ready for connections
%DECthreads bugcheck (version V3.18-042), terminating execution.
% Reason:  schReadyForInterrupt:  invalid substate 0x3 for blocked state
% Running on OSF1 V5.1(732) on Compaq AlphaServer ES40, 4096Mb; 4 CPUs, pid 
217925
mysqld restarted on  Fri Feb 9 06:16:00 NZDT 2001
I had hoped that by going to a mysql version for 5.1 the problem would 
disappear, but it does not.

>How-To-Repeat:
It happened when creating a database,later while creating a table. This is 
done by a test program using an odbc connection, as part of an 
installation. It does not always fail on the same mysql command.
>Fix:
No known fix;

>Submitter-Id:  [EMAIL PROTECTED]
>Originator:Hanneke Kroon
>Organization:
Genesis Research & Development Corporation, Auckland New 
Zealand
>MySQL support: none
>Synopsis:  mysql-3.23.32-dec-osf5.1-alphaev6 dies on DECthread error in 
OSF1 V5.1
>Severity:  critical
>Priority:   high
>Category:  mysql
>Class:  sw-bug
>Release:   mysql-3.23.32 (Official MySQL binary)
>Environment:

System: OSF1 iris V5.1 732 alpha
Machine: alpha
Some paths:  /usr/bin/perl /sbin/make /usr/local/bin/gmake 
/usr/local/bin/gcc /usr/bin/cc
GCC: Reading specs from 
/usr/local/lib/gcc-lib/alphaev56-dec-osf4.0f/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='cc -pthread'  CFLAGS='-O4 -ansi_alias -ansi_args 
-fast -inline speed -speculate all'  CXX='cxx -pthread'  CXXFLAGS='-O4 
-ansi_alias -fast -inline speed -speculate all -noexceptions -nortti' 
 LDFLAGS=''
LIBC:
lrwxrwxrwx   1 root system17 Jan 18 16:11 /lib/libc.a -> 
../ccs/lib/libc.a
lrwxrwxrwx   1 root system17 Jan 18 16:11 /usr/lib/libc.a -> 
../ccs/lib/libc.a
Configure command: ./configure  --prefix=/usr/local/mysql 
'--with-comment=Official MySQL binary' --with-extra-charsets=complex 
--with-prefix=/usr/local/mysql --with-mysqld-ldflags=-all-static 
--disable-shared '--with-named-thread-libs=-lpthread -lmach -lexc -lc' 
--disable-shared
Perl: This is perl, version 5.005_03 built for alpha-dec_osf


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

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

2001-02-08 Thread Roger Retamoza

Hola Paul.
El campo incremento se usará en todas las versiones de MySql. es el primer
mai que recibo tambien puedes usar esto segun la ayuda.

*como crear un campo incremental
CREATE TABLE persons (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
name CHAR(60) NOT NULL,
PRIMARY KEY (id));

CREATE TABLE shirts (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
style ENUM('t-shirt', 'polo', 'dress') NOT NULL,
color ENUM('red', 'blue', 'orange', 'white', 'black') NOT NULL,
owner SMALLINT UNSIGNED NOT NULL REFERENCES persons,
PRIMARY KEY (id));

INSERT INTO persons VALUES (NULL, 'Antonio Paz');

INSERT INTO shirts VALUES
(NULL, 'polo', 'blue', LAST_INSERT_ID()),
(NULL, 'dress', 'white', LAST_INSERT_ID()),
(NULL, 't-shirt', 'blue', LAST_INSERT_ID());

INSERT INTO persons VALUES (NULL, 'Lilliana Angelovska');

INSERT INTO shirts VALUES
(NULL, 'dress', 'orange', LAST_INSERT_ID()),
(NULL, 'polo', 'red', LAST_INSERT_ID()),
(NULL, 'dress', 'blue', LAST_INSERT_ID()),
(NULL, 't-shirt', 'white', LAST_INSERT_ID());

SELECT * FROM persons;
++-+
| id | name|
++-+
|  1 | Antonio Paz |
|  2 | Lilliana Angelovska |
++-+

SELECT * FROM shirts;
++-++---+
| id | style   | color  | owner |
++-++---+
|  1 | polo| blue   | 1 |
|  2 | dress   | white  | 1 |
|  3 | t-shirt | blue   | 1 |
|  4 | dress   | orange | 2 |
|  5 | polo| red| 2 |
|  6 | dress   | blue   | 2 |
|  7 | t-shirt | white  | 2 |
++-++---+

SELECT s.* FROM persons p, shirts s
 WHERE p.name LIKE 'Lilliana%'
   AND s.owner = p.id
   AND s.color <> 'white';

++---++---+
| id | style | color  | owner |
++---++---+
|  4 | dress | orange | 2 |
|  5 | polo  | red| 2 |
|  6 | dress | blue   | 2 |
++---++---+

Ves es muy facil.


Roger Retamoza
ICQ 102090754
[EMAIL PROTECTED]
Barranquilla-Colombia



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

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




AW: Maximum Capacity and Stability

2001-02-08 Thread Stephan Skusa


If that's the case u r running it but not really using it ... !!

> -Ursprüngliche Nachricht-
> Von: Joshua J. Kugler [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 8. Februar 2001 22:24
> An: Chan, Kwok-Hing; '[EMAIL PROTECTED]'
> Betreff: Re: Maximum Capacity and Stability
>
>
> I can't speak for the maximum capacities (but I think they are in
> the manual
> or FAQ) but as to stability, I've never had MySQL crash or
> corrupt a table,
> and I've been running it for several months; almost a year, actualy.
>
> j- k-
>
> On Thursday 08 February 2001 01:19, Chan, Kwok-Hing wrote:
> > Can anyone tell me the maximum capacity (number of tables, records) of
> > MySQL database,
> > and the stability comparison with other databases like MS
> Access, Oracle,
> > MS SQL, etc.?
> > Since it is important for decision of database in my project.
> > Thank you very much!
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > To request this thread, e-mail <[EMAIL PROTECTED]>
> > To unsubscribe, e-mail
> <[EMAIL PROTECTED]>
> > Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
> --
> Joshua Kugler
> Associated Students of the University of Alaska Fairbanks
> Information Services Director
> [EMAIL PROTECTED]
> 907-474-7601
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Maximum Capacity and Stability

2001-02-08 Thread Joshua J. Kugler

I can't speak for the maximum capacities (but I think they are in the manual 
or FAQ) but as to stability, I've never had MySQL crash or corrupt a table, 
and I've been running it for several months; almost a year, actualy.

j- k-

On Thursday 08 February 2001 01:19, Chan, Kwok-Hing wrote:
> Can anyone tell me the maximum capacity (number of tables, records) of
> MySQL database,
> and the stability comparison with other databases like MS Access, Oracle,
> MS SQL, etc.?
> Since it is important for decision of database in my project.
> Thank you very much!
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 
Joshua Kugler
Associated Students of the University of Alaska Fairbanks
Information Services Director
[EMAIL PROTECTED]
907-474-7601

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

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




auto_increment

2001-02-08 Thread Paul E. Miller

I encountered something really handy while playing
around with mysql.  The documented behavior for
auto_increment is that it uses the next highest number no
matter what.

I noticed though, when I have a two element primary key,
that the auto_increment behavies in a majik uber-cool way.
I want to use this new found majik, but I'm afraid that
since it's not documented I won't be able to rely on it in
future versions.

Is it here to stay?

Example:

CREATE temporary TABLE neato (
  type smallint unsigned not null,
  id   smallint unsigned not null auto_increment, 

  PRIMARY KEY (type, id)
);

insert into neato(type) 
values (1), (1), (1), (2), (2), (2), (2);

select * from neato;

+--++
| type | id |
+--++
|1 |  1 |
|1 |  2 |
|1 |  3 |
|2 |  1 |
|2 |  2 |
|2 |  3 |
|2 |  4 |
+--++
7 rows in set (0.19 sec)

Will it do this in the future? or just in the version I
have?

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

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: Windows DSN NAme

2001-02-08 Thread kentj

Actually I got "A connection could not be made using the data source parameters
entered. Save non-verified file DSN?

"(Mr) Pekka Gaiser" wrote:

> Hi,
> I got no solution, just a few ideas, probably you have checked them already.
> - Windows DSN name doesn't matter. Type in anything you want.
> - I dont know if mysql is case sensitive when specifying the database name?
> - Ensure that mySQL accepts all referer IPs and not only "localhost". If you
> get an error like "access denied for [EMAIL PROTECTED] (using
> password: YES)" you got to change mysql's Security settings.
>
> Regards,
> Pekka
>
> > I need to set up a file DSN on my Win98 machine to access MySQL on the
> > Linux Box with the database. I have tried to setup the DSN from the
> > control panel  the process always errors out.  I know that mysql is
> > running and I know the IP of the Server.
> > I have Samba Share defined so that I can see the database directory and
> > the database from my windows machine and Using
> > KMySqlAdmin on the Linux side I have the edit grants window open for
> > this database. MyODBC is installed on the Win98 machine and I can start
> > the process of adding a new MySQL DSN from the control panel. Since the
> > Samba share makes the
> > database directory visible I will browse out there to Tad106 and select
> > the dbshare directory. In this directory is a Metrics folder
> > which is in fact a MySql database so I will specify  MetricsDsn to be
> > placed there. The next button on the Create New Data Source displays
> > "File Data Source"
> >  "Filename: ||TAD106\dbshare\MeteicsDsn.dsn"
> >  "Drive: MySQL"
> > Finish now takes me to a window called TDX mysql Driver connect asking
> > for the following:
> > Windows DSN name = ??
> > MySQL host (name or IP) = 192.168.2.5
> > MySQL database name = Metrics
> > User = %
> > Passsword = %
> > Port: (if not 3306)
> >
> > I do not know what to enter for Windows DSN NAme.
> > Everything I have tried errors out.
> >
> >
> > -
> > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> > posting. To request this thread, e-mail [EMAIL PROTECTED]
> >
> > To unsubscribe, send a message to the address shown in the
> > List-Unsubscribe header of this message. If you cannot see it,
> > e-mail [EMAIL PROTECTED] instead.
> >
> >


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

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




how do I contribute a binary distribution?

2001-02-08 Thread Eric Sven Ristad

How do I post a new binary distribution for inclusion in the page
http://www.mysql.com/downloads/mysql-3.23.html
?

I would like to contribute a standard binary distribution for DEC OSF
4.0D (Alpha) [mysql-3.23.32-dec-osf4.0d-alphaev56].  Compiling mysql
on this platform is a major pain, requiring operating system patches,
painful gcc/gmake upgrades, as well as makefile editing.  So I would
like to save someone else the trouble if possible.

Please reply directly to me.
Thanks,
Eric


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

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




optimize table LOCK

2001-02-08 Thread Steve Ruby



If OPTIMIZE TABLE appears to be writting to a temporary file
while it works (.TMM).. Why must it lock readers out of the original
table file?

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

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




libz.a error during install...

2001-02-08 Thread Sanam Azeem

Trying to install the latest version mysql-3.23.32 on AIX 4.3.  The install 
script mysql_install_db fails with the following error:

Could not load program ./bin/my_print_defaults:
Dependent module /usr/local/lib/libz.a (shr.o) could not be loaded.
Member shr.o is not found in archive

libz.a exits under /usr/local/lib but the ar command doesn't show (shr.o) 
in it.  Has anyone run into this?

Thanks.

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

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




Re: Finding Duplicates and Deleteing

2001-02-08 Thread Steve Ruby



select column1,column2,column3, count(*) as numlines
from table
group by column1,column2,column3
having numlines > 1

That will find them,, you'll have to write some script or something
to go through the results and remove the duplicates, I'm not
sure if a query that will do both at once.

Linsen Limsico wrote:
> 
> Does anyone know how to find duplicates in a table and deleting them. I can't figure 
>out how to structure the query.
> 
> Linsen

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

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: Finding Duplicates and Deleting

2001-02-08 Thread Steve Ruby



"Carsten H. Pedersen" wrote:
> 
> > Does anyone know how to find duplicates in a table and deleting
> > them. I can't figure out how to structure the query.
> >
> > Linsen
> 
> http://www.bitbybit.dk/mysqlfaq/faq.html#ch7_6_0
> 
> / Carsten
> --
> Carsten H. Pedersen
> keeper and maintainer of the bitbybit.dk MySQL FAQ
> http://www.bitbybit.dk/mysqlfaq


I wouldn't recommend that solution for a large table, it will
take forever and require enough disk space for a potentialy
very large index.. not to mention it has to modify
your existing index file since indexes are not in separate
containers...  Not to mention the fact that alter table
must copy the entire table to another temp table and
lock out writters..

If you have very small tables I suppose that is a reasonable
solution.

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

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 help with mysql++...I'm very frustrated.

2001-02-08 Thread Mike W. Baranski

All of the examples from teh mysql++ docs show hte connection as:
Connection con("mysql_cpp_data");
whenever I run this statement, I get a seg fault.  What is the problem? 
My permissions are okay, I don't need any for mysql.  Someone please
help, I'm stuck here and this is not good.  I'm using RedHat 7 and gcc
2.96.

MWB.
-- 
*
Mike W. Baranski
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Web  : http://www.secmgmt.com
Phone: 919-788-9200
Fax  : 919-510-0037

P.O. box 30099
Raleigh, N.C. USA 27622
*

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

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: Finding Duplicates and Deleteing

2001-02-08 Thread The Tilghman

Depending upon the function of the table, you might consider
designing your table such that duplicates aren't possible (e.g.
putting a UNIQUE index on a column or set of columns).

Other than that, try dumping your table, removing the rows you
don't want, and reloading the table.

-Tilghman

-- 
"There cannot be a crisis today.  My schedule is already full."
 --Henry Kissinger

> -Original Message-
> From: Linsen Limsico [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 08, 2001 12:09
> 
> Does anyone know how to find duplicates in a table and 
> deleting them. I can't figure out how to structure the query.

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

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




RE: problems running mySQL via Telnet

2001-02-08 Thread The Tilghman

I suppose you mean that you've been using telnet to access the
server and mysql to access the mysql server.  From a security
standpoint, you should probably install sshd, deinstall telnet,
rsh, rexec, etc. and use ssh exclusively to login to your server.
Of course, this is only a tiny piece of an overall security
strategy, and you should invest some time in developing a complete
security solution, if you haven't already.

However, this is now almost completely off-topic.

-Tilghman

-- 
"There cannot be a crisis today.  My schedule is already full."
 --Henry Kissinger

> -Original Message-
> From: John Jensen [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 18:10
> 
> Alright, you've got me worried.
> I have been using telnet to access mysql. Could that have something 
> to do with the problems I have been having with the server? (The root 
> password was erased, but there was no other evidence of a breakin.)
> 
> On 8 Feb 2001, at 7:56, Quentin Bennett wrote:
> 
> > You don't connect to mysql server using telnet, you use the mysql
> > command line client 'mysql'.
> > 
> > -Original Message-
> > From: @ndYD [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, 8 February 2001 07:13
> > 
> > server version: 3.22.34-shareware-debug
> > OS: Windows 98
> > 
> > I tried to access the mySQL- server via the Win-Telnet Client.
> > 
> > If the connection is established, the following mysterious string
> > appears:
> > 
> > (
> >  3.22.34-shareware-debugk7qS,~Z),
> > 
> > After that, I entered some characters.
> > Then the connection will be closed by the server and the 
> error string
> > "Bad Handshake" appears.
> > 
> > Question:
> > Is this feature (Telnet) not available in the 
> shareware-version. Or is
> > this a basically problem?

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

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




Re: Problems with mySQL and DBTools

2001-02-08 Thread webmaster

do any one knows about a mailling list of oracle? wich is the eamil 
address for subscribing to it? please mail me back ASAP, cheers

On Thu, 8 Feb 2001, clay bond wrote:

> Date: Thu, 8 Feb 2001 13:23:08 -0500 (EST)
> From: clay bond <[EMAIL PROTECTED]>
> To: unlisted-recipients:  ;
> Cc: [EMAIL PROTECTED]
> Subject: Re: Problems with mySQL and DBTools
> 
> 
> 
> On Thu, 8 Feb 2001, Curtis, Lorenzo wrote:
> 
> > 2.  Is there a detailed outline to use to compile Apache with PHP and mySQL
> > effectively?
> 
> www.devshed.com/Server_Side/PHP/Soothingly_Seamless/print.html
> 
> --
>  /"\
>  \ /  ASCII RIBBON CAMPAIGN
>   X   AGAINST HTML EMAIL
>  / \  AND POSTINGS
> 
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> 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: Finding Duplicates and Deleting

2001-02-08 Thread Rus

I hope you have unique id in your table
Select distinct into temp table, then select each row from temp table and
delete from your_table where
field="dupl value" and id<>temp.id (in abstract syntax)

- Original Message -
From: Linsen Limsico <[EMAIL PROTECTED]>
To: mysql_list <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 8:13 PM
Subject: Finding Duplicates and Deleting


Does anyone know how to find duplicates in a table and deleting them. I
can't figure out how to structure the query.

Linsen



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

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: Blocked because of connection errors

2001-02-08 Thread Joseph Bueno

Willem Bison a écrit :
> 
> When we increase the number of connections our 3.22.25 server 'hangs':
> 
> mysql> show status;
> No connection. Trying to reconnect...
> ERROR 1129: Host 'xxx is blocked because of many connection er
> rors.  Unblock with 'mysqladmin flush-hosts'
> ERROR: Can't connect to the server
> 
> This happens when we increase MaxClients on the Apache webserver from 200 to
> 220 resulting in more queries to the db-server. After a few hours the
> db-server hangs with the above error. DB and apache server run on different
> machines.
> Apache talks with mysql through PHP 4.0.41/ZendOptimizer/Cache.
> The max connections on the db-server is set to 400.
> Linux.
> 
> More info (after restarting mysql):
> mysql> show status;
> +--+--+
> | Variable_name| Value|
> +--+--+
> | Aborted_clients  | 0|
> | Aborted_connects | 671  |
> | Created_tmp_tables   | 31067|
> | Delayed_insert_threads   | 0|
> | Delayed_writes   | 0|
> | Delayed_errors   | 0|
> | Flush_commands   | 1|
> | Handler_delete   | 221  |
> | Handler_read_first   | 23   |
> | Handler_read_key | 1413111  |
> | Handler_read_next| 26516553 |
> | Handler_read_rnd | 4318261  |
> | Handler_update   | 85123|
> | Handler_write| 182257   |
> | Key_blocks_used  | 15641|
> | Key_read_requests| 6039569  |
> | Key_reads| 50309|
> | Key_write_requests   | 3213 |
> | Key_writes   | 3005 |
> | Max_used_connections | 222  |
> | Not_flushed_key_blocks   | 0|
> | Not_flushed_delayed_rows | 0|
> | Open_tables  | 63   |
> | Open_files   | 6|
> | Open_streams | 0|
> | Opened_tables| 6547 |
> | Questions| 361413   |
> | Running_threads  | 220  |
> | Slow_queries | 6|
> | Uptime   | 2048 |
> +--+--+
> 30 rows in set (0.00 sec)
> 
> Anyone have a clue whats going on ?
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Hi,

I had the same problem.
MySQL blocked all connections from our web server frontend when
Apache was restarted at midnight (log files rotation).

I "solved" it with :
set-variable= max_connect_errors=20
in my.cnf

You should also run 'mysqladmin flush-hosts' periodically (with cron).

Hope this help 
--
Joseph Bueno
NetClub/Trader.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: Finding Duplicates and Deleteing

2001-02-08 Thread Peter Lewis

On Thu, 8 Feb 2001, Linsen Limsico wrote:

> Does anyone know how to find duplicates in a table and deleting them. I can't figure 
>out how to structure the query.
>
> Linsen
>
Hello,
Being new to this I don't know the coding however I would look at making
another table and then use the UNIQUE command to place these unique
(not duplicated) entires into the table.


Regards
Peter
[EMAIL PROTECTED]


-- 

Blessings are upon the head of the just: but violence covers the mouth
of the wicked.


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

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: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread Carsten H. Pedersen

> I tried the following code:
> 
> CREATE TABLE news (... published date DEFAULT 'NOW()' NOT NULL, 
> ..., showIt ENUM('TRUE') DEFAULT ERROR, ...);
> 
> and I was surprised to get an '-00-00' as date after doing a 
> SELECT. I would like that the table put automatically the today's 
> date for every INPUT as default value. What is wrong?

First of all, you're trying to use the STRING 'NOW()' as a
default value in a DATE field. MySQL will try to convert this
string to a date on every insert, fail, and use the zeroed date
instead.

Secondly, MySQL does not accept functions as default values.
You should use the function only on INSERT.

> Another question, 'showIt ENUM('TRUE') DEFAULT ERROR' did not 
> work but 'showIt ENUM('TRUE','FALSE') DEFAULT FALSE' worked fine. 
> I would like to have something like bits or boolean values in my 
> table. How to achieve this? Thanks for the help and have a nice day.

ERROR cannot be a default value, unless you specify it as part of
the enumeration. If you need TRUE/ERROR, define ERROR instead of
FALSE. If you need a tri-state value, use 'TRUE', 'FALSE', 'ERROR'
as the enumneration values.

... or I don't get what you're trying to do...

/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq


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

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: Finding Duplicates and Deleting

2001-02-08 Thread Anna

>- Original Message -
>From: "Linsen Limsico"

>Does anyone know how to find duplicates in a table and >deleting them. I
can't figure out how to structure the query.

>Linsen

Exact duplicates or where only one field is duplicated?

Anna


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

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




Re: Problems with mySQL and DBTools

2001-02-08 Thread clay bond



On Thu, 8 Feb 2001, Curtis, Lorenzo wrote:

> 2.  Is there a detailed outline to use to compile Apache with PHP and mySQL
> effectively?

www.devshed.com/Server_Side/PHP/Soothingly_Seamless/print.html

--
 /"\
 \ /ASCII RIBBON CAMPAIGN
  X AGAINST HTML EMAIL
 / \AND POSTINGS


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

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 1130: Host '' is not allowed to connect to this MySQL server

2001-02-08 Thread Atle Veka


Please look in the mysql manual before you ask questions (if you already
haven't)

http://www.mysql.com/doc/P/r/Privilege_system.html

:)

--Atle

On Thu, 8 Feb 2001, Jen Carroll wrote:

> I am getting the same error when I try to connect. Mine is a brand new
> install. Have you have any luck trouble shooting this problem?
> 
> Jen
> 
> 
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 


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

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




AW: С API help

2001-02-08 Thread Dingfelder Andy

Hello Konstantin,

this code is buggy, because 'new' is not a valid C operator.
And MYSQL is a struct not an object.

The 'new' operator allocates memory for objects (C++).
In C you?ve to use the malloc function.

Take a look at the libmysqltest example, which comes with your distribution.

Regards
Andy


> -Ursprungliche Nachricht-
> Von: Konstantin Osipov [mailto:[EMAIL PROTECTED]]
> Gesendet: Donnerstag, 8. Februar 2001 10:30
> An: [EMAIL PROTECTED]
> Betreff: ó API help
>
>
> Hi All!
>
> Is this code buggy?
> --
> MYSQL* mysql = new MYSQL;
>
> mysql_init(mysql);
>
> mysql_real_connect(mysql, "localhost");
> /* some work*/
> mysql_close(mysql);
> mysql_real_connect(mysql, "otherhost");
> /* some work*/
> mysql_close(mysql);
>
> delete mysql;
> --
> In other words, if struct MYSQL allocated manually, should i call
> mysql_init(mysql) after mysql_close(mysql) if i want to connect using this
> struct to other database?
>
>
> WBW, Konstantin
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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: Finding Duplicates and Deleting

2001-02-08 Thread Carsten H. Pedersen

> Does anyone know how to find duplicates in a table and deleting 
> them. I can't figure out how to structure the query.
> 
> Linsen

http://www.bitbybit.dk/mysqlfaq/faq.html#ch7_6_0

/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq
 

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

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




Re: table too big to dump?

2001-02-08 Thread Vivek Khera

> "BR" == Brian Reichert <[EMAIL PROTECTED]> writes:

BR> When I try to do a mysqldump on the localhost, I get an out-of-memory
BR> error:

BR>   # mysqldump -uroot -proot customer audit_trail_271
BR>   mysqldump: Out of memory (Needed 8164 bytes)
BR>   mysqldump: Got error: 2008: MySQL client run out of memory

By default mysql client reads the whole result set into memory then
writes the output.  You can alter this behavior with the "-q" option
to mysqldump, so it writes out as it reads from the server without
buffering in memory.

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

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




Finding Duplicates and Deleteing

2001-02-08 Thread Linsen Limsico

Does anyone know how to find duplicates in a table and deleting them. I can't figure 
out how to structure the query.

Linsen



Re: how to get SELECT to return 0 or 1 for WHERE match ?

2001-02-08 Thread Rus

Check manual on ISNULL or another MYSQL functions that deal with NULL and
return 0 or 1.

- Original Message -
From: S A <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 3:34 AM
Subject: how to get SELECT to return 0 or 1 for WHERE match ?


>
> I want to SELECT on one term & have the SELECT return as quickly as
possible on the first TRUE instance.
>
> Ideally I'd like it to after the first matching case stop looking for
other matches ( for speed ) and return 1. If there's no matches at all I
want it to return 0.
>
> This works OK but returns either the date or an empty set.
>
> SELECT thread_last_post_date FROM threads WHERE thread_last_post_date >
'2001-02-01' LIMIT 1;
>
> I know from Perl or PHP I can check the number of returned rows but I'd
like something that just returns 0 or 1 so I don't have to special case.
>
> I'd like something like below but which work (it returns 2 rows of 1 for
some reason ) :
>
> SELECT 1 FROM threads WHERE thread_last_post_date > '2001-02-01' LIMIT 1;
>
> thanks,
>
> - Sam.
>
>
>
> -
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.




Re: developer wanted

2001-02-08 Thread Leonardo Dias

Danial Subhnai wrote:
> 
> Hi,
> 
> We require a developer with very good  Mysql  skills and experiance of
> getting big databases running fast.
> 
> The database structure is built but we need someone to look it over and
> tune it up to run much faster than it does at the moment.  DB is spread
> over 5tables, one with 3million records.
> 
> We need to get it running fast enough for the web.
> 
> Prob only one or two days work via Telnet.
> 
> This is quite urgent so anyone interested, please respond ASAP.

Would someone from BRazil do it?

-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

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

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 daemon fails to start.

2001-02-08 Thread kentj

 Suse 7.0 when I ran rpm -Uhv MySql*3.23.32-1.i386.rpm against the sever, the
client and the
shared rpms.It ran without error and created the appropriate files on  a 10 gig
/var/lib/mysql.
I moved the contents of mysql to /dbshare and created a symbolic link in /var/lib

called mysql which pointed to /dbshare.I had that error  until I set the
ownership of the link, /dbshare,
/dbshare/mysql and everything in /dbshare/mysql  to "mysql w group root". When I
did that, safe_mysqld was successful in starting mysql from root. You mught look
at the permissions
and ownership of your   /usr/sbin/mysqld: and everything in it. The only thing
which should have an ownership
and group of mysql/deamon is myslq.sock. everything else should be mysql/? maybe
root.



Ezequiel Chernitsky wrote:

> Hi,
>
> After trying to install mysql succesfully on RH7 (yes, it finally
> worked), I discovered that the daemon doesn´t start at boot. I tailed
> the log and it says this:
>
> 010208 10:25:03  mysqld started
> 010208 10:25:04  /usr/sbin/mysqld: Can't find file: './mysql/host.frm'
> (errno: 13)
> 010208 10:25:04  mysqld ended
>
> Can someone explain me what´s wrong?
>
> Thanks!!!
>
> Ezequiel.
>
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.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


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

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 1130: Host '' is not allowed to connect to this MySQL server

2001-02-08 Thread Jen Carroll

I am getting the same error when I try to connect. Mine is a brand new
install. Have you have any luck trouble shooting this problem?

Jen


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

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




RE: Table suggestions..

2001-02-08 Thread Carsten H. Pedersen

> I am writing an application that will poll  up to 500 devices every 5
> minutes.  For this application I need to keep at least 6 months 
> of data.  If
> I were to use a single record for every update, I would have ~25 million
> records.  Obviously this is not an ideal solution.

Why not? Given the proper HW and a carefully designed table layout, 
MySQL would have no trouble handling this amount of data. MySQL may 
have trouble handling 100 inserts/minute if you need to extract a 
lot of data at the same time, but that's a different beast entirely.
Remember that MySQL was built to effectively handle e.g. SELECTs on
huge amounts of data, while concurrency on e.g. INSERTS/UPDATE/SELECTs
has always had a lower priority.

> I am interested in getting ideas on how to tackle this.  I was 
> thinking that
> I would have a table that stored all the values for the current day and a
> table for historical data.  After 24 hours the data would be 
> averaged into a
> daily snapshot and stored in another table.  The data from that day would
> then be cleared.  This would only require ~90k recoo s.
> 
> I would appreciate any ideas.  I have written a ton of web applications
> using mySQL, but have never had to scale above 100k entries :)

I would consider writing the log data into a flat file, then import
it into MySQL, with reasonable intervals, say every half hour or so.
Once a day (or once a week?), I would execute a query to delete old 
records.

- though I wonder: If you're only interested in the daily average, then
why do you need to poll every 5 minutes???

/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq

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

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: Size limitations.

2001-02-08 Thread Carsten H. Pedersen

> Hi all.
> 
> Apologies for not lurking long and if this question is answered 
> somewhere I
> haven't yet found, but I'm on a timescale here...
> 
> My company is looking to use MySQL on free *nix (FreeBSD or 
> Linux) to store
> some text data and a *lot* of BLOB data.
> 
> I am trying to check that MySQL will cope with the volumes.  My longest
> table will be between one and two million records, and I intend to hold
> approaching a terabyte of BLOB data in 45-60kB objects.
> 
> Can anyone give me a quick yes/no and a heads up on problems or where to
> find documentation please?

As for max. sizes etc.:
http://www.bitbybit.dk/mysqlfaq/faq.html#ch9_0_0
See also the crash-me pages at the MySQL web site.

A search in the mailing list archives should give
you some hints on how to handle large data sets; 
the subject comes up every now and then...

/ Carsten
--
Carsten H. Pedersen
keeper and maintainer of the bitbybit.dk MySQL FAQ
http://www.bitbybit.dk/mysqlfaq


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

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




Finding Duplicates and Deleting

2001-02-08 Thread Linsen Limsico

Does anyone know how to find duplicates in a table and deleting them. I can't figure 
out how to structure the query.

Linsen



Building mysql-3.23.32 on AIX-4.3.2 with IBM's C++ v5 compiler...

2001-02-08 Thread Ciaran.Deignan



Hi All,

I've built previous versions of mysql with gcc/g++ or other IBM
C++ compilers, but I'm having some problems with their VisualAge C++
V5.0.1 compiler.

Curently I have an error while compiling sql/sql_lex.cc. My command-line
(reduced to the minimum) is
xlC_r -DMYSQL_SERVER -DHAVE_CONFIG_H -I../../db-3.2.3h/build_unix \
  -I./../include -I./../regex -DHAVE_INT_8_16_32 \
  -DUNDEF_HAVE_INITGROUPS -c sql_lex.cc
which produces the following error messages:

"/usr/include/netinet/in.h", line 377.17: 1540-1125 (W) The data member "char 
ip_opts[40]" cannot have the same name as its containing class.
"item_sum.h", line 173.31: 1540-0063 (S) The text "*" is unexpected.
"item_sum.h", line 208.31: 1540-0063 (S) The text "*" is unexpected.
"sql_map.h", line 49.10: 1540-0274 (S) The name lookup for "map_file" did not find a 
declaration.
"sql_map.h", line 37.24: 1540-1298 (I) "mapped_files *map_file(const my_string, byte 
*, uint)" needs to be declared in the containing scope to be found by name lookup.

A relavent extract from item_sum.h is

class Item_avg_field :public Item_result_field { public:
  Field *field;
  Item_avg_field(Item_sum_avg *item);
  enum Type type() const { return FIELD_AVG_ITEM; }
  double val();
  longlong val_int() { return (longlong) val(); }
  String *val_str(String*);
  void make_field(Send_field *field);
  void fix_length_and_dec() {}
};

Can anyone suggest a modification?

After running configure I modified congig.h to decalre
HAVE_GETHOSTBYNAME_R_RETURN_INT (although AIX's basic gethostbyname is
itself thread-safe).

I also modified include/*global.h to remove "_AIX32_CURSES", since
the AIX-3.2 version of the include defines bool as a char which the
compiler didn't like.

Thanks for any pointers,
Ciaran


+-+
Ciaran DeignanTel: (France) 04 76 29 79 92
BULL XS-BU (http://www-frec.bull.com) HA and Consolidation

Mail to: [EMAIL PROTECTED]Bullcom: 229 79 92
PGP: B1 78 FB 88 FD 86 58 A8  89 7B 22 8C D0 E8 71 FC   Fax: 229 75 18
+-+


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

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: Client library - Exception handling?

2001-02-08 Thread Chris Hundley

Are you suggesting that I look at the mysql++ code as an example, or actually use the
mysql++ code instead of the "mysql.h" included libraries?

Chris

Sinisa Milivojevic wrote:

> Chris Hundley writes:
>  > Can I implement some sort of exception handling when using the mySQL
>  > client library? I'm running an application and when I issue a query with
>  > an error in it, I catch the error and print output, but the software
>  > throws a general exception. Should this code be in a
>  > try
>  > {
>  >
>  > }
>  > catch
>  > {}
>  >
>  > routine? If so, what type of exception should I be catching? Sorry if
>  > this is a stupid question, I'm newer to C++.
>  >
>  > Chris
>  >
>  >
>
> Hi!
>
> This feature is fully supported in our C++ API, MySQL++, which even
> has two different optional ways in catching the errors, as explained
> in it's manual.
>
> Regards,
>
> Sinisa
>
>     __ _   _  ___ ==  MySQL AB
>  /*/\*\/\*\   /*/ \*\ /*/ \*\ |*| Sinisa Milivojevic
> /*/ /*/ /*/   \*\_   |*|   |*||*| mailto:[EMAIL PROTECTED]
>/*/ /*/ /*/\*\/*/  \*\|*|   |*||*| Larnaka, Cyprus
>   /*/ /*/  /*/\*\_/*/ \*\_/*/ |*|
>   /*/^^^\*\^^^
>  /*/ \*\Developers Team
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


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

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




developer wanted

2001-02-08 Thread Danial Subhnai

Hi,

We require a developer with very good  Mysql  skills and experiance of 
getting big databases running fast.

The database structure is built but we need someone to look it over and 
tune it up to run much faster than it does at the moment.  DB is spread 
over 5tables, one with 3million records.

We need to get it running fast enough for the web.

Prob only one or two days work via Telnet.

This is quite urgent so anyone interested, please respond ASAP.

Regards
Danial Subhani


PRO-NET INTERNET SERVICES LTD
2nd Floor Hyde House, London, NW9 6LH
Tel: +44 (0)20 8 200 3565 Fel: +44 (0)20 8 205 8365


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

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




Re: PHP - working with two MySQL serwers

2001-02-08 Thread Anna

 Original Message - 
From: "MB" <[EMAIL PROTECTED]>


> Hi all,
> I use replication on MySQL. One of my ideas is to generate HTML pages
> using PHP.
> Will I have any troubles using PHP and connecting simultaneously to both
> servers?
> Thanks in advance for any comments.
> 
> Mariusz Brzezinski

No.
As long as you give them different names. :-)
$connectionLocal=mysql_connect(bleah, bleah, bleah);
$connectionOther=mysql_connect(bleah, bleah, bleah);

Then in any mysql_query you must, of course, specify 
which connection you are using.

Anna



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

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




Parallelism.

2001-02-08 Thread Justin Rowles

Rather a tall order (still reading docs, can't see anything about this), but
can two MySQL instances  on two servers be connected to the same disks?  For
failover purposes.

Any pointers to documentation on the subject greatly appreciated.

J.
--
Justin Rowles
Technical Consultant 
Sellers Information Pack

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

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




Re: table too big to dump?

2001-02-08 Thread Brian Reichert

On Wed, Feb 07, 2001 at 05:38:49PM -0600, Dan Nelson wrote:
> It's probably trying to read the whole table into memory.  Try adding
> "--opt" to the mysqldump commandline.

OK, I've had _many_ responses that in effect say 'use -q' (--opt
is a superset).  It works.  Thanks.

Dumb question: why isn't the -q behavior the default bahavior?
Under what conditions is it advantageous to _not_ use -q?

> -- 
>   Dan Nelson
>   [EMAIL PROTECTED]

-- 
Brian 'you Bastard' Reichert<[EMAIL PROTECTED]>
37 Crystal Ave. #303Daytime number: (603) 434-6842
Derry NH 03038-1713 USA Intel architecture: the left-hand path

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

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 and PHP Question

2001-02-08 Thread Ing . Alejandro Vázquez C .

Adrian D'Costa wrote:

> Hi,
>
> I have two tables city and country
> +---+-+--+-+-++
> | Field | Type| Null | Key | Default | Extra  |
> +---+-+--+-+-++
> | id| int(5)  |  | PRI | 0   | auto_increment |
> | city  | varchar(35) |  | MUL | ||
> | countryid | int(5)  |  | MUL | 0   ||
> +---+-+--+-+-++
> 3 rows in set (0.00 sec)
>
> mysql> desc country;
> +-+-+--+-+-++
> | Field   | Type| Null | Key | Default | Extra  |
> +-+-+--+-+-++
> | id  | int(5)  |  | PRI | 0   | auto_increment |
> | country | varchar(35) |  | MUL | ||
> +-+-+--+-+-++
> 2 rows in set (0.00 sec)
>
> I am trying to write a php script that does the following.
> In an html page I have two dropdowns one country which will get the data
> from the country table and city which should get the data from the city
> table based on the one selected from the country drop down.  I do not want
> to use a submit button.  I use a javascript and using onChange pass the
> country.id to the javascript but do not know how to pass it back to the
> php script.  Any pointers
>

You have to submit via javascript the country id whenever the dropdown selection
changes. You have to be carefull using a hidden field so your php-script
recognices when you pushed your form submition button or you just had changed
your country.



>
> Adrian
>
> --
> ===
> Adrian D'Costa
> [EMAIL PROTECTED]
> www.pcsadvt.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: scale

2001-02-08 Thread Steve Ruby


Linux is a *nix...

Your best bet would be replication which would allow you to have several
copies of the database one for writting and many for reading.

see REPLICATION in the online manual.

Alternatively if your databsae is read-only and you have some high-speed
network file system then you can point many servers at it, but this 
should only be done with read-only databases.

Jacob Friis Larsen wrote:
> 
> Is it possible to run one MySQL server on more than one Linux box ?
> 
> and is this good, or should we put it on Unix machines ? We prefer Linux as
> it is free :)

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

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: [win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread John Cichy

Christian,

a DEFAULT value in a CREATE (or ALTER) statement must be a static value, try 
using a TIMESTAMP field instead.

To use 'ERROR' in as an 'ENUM' DEFAULT it must be included in the definition, 
i.e. ENUM('ERROR','TRUE')

Hope this helps...
John

On Thursday 08 February 2001 09:09, Christian Ribeaud wrote:
> Hi,
>
> I tried the following code:
>
> CREATE TABLE news (... published date DEFAULT 'NOW()' NOT NULL, ..., showIt
> ENUM('TRUE') DEFAULT ERROR, ...);
>
> and I was surprised to get an '-00-00' as date after doing a SELECT. I
> would like that the table put automatically the today's date for every
> INPUT as default value. What is wrong? Another question, 'showIt
> ENUM('TRUE') DEFAULT ERROR' did not work but 'showIt ENUM('TRUE','FALSE')
> DEFAULT FALSE' worked fine. I would like to have something like bits or
> boolean values in my table. How to achieve this? Thanks for the help and
> have a nice day. Greetings,
>
> christian
>
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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




Message in MASTER.

2001-02-08 Thread Leonardo Dias

The slave is connected to the master and is working fine. However, when
I run a SHOW PROCESSLIST in the Master, the first process in this list:

| 16920 | system user | none   | NULL  | Connect | 826 
| connecting to master | NULL

Shouldn't it be something different (since this is the master and I
don't think the master should connect to itself)?



-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

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

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




scale

2001-02-08 Thread Jacob Friis Larsen

Is it possible to run one MySQL server on more than one Linux box ?

and is this good, or should we put it on Unix machines ? We prefer Linux as
it is free :)


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

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: Will not let me set the root password

2001-02-08 Thread Gerald L. Clark

[EMAIL PROTECTED] wrote:
> 
> >Description:
> After installing using an RPM the first time and then compiling the source 
>the second time, it
> still does not allow me to give it a root password. It keeps telling me that I don't 
>have access priv's.
> I've tried it logged in as root, myself and mysql.
> >How-To-Repeat:
> It says, after I give the command mysql_install_db to make sure I set the 
>root password for
> the MySQL root user. So I enter exactly "/usr/local/mysql/bin/mysqladmin -u root -p 
>password 'new-password'", it
> then asks for a password, and every single password I throw at it, it says I don't 
>have access AHHH!
> >Fix:

It is asking you for the current password.
Since you have not set the password yet, just hit enter, or run it
without the "-p".

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

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: Size limitations.

2001-02-08 Thread Jesús Gómez Pastor

The size of Mysql tables is limitated by the max filñe size of the OS.

- Original Message -
From: "Justin Rowles" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 08, 2001 4:49 PM
Subject: Size limitations.


> Hi all.
>
> Apologies for not lurking long and if this question is answered somewhere
I
> haven't yet found, but I'm on a timescale here...
>
> My company is looking to use MySQL on free *nix (FreeBSD or Linux) to
store
> some text data and a *lot* of BLOB data.
>
> I am trying to check that MySQL will cope with the volumes.  My longest
> table will be between one and two million records, and I intend to hold
> approaching a terabyte of BLOB data in 45-60kB objects.
>
> Can anyone give me a quick yes/no and a heads up on problems or where to
> find documentation please?
>
> Thanks in advance.
> J.
> --
> Justin Rowles
> Technical Consultant
> Sellers Information Pack
>
> -
> Before posting, please check:
>http://www.mysql.com/manual.php   (the manual)
>http://lists.mysql.com/   (the list archive)
>
> 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




Will not let me set the root password

2001-02-08 Thread cameron . Gull

>Description:
After installing using an RPM the first time and then compiling the source the 
second time, it
still does not allow me to give it a root password. It keeps telling me that I don't 
have access priv's.
I've tried it logged in as root, myself and mysql.
>How-To-Repeat:
It says, after I give the command mysql_install_db to make sure I set the root 
password for 
the MySQL root user. So I enter exactly "/usr/local/mysql/bin/mysqladmin -u root -p 
password 'new-password'", it
then asks for a password, and every single password I throw at it, it says I don't 
have access AHHH! 
>Fix:


>Submitter-Id:  
>Originator:Cameron Gull
>Organization:
 SeraNova, Inc.
>MySQL support: [none | licence | email support | extended email support ]
>Synopsis:  Can't set the MySQL root password
>Severity:  critical
>Priority:  high
>Category:  mysql
>Class: sw-bug
>Release:   mysql-3.23.32 (Source distribution)

>Environment:
PowerMac G3 Blue & White 350Mhz, LinuxPPC 2000 Q4, /usr/local/mysql
System: Linux idd2_dev 2.2.18-4hpmac #1 Thu Dec 21 15:16:15 MST 2000 ppc unknown
Architecture: ppc

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/ppc-redhat-linux/2.95.3/specs
gcc version 2.95.3 20001130 (prerelease/franzo/20001204)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 Jan 29 04:11 /lib/libc.so.6 -> libc-2.1.3.so
-rwxr-xr-x1 root root  4250045 Sep 11 18:49 /lib/libc-2.1.3.so
-rw-r--r--1 root root 19415978 Sep 11 18:41 /usr/lib/libc.a
-rw-r--r--1 root root  178 Sep 11 18:41 /usr/lib/libc.so
lrwxrwxrwx1 root root   10 Jan 29 04:24 /usr/lib/libc-client.a -> 
c-client.a
Configure command: ./configure  --prefix=/usr/local/mysql
Perl: This is perl, version 5.005_03 built for ppc-linux

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

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




Re: Help - SQLBindParameter not used for all parameters error

2001-02-08 Thread Miguel Angel Solórzano

At 17:05 08/02/2001 +0800, Li Sze wrote:
Hi!

If you only need room for 1 character you don't need a column with
size 2.
The last parameter of SQLBindParameter is a pointer to a buffer for the 
parameter's length.

Then error HY090 means:

(DM) The argument ParameterValuePtr was a null pointer, the argument 
StrLen_or_IndPtr was a null pointer, and the argument InputOutputType was 
not SQL_PARAM_OUTPUT.
(DM) SQL_PARAM_OUTPUT, where the argument ParameterValuePtr was a null 
pointer, the C type was char or binary, and the BufferLength (cbValueMax) 
was greater than 0.

Take a look in the sample from Microsoft Documentation:

#define SALES_PERSON_LEN 10
#define STATUS_LEN 6

SQLSMALLINT  sOrderID;
SQLSMALLINT  sCustID;
DATE_STRUCT  dsOpenDate;
SQLCHAR szSalesPerson[SALES_PERSON_LEN];
SQLCHAR szStatus[STATUS_LEN);
SQLINTEGER  cbOrderID = 0, cbCustID = 0, cbOpenDate = 0, cbSalesPerson 
= SQL_NTS,
cbStatus = SQL_NTS;
SQLRETURN retcode;
SQLHSTMT hstmt;

/* Prepare the SQL statement with parameter markers. */
retcode = SQLPrepare(hstmt,
"INSERT INTO ORDERS (ORDERID, CUSTID, OPENDATE, SALESPERSON,
STATUS) VALUES (?, ?, ?, ?, ?)", SQL_NTS);
if (retcode == SQL_SUCCESS || retcode == SQL_SUCCESS_WITH_INFO) {
/* Specify data types and buffers for OrderID, CustID, OpenDate, 
SalesPerson, */
/* Status parameter data. */
SQLBindParameter(hstmt, 1, SQL_PARAM_INPUT, SQL_C_SSHORT,
SQL_INTEGER, 0, 0, &sOrderID, 0, &cbOrderID);
SQLBindParameter(hstmt, 2, SQL_PARAM_INPUT, SQL_C_SSHORT,
SQL_INTEGER, 0, 0, &sCustID, 0, &cbCustID);
SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_TYPE_DATE,
SQL_TYPE_DATE, 0, 0, &dsOpenDate, 0, &cbOpenDate);
SQLBindParameter(hstmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR,
SQL_CHAR, SALES_PERSON_LEN, 0, szSalesPerson, 0, &cbSalesPerson);
SQLBindParameter(hstmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR,
SQL_CHAR, STATUS_LEN, 0, szStatus, 0, &cbStatus);
/* Specify first row of parameter data. */
sOrderID = 1001;
sCustID = 298;
dsOpenDate.year = 1996;
dsOpenDate.month = 3;
dsOpenDate.day = 8;
strcpy(szSalesPerson, "Johnson");
strcpy(szStatus, "Closed");

/* Execute statement with first row. */
retcode = SQLExecute(hstmt);
/* Specify second row of parameter data. */
sOrderID = 1002;
sCustID = 501;
dsOpenDate.year = 1996;
dsOpenDate.month = 3;
dsOpenDate.day = 9;
strcpy(szSalesPerson, "Bailey");
strcpy(szStatus, "Open");

/* Execute statement with second row. */
retcode = SQLExecute(hstmt);
}

Regards,
Miguel




>I have trouble writing a character into the database (the column is 
>declared as char(2) not null) because I figured that if it appends a null 
>at the end of the character data I want to insert (i.e.'A\0'), it would 
>still fit. I bound the parameters first before assigning the data and 
>executing a statement to write into the database. This is how I bind it:
>
>---
>g_rc = SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, 
>2, 0, (SQLPOINTER)chDataPart, 1, NULL);
>->if I put NULL in the last parameter in the SQLBindParameter function, I 
>get the following error for the SQLParamData function call,
>
>Error code: HY090
>Error message: SQLBindParameter not used for all parameters.
>
>However, I see many working examples that sets the last parameter to NULL 
>when it is a string. I'm not sure if it works for a character. I've 
>checked the manual and list archives and found out that the above error 
>message means [there is an error in the number of parameters in an insert 
>statement]. What does this mean?
>
>---
>g_rc = SQLBindParameter(hstmt, 3, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, 
>2, 0, (SQLPOINTER)chDataPart, 1, 0);
>->the funny thing is, if I put 0 in the last parameter in the 
>SQLBindParameter function I don't get any error but the character data 
>(i.e. 'A') that I assigned to the bound parameter would not be written 
>into the database.
>
>Am I missing out something here? Please advise.
>
>Thanks in advance,
>lisze

__  ___   __
   /  |/  /_ __/ __/ __ \/ /   http://www.mysql.com/
  / /|_/ / // /\ \/ /_/ / /__  Miguel Solórzano <[EMAIL PROTECTED]>
/_/  /_/\_, /___/\___\_\___/  São Paulo, Brazil
<___/  Development 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




Problems with mySQL and DBTools

2001-02-08 Thread Curtis, Lorenzo

I am a web/database developer and we have a new
Unix administrator who admits to having never
installed/configured PHP or mySQL.  He was tasked
with setting up our development server with Apache,
PHP and mySQL.  Since he made this attempt I have not
been able to connect to the server with DBTools without
crashing mySQL on the server.  I used PHPWebAdmin to
administer the database, but now I need to move it to a
production environment and DBTools is the most efficient
way to do that.

When setting up the connection in DBTools the test is always
successful, but fails during the actual connection.

I am able to connect to two other production servers fine, so
I know that there is no problem with DBTools.

Now, I am not a unix guru, and am not familiar with how to set up
Apache,PHP and mySQL to run in a stable union.

So here are my questions:
1.  Has anyone ever experienced this problem before?  If so, what
was your resolution?
2.  Is there a detailed outline to use to compile Apache with PHP and mySQL
effectively?

Thanks in advance,
-Lorenzo

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

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 hanging on mysqldump output

2001-02-08 Thread Lance Lovette

Problem: No space left on device
Solution: Pay more attention to partition sizes

I would have expected mysql to start failing queries on such an event.

-Original Message-
From: Lance Lovette [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 07, 2001 8:08 PM
To: MySQL
Subject: mysql hanging on mysqldump output


I am trying to copy data from one database to another using output from
mysqldump version 8.11 distributed with 3.23.28-gamma. The problem is that
part way through importing the data into the target database, mysql just
hangs. When I show the process list, there is only one query, and it's stuck
in the update state. The table it gets stuck on is the largest in my
database, the .MYD is 131M. The size of the .MYD stops at 49M during the
import.

First, I execute this to create the dump:

% mysqldump --host=xxx --user=xxx --password=xxx -C -q --opt xxx | gzip >
filename.sql.gz

Next, I execute this to import the data into the target database:

% gunzip --stdout filename.sql.gz | mysql xxx -u root -p

This never finishes. I have played with different mysqldump options and I
also tried importing the data into a 3.23.32 database and nothing works.
What else might I try?

Lance


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

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


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

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




Size limitations.

2001-02-08 Thread Justin Rowles

Hi all.

Apologies for not lurking long and if this question is answered somewhere I
haven't yet found, but I'm on a timescale here...

My company is looking to use MySQL on free *nix (FreeBSD or Linux) to store
some text data and a *lot* of BLOB data.

I am trying to check that MySQL will cope with the volumes.  My longest
table will be between one and two million records, and I intend to hold
approaching a terabyte of BLOB data in 45-60kB objects.

Can anyone give me a quick yes/no and a heads up on problems or where to
find documentation please?

Thanks in advance.
J.
--
Justin Rowles
Technical Consultant 
Sellers Information Pack

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

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




pinging mysql

2001-02-08 Thread frederic barachant

Hi.
How do you ping Mysql fro a distant machine?
(i think my previous post was not clear enough, thanks Tim for pointing me here)

I have a java program that has to make sure that the MYSQL server it uses is still
alive. It has to diagnose from a 'eventual' mysql problem, or a networking related 
problem.
I can ping the machine, but can't ping mysql, simply because i don't know what to send
to it, and where.

John, if you read me, thanks for your anwer, but it does not apply. I hope you'll have
a much better idea with this post.

Thanks for your ideas.
Have a nice day, peace.

/-/
Frederic "pepe" barachant
IO labs 
GFX and TOOLS for and from
Lightwave and Aura
I C Q : ASK
Visit http://www.io-labs.com
and http://www.kframed.com right now !
join our board
http://www.io-labs.com/cgi-local/ikonboard/ikonboard.gci
for latest news


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

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: FYI: Known bug in replication

2001-02-08 Thread Gerald L. Clark

Leonardo Dias wrote:
> 
> "Mayville, Jeffrey" wrote:
> >
> > I keep seeing users asking about a problem they are having with replication
> > (I ran into the bug myself). I saw a message a week or so ago acknowledging
> > the bug and noting that it was self-inflicted (while cleaning up code) and
> > has been corrected. The problem will not exist in the next release (.33).
> >
> > The problem is that replication will fail if you stop and restart the slave.
> > The master.info file gets corrupted on the slave (added lines) so your IP
> > address and such are not read correctly and the slave cannot connect to the
> > master. In working to set up replication I also ran into the issue another
> > user noted of having the error log grow rather large. The longer you let it
> > grow, the bigger it gets (or that's how it seemed).
> >
> > Is there a page where known issues with the current release are tracked? It
> > may be a good idea. That would hopefully alleviate repeated users asking
> > questions to this list about known issues (resolved or otherwise). I can
> > only imagine how discouraging it is when following this list to have to
> > respond to the same issues constantly.
> >
> > A page with known issues and known workarounds (if any) could come in handy.
> 
> Geez!
> 
> That's what's been going on with me in the last 30 minutes. :-))
> 
> This message came very handy. I now got the slave and the master running
> and sync'ing, with time updates so that both have the same clock. :)
> 
> I still don't know one thing:
> 
> imagine that I try to insert a number in a field which is PRIMARY KEY.
> If there's that number already in the table, would the slave stop
> running just because of that?
> 
> That would be terrible.
> 
> --
Why don't you try it.

I did.

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

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




hardware requirements for mysql / php project

2001-02-08 Thread tom dyson


My company usually develops web applications using a Cold Fusion / NT /
MSSQL combination. But we're tendering for a new project which needs to
handle more concurrent users than we are confident Cold Fusion / NT can
manage. So we're looking to use PHP4/MySQL on a Linux server. The code -
it's for an employee survey - is very simple: inputting the contents of a
long form (mostly numerical data) into a DB table, but the traffic is
possibly very high: up to 10,000 users submitting the form over a 20 minute
period. We'd like to save our clients the cost of a new MSSQL licence, but
we don't know if MySQL can cope with the concurrent connections.

Can MySQL handle this sort of usage? What hardware requirements do we need
so that we can be confident that it won't fall over? Would we need to
separate the PHP server and the SQL server?

Thanks very much for any help

Thomasina



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

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: FYI: Known bug in replication

2001-02-08 Thread Leonardo Dias

"Mayville, Jeffrey" wrote:
> 
> I keep seeing users asking about a problem they are having with replication
> (I ran into the bug myself). I saw a message a week or so ago acknowledging
> the bug and noting that it was self-inflicted (while cleaning up code) and
> has been corrected. The problem will not exist in the next release (.33).
> 
> The problem is that replication will fail if you stop and restart the slave.
> The master.info file gets corrupted on the slave (added lines) so your IP
> address and such are not read correctly and the slave cannot connect to the
> master. In working to set up replication I also ran into the issue another
> user noted of having the error log grow rather large. The longer you let it
> grow, the bigger it gets (or that's how it seemed).
> 
> Is there a page where known issues with the current release are tracked? It
> may be a good idea. That would hopefully alleviate repeated users asking
> questions to this list about known issues (resolved or otherwise). I can
> only imagine how discouraging it is when following this list to have to
> respond to the same issues constantly.
> 
> A page with known issues and known workarounds (if any) could come in handy.

Geez!

That's what's been going on with me in the last 30 minutes. :-))

This message came very handy. I now got the slave and the master running
and sync'ing, with time updates so that both have the same clock. :)

I still don't know one thing:

imagine that I try to insert a number in a field which is PRIMARY KEY.
If there's that number already in the table, would the slave stop
running just because of that?

That would be terrible.

-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

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

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




Another problem with REPLICATIOn

2001-02-08 Thread Leonardo Dias

It's amazing. Configuration is fine (same as our test machines here). We
are trying to use it on production machines now. These are the errors I
get:

010208 12:35:29  Slave thread: error re-connecting to master:Binary log
is not open, last_errno=0, retry in 0 sec

I also have got this one:

010208 12:06:58  Slave thread: error connecting to master:Can't connect
to MySQL server on '0' (111)(107), retry in 200 sec


That '0' already changed to '' and to '4'.

my.cnf on the master reads:

[mysqld]
bin-log
server-id = 1

my.cnf in the slave reads:

[mysqld]
master-host = 200.212.x.y #we're using IP
master-user = replication_user
master-password = replication_password
server-id = 2


When I started it at once, it seemed to be working fine. Now the slave
just won't connect.

What could be wrong?

-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

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

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




FYI: Known bug in replication

2001-02-08 Thread Mayville, Jeffrey

I keep seeing users asking about a problem they are having with replication
(I ran into the bug myself). I saw a message a week or so ago acknowledging
the bug and noting that it was self-inflicted (while cleaning up code) and
has been corrected. The problem will not exist in the next release (.33).

The problem is that replication will fail if you stop and restart the slave.
The master.info file gets corrupted on the slave (added lines) so your IP
address and such are not read correctly and the slave cannot connect to the
master. In working to set up replication I also ran into the issue another
user noted of having the error log grow rather large. The longer you let it
grow, the bigger it gets (or that's how it seemed).

Is there a page where known issues with the current release are tracked? It
may be a good idea. That would hopefully alleviate repeated users asking
questions to this list about known issues (resolved or otherwise). I can
only imagine how discouraging it is when following this list to have to
respond to the same issues constantly.

A page with known issues and known workarounds (if any) could come in handy.

Jeff


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

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




HELP "Server configuration denies access to data source"

2001-02-08 Thread Ryan Ahmed

Hi Everyone,
I am in a very very
desperate state 'coz my whole site is down and if I
cannot connect to the database through my servlet my
@ss is grass.

Everything seems to be working fine except when I
execute the servlet I get this frustrating error:


" Server configuration denies access to data source "


And to connect my servlet code is:

Class.forName("org.gjt.mm.mysql.Driver").newInstance();
con =
DriverManager.getConnection("jdbc:mysql://jumac.com:3306/DBNAME?user=ryan&password=pw007");


Is the problem with my code or my hosting service?
What should I do?
Please give me detailed instructions as I am not too
familiar with MySql so if you are telling me to make
changes in the database please be specific.

Remember if you help me, when I become a LITTLE richer
than Bill Gates I won't forget you either!

Cheers,
Ryan.
([EMAIL PROTECTED])




__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.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




Problems with REPLICATION

2001-02-08 Thread Leonardo Dias

this is very urgent:

The slave returns this on the error log;

010208 12:06:58  Slave thread: error connecting to master:Can't connect
to MySQL server on '0' (111)(107), retry in 200 sec

What's '0'? I've configured an IP to that.



-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

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

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




[win32,mysql v. 3.23.32]Now() function and ERROR in enum

2001-02-08 Thread Christian Ribeaud

Hi,

I tried the following code:

CREATE TABLE news (... published date DEFAULT 'NOW()' NOT NULL, ..., showIt 
ENUM('TRUE') DEFAULT ERROR, ...);

and I was surprised to get an '-00-00' as date after doing a SELECT. I would like 
that the table put automatically the today's date for every INPUT as default value. 
What is wrong?
Another question, 'showIt ENUM('TRUE') DEFAULT ERROR' did not work but 'showIt 
ENUM('TRUE','FALSE') DEFAULT FALSE' worked fine. I would like to have something like 
bits or boolean values in my table. How to achieve this? Thanks for the help and have 
a nice day.
Greetings,

christian


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

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

2001-02-08 Thread Leonardo Dias

> Jeremy Wilson:
> > I tested replication recently and found it extremely lacking.  Even the
> > most minor of errors causes the daemon to stop replicating, effectively
> > rendering the ability useless to me, as I use mysql for authentication.
> What errors are you talking about? Errors like duplicate entries?
> Those aren't "minor". They're serious data inconsistency problems.

What does that mean? Does that means that, if I try to insert something
in a table that already exists (for example, an existing value to a
primary key), the slave would STOP RUNNING?

If that happens, we should carefully change our whole application
here...

-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

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

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 daemon fails to start.

2001-02-08 Thread Ezequiel Chernitsky

Hi,

After trying to install mysql succesfully on RH7 (yes, it finally
worked), I discovered that the daemon doesn´t start at boot. I tailed
the log and it says this:

010208 10:25:03  mysqld started
010208 10:25:04  /usr/sbin/mysqld: Can't find file: './mysql/host.frm'
(errno: 13)
010208 10:25:04  mysqld ended

Can someone explain me what´s wrong?

Thanks!!!

Ezequiel.



__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.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




Table suggestions..

2001-02-08 Thread Matt Glaves


I am writing an application that will poll  up to 500 devices every 5
minutes.  For this application I need to keep at least 6 months of data.  If
I were to use a single record for every update, I would have ~25 million
records.  Obviously this is not an ideal solution.

I am interested in getting ideas on how to tackle this.  I was thinking that
I would have a table that stored all the values for the current day and a
table for historical data.  After 24 hours the data would be averaged into a
daily snapshot and stored in another table.  The data from that day would
then be cleared.  This would only require ~90k records.

I would appreciate any ideas.  I have written a ton of web applications
using mySQL, but have never had to scale above 100k entries :)

Thanks,

Matt


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

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




Replication problems URGENT

2001-02-08 Thread Leonardo Dias

Ok, we've been having these troubles:

the slave is not connecting to the master. A simple

SHOW PROCESSLIST

shows a message with: trying to reconnect after a failed read

Sometimes the slave just won't connect. Does anyone knows what could be
wrong?
-- 
Leonardo Dias
Catho Online
WebDeveloper
http://www.catho.com.br/

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

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




MyODBC with C++ Builder

2001-02-08 Thread Guilherme Moreira Magalhães

Hi.

   Sometimes I need make software to administrate specifics databases on 
MySQL for my clients running Windows.
  I already did it before using an API, but I would like to use the 
MyODBC to make things go faster.
  I'm trying to use MyODBC with C++ Builder 3.0 Standard.
  When I open the Database Explorer out of Builder I can connect to 
MySQL normally, but when I open the Database Explorer or use a MySQL 
database in my applications I receive the following message:

   "Your application is not enabled for use with this driver."

   I red the manual in the section about MyODBC, checked the database 
configurations and the OBBC NDS is configured.
   If someone have some information about it, please mail me.
  
Guilherme M M


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

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 get SELECT to return 0 or 1 for WHERE match ?

2001-02-08 Thread Bob Hall

>I want to SELECT on one term & have the SELECT return as quickly as 
>possible on the first TRUE instance.
>
>Ideally I'd like it to after the first matching case stop looking 
>for other matches ( for speed ) and return 1. If there's no matches 
>at all I want it to return 0.
>
>This works OK but returns either the date or an empty set.
>
>SELECT thread_last_post_date FROM threads WHERE 
>thread_last_post_date > '2001-02-01' LIMIT 1;
>
>I know from Perl or PHP I can check the number of returned rows but 
>I'd like something that just returns 0 or 1 so I don't have to 
>special case.
>
>I'd like something like below but which work (it returns 2 rows of 1 
>for some reason ) :
>
>SELECT 1 FROM threads WHERE thread_last_post_date > '2001-02-01' LIMIT 1;
>
>thanks,
>
>- Sam.

Sir, SQL deals with sets of rows. You supply the specifications, and 
SQL returns the set of all rows that match your specifications. SQL 
is deliberately designed not to deal with a database one row at a 
time.

Try SELECT Count(*) FROM threads WHERE thread_last_post_date > '2001-02-01'
Treat zero as zero and anything greater than zero as one.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

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

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 can I create concatenated primary keys and insert thedata into it?

2001-02-08 Thread Bob Hall

>Dear Sir
>I am new to MySQL. I've created a table with three keys inside like this:
>
>CREATE TABLE reservation
>(
> reservation_id INT UNSIGNED NOT NULL AUTO_INCREMENT,
> hotel_id INT UNSIGNED NOT NULL,
> customer_id INT UNSIGNED NOT NULL,
> PRIMARY KEY(reservation_id, hotel_id, customer_id),
> 
>
>and I tried to insert the data by using the following sql statements:
>
>INSERT INTO reservation (reservation_id, hotel_id,
>customer_id,business_trip, checkin_month,
>checkin_day, checkin_year, checkin_time, checkout_month, checkout_day,
>checkout_year,
>total_num_guest, room_type, hotel_recommendation, customer_request,
>customer_comments) VALUES
>(NULL, NULL, NULL, 'yes_business', 'January', '01', '2002', '11:00',
>'January', '07', '2002', '3',
>'Triple', 'no_recommendations', 'Morning call', 'No')
>
>The book says that I should put NULL in order to let AUTO_INCREMENT 
>generate the id for me.
>However, it kept telling me that hotel_id can't be null (I guess it 
>was because the hotel_id has been
>generated in the "hotel" table by using AUTO_INCREMENT as well). How 
>am I supposed to
>connect different primary keys into one table (I mean how can I 
>transfer the hotel_id in Hotel table to
>the Reservation table)? And after that how can I insert those 
>primary keys inside one table?
>
>Thank you very much for your time.
>
>Sincerely,
>Cheri Peng

Ma'am, you don't have three keys. You have declared a PRIMARY KEY 
with three columns. However, only the first column is a key. The 
auto_increment column is all that is necessary to uniquely identify 
each row. The other two columns appear to be foreign keys and should 
be removed from your PRIMARY KEY clause.

You are correct about the NULLs. Since you've declared each of the 
columns in your primary key as NOT NULL, you must insert a non-NULL 
value in each of the three columns. Only the first column is 
auto-increment, so your INSERT statement must have a value for the 
other two.

Instead of a VALUES list, use a SELECT statement in your INSERT 
statement that returns the necessary values for the two fields. The 
field list in the SELECT clause of the SELECT statement would be 
identical to the VALUES list in your present statement, except that 
the second and third NULLs would be replaced by the names of the 
columns you are extracting the hotel_id and customer_id values from. 
Your constant values would remain unchanged. Also, remove the first 
NULL from the VAlUES list and the reservation_id column from the 
INSERT field list.

INSERT INTO reservation (hotel_id,
customer_id,business_trip, checkin_month,
checkin_day, checkin_year, checkin_time, checkout_month, checkout_day,
checkout_year,
total_num_guest, room_type, hotel_recommendation, customer_request,
customer_comments)
SELECT hotel_id, custumer_id, 'yes_business', 'January', '01', '2002', '11:00',
'January', '07', '2002', '3',
'Triple', 'no_recommendations', 'Morning call', 'No'
;

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

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

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: Hiding data after select

2001-02-08 Thread Bob Hall

>Hi there,
>
>suppose I have table table1 with columns col1,col2,col3,col4
>I would like to set up a query that omits eg. col1 from the output even
>though col1 must satisfy some condition:
>
>SELECT col2,col3,col4 from table where col1=condition
>
>Any suggestions ?
>
>Thanks in advance
>
>A.Hannemann

Sir, the SELECT above will work fine. The columns in the WHERE clause 
don't have to appear in the SELECT clause.

Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak

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

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: Should I switch to SCSI HD for mysql?

2001-02-08 Thread Dave Hodgkinson

"mike thomas" <[EMAIL PROTECTED]> writes:

> I'll have to think about this one. My application
> just consists
> of a huge table of domain names and users will be
> able to search for
> full strings and partial strings. So I'm not sure
> how I could create
> an intermediate results set from this table that
> would speed up queries?

Split on "."?

If they're looking for mycompany's domains then splitting out the
mycompany part would be good...

-- 
Dave Hodgkinson, http://www.hodgkinson.org
Editor-in-chief, The Highway Star   http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun for, well, hire
  -

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

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: Should I switch to SCSI HD for mysql?

2001-02-08 Thread mike thomas

Thanks for the info on tuning an IDE. I'll go
ahead and do that.

Regarding " Do you really need to do sub string
matching all the time?
Can you pre-build an intermediate results set that
can be optimally
queried?"

I'll have to think about this one. My application
just consists
of a huge table of domain names and users will be
able to search for
full strings and partial strings. So I'm not sure
how I could create
an intermediate results set from this table that
would speed up queries?

Thanks everyone for the feedback.

Mike

-Original Message-
From: Dave Hodgkinson
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 08, 2001 1:32 AM
To: mike thomas
Cc: Greg Cope; Mysql@Lists. Mysql. Com
Subject: Re: Should I switch to SCSI HD for mysql?


"mike thomas" <[EMAIL PROTECTED]>
writes:

> Greg,
>
> Well, I'm doing like "%stuff%" selects on a
single column table
> with 20 million records, so any speed gain would
be great. Would
> I be correct in saying that a select of this
type will always do
> a table scan?

Pretty much.

> I think I'll go with SCSI and increase the RAM
so I can use a
> heap table.

A cheap first step might be to go with a couple of
decent 7200 rpm,
ATA100 (or whatever the hell they're calling
themsevles this week)
disks and RAID0 them.

Striping Good.

Also, make sure your IDE is spiffed up to the max.
Do an:

hdparm /dev/hda (or whatever).

Make sure it's using DMA, unmasked IRQ, 32 bit i/o
and, a multcount of
16. Benchmark your drive before and after, with:

hdparm -t /dev/hda

You should see >10MB per second after tuning up.


However, I can't help thinking for your
application There Must Be A
Better Way. Do you really need to do substring
matching all the time?
Can you pre-build an intermediate results set that
can be optimally
queried?

Dave.


--
Dave Hodgkinson,
http://www.hodgkinson.org
Editor-in-chief, The Highway Star
http://www.deep-purple.com
  Apache, mod_perl, MySQL, Sybase hired gun
for, well, hire
  
-


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

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




Re: Help with SQL statement please.

2001-02-08 Thread Phil Latio

I see, I need a recursive algorithm

Can you get them in Woolworths?



- Original Message -
From: "Tommie Jones" <[EMAIL PROTECTED]>
To: "Phil Latio" <[EMAIL PROTECTED]>
Cc: <>
Sent: Thursday, February 08, 2001 12:18 PM
Subject: Re: Help with SQL statement please.


> If I am not mistaken I think you are trying to do a nested select.
>
> This is not possible in Mysql.  I've had similar problems.
> You will have to use some sort of recursive algorithm in your perl code
> (if you are using perl)
> to accomplish this.
> Phil Latio wrote:
> >
> > I hope somebody may of come across this sort of problem before dealing
with
> > counting total records in subcategories.
> >
> > I have two tables sslinks which contains links (URL) information and
> > sslinkcats which contains category information.
> >
> > The category table "sslinkcats" has a field called "lcat_id" (which is
an
> > autonumber) and also "lcat_cat" which is the "lcat_id" value of the
parent
> > category. For example cricket would be under sport and the "lcat_cat" of
> > cricket would be "lcat_id" of sport.
> >
> > The problem is that the below statement will only count the number of
links
> > in each particular category.
> >
> > $sql = "SELECT sslinkcats.lcat_id, COUNT(*) AS NumLinks
> >  FROM sslinks, sslinkcats
> >  WHERE link_cat = sslinkcats.lcat_id
> >  AND link_validated = 'yes'
> >  GROUP BY link_cat";
> >
> > I want to display the total amount of links under the category sport to
> > include all subcategories like football,cricket,cricket rugby. Also if
> > cricket had subcategories, then I would these counted too.
> >
> > I am sure the answer is looking at me but I just can't see it. Therefore
any
> > pointers or assistance would be very welcome.
> >
> > (ps. If you have read this message before, apologies but I was informed
that
> > this is the correct category for this type of question. Sorry)
> >
> > -
> > Before posting, please check:
> >http://www.mysql.com/manual.php   (the manual)
> >http://lists.mysql.com/   (the list archive)
> >
> > 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




  1   2   >