Re: Embedded MySQL

2002-09-27 Thread Jeremy Zawodny

On Fri, Sep 27, 2002 at 01:37:24PM +0930, David Lloyd wrote:
 
 What's the advantages of using Embedded MySQL instead of, say, Berkely's
 DB?

Well, the SQL interface is probably the biggest advantage.  There is
no query language for Berkely DB, so ad-hoc queries are time-consuming
to code.
-- 
Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
[EMAIL PROTECTED]  |  http://jeremy.zawodny.com/

MySQL 3.23.51: up 51 days, processed 1,092,381,257 queries (243/sec. avg)

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

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




compiling

2002-09-27 Thread Paco


Hello I'm trying to compile the first example of the mysql++ api by 
myself and I'm getting this output:

/tmp/ccu3Iehs.o: In function `main':
/tmp/ccu3Iehs.o(.text+0x2e): undefined reference to 
`MysqlConnection::MysqlConnection(char const *, char const *, char 
const *, char const *, bool)'
/tmp/ccu3Iehs.o(.text+0x39e): undefined reference to 
`operator(ostream , mysql_ColDataconst_string const )'
/tmp/ccu3Iehs.o(.text+0x3b4): undefined reference to 
`operator(ostream , mysql_ColDataconst_string const )'
/tmp/ccu3Iehs.o(.text+0x3ca): undefined reference to 
`operator(ostream , mysql_ColDataconst_string const )'
/tmp/ccu3Iehs.o(.text+0x3e0): undefined reference to 
`operator(ostream , mysql_ColDataconst_string const )'
/tmp/ccu3Iehs.o(.text+0x3eb): undefined reference to 
`operator(ostream , mysql_ColDataconst_string const )'
/tmp/ccu3Iehs.o(.text+0x509): undefined reference to 
`MysqlConnection::~MysqlConnection(void)'
/tmp/ccu3Iehs.o(.text+0x69d): undefined reference to 
`MysqlConnection::~MysqlConnection(void)'
/tmp/ccu3Iehs.o: In function `MysqlRes::~MysqlRes(void)':
/tmp/ccu3Iehs.o(.gnu.linkonce.t._._8MysqlRes+0x1b): undefined reference 
to `MysqlResUse::~MysqlResUse(void)'
/tmp/ccu3Iehs.o: In function `MysqlQuery::preview(void)':
/tmp/ccu3Iehs.o(.MysqlQuery::gnu.linkonce.t.preview(void)+0x1b): 
undefined reference to `SQLQuery::str(SQLQueryParms const ) const'
/tmp/ccu3Iehs.o: In function `MysqlRes::num_rows(void) const':
/tmp/ccu3Iehs.o(.MysqlRes::gnu.linkonce.t.num_rows(void) const+0x14): 
undefined reference to `mysql_num_rows'
/tmp/ccu3Iehs.o: In function `MysqlQuery::store(SQLQueryParms , 
query_reset)':
/tmp/ccu3Iehs.o(.MysqlQuery::gnu.linkonce.t.store(SQLQueryParms , 
query_reset) +0x3b): undefined reference to 
`SQLQuery::str(SQLQueryParms const , query_reset)'
/tmp/ccu3Iehs.o: In function `MysqlResUse::num_fields(void) const':
/tmp/ccu3Iehs.o(.MysqlResUse::gnu.linkonce.t.num_fields(void) 
const+0x12): undefined reference to `mysql_num_fields'
/tmp/ccu3Iehs.o: In function `MysqlRes::fetch_row(void) const':
/tmp/ccu3Iehs.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xd8): 
undefined reference to `mysql_fetch_row'
/tmp/ccu3Iehs.o(.MysqlRes::gnu.linkonce.t.fetch_row(void) const+0xec): 
undefined reference to `mysql_fetch_lengths'
/tmp/ccu3Iehs.o: In function `MysqlRes::data_seek(unsigned int) const':
/tmp/ccu3Iehs.o(.MysqlRes::gnu.linkonce.t.data_seek(unsigned int) 
const+0x1c): undefined reference to `mysql_data_seek'
/tmp/ccu3Iehs.o: In function `MysqlConnection::store(basic_stringchar, 
string_char_traitschar, __default_alloc_templatetrue, 0  const )':
/tmp/ccu3Iehs.o(.MysqlConnection::gnu.linkonce.t.store(basic_stringchar, 
string_char_traitschar, __default_alloc_templatetrue, 0  const 
)+0x1d): undefined reference to 
`MysqlConnection::store(basic_stringchar, string_char_traitschar, 
__default_alloc_templatetrue, 0  const , bool)'
/tmp/ccu3Iehs.o: In function `FieldTypes::FieldTypes(MysqlResUse const 
*)':
/tmp/ccu3Iehs.o(.FieldTypes::gnu.linkonce.t.(MysqlResUse const 
*)+0x4d): undefined reference to `FieldTypes::init(MysqlResUse const *)'
collect2: ld returned 1 exit status

I'm using g++ simple.cpp -o simple -I /usr/local/mysql/include/mysql/

and when I try to run the examples I got:

$./simple1
lt-simple1: error while loading shared libraries: cannot open shared 
object file: cannot load shared object file: No such file or directory

then when I try to see the lib that are missing:

$ldd simple1
 not a dynamic executable

any ideas or suggestions or the email of someone how I can't talk to, 
will be really appreciated...

Is there any howto about how to compile programs written using this 
class?

Thanx for your time.

-- 
--Paco

Open Source, Open Mind
Slackware, sending kiddies to /dev/null, since 1993



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

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: MyISAM or InnoDB

2002-09-27 Thread Dr. Frank Ullrich

Heikki,

Heikki Tuuri schrieb:
 
 Hi!
 
 - Original Message -
 From: Orr, Steve [EMAIL PROTECTED]
 Newsgroups: mailing.database.mysql
 Sent: Thursday, September 26, 2002 9:56 PM
 Subject: RE: MyISAM or InnoDB
 
  PROVOCATIVE RANT
 
  MySQL doesn't provide native support for transactions but is dependent
 on
  the Berkeley or InnoDB table types.
 
  Does MySQL really provide TRUE row level locking? That's the claim but is
 it
 
 Does Oracle really provide TRUE row level locking? A Microsoft pamphlet said
  ^^
  Yes, always!

 that if you set the transaction isolation level SERIALIZABLE in Oracle, then
 Oracle uses an optimistic validation method which is page level. I have not
   ^^^
No, in Oracle there is no lock escalation - ever! 
This 'optimistic validation method' probably refers to the fact that in
serializable mode Oracle provides the same level of concurrency as usual but
there is a price to pay: if during your transaction someone else modifies data
that you also want to modify you will not be allowed to do so. That's because
your transaction must be guaranteed to get always the data as it were at the
point in time the transaction started.

 checked from the latest Oracle manual if this is still true. Or you must use

Should you have the time and opportunity look at the book expert 101 - Oracle,
written by Oracle's Tom Kyte. He has also a fantastic web site:
http://asktom.oracle.com/

 table level manual locks.
 
 Does MS SQL Server really provide TRUE row level locking? If you set many
 locks, then it escalates row lock first to pages, and eventually to tables.
 
  valid? The InnoDB web site seems to be more accurate by explaining that
  locking is a next-key value locking mechanism that is indexed based.
 Here's
  what the InnoDB manual says, InnoDB does the row level locking so that
 when
  it searches or scans an index of a table, it sets shared or exclusive
 locks
  on the index records in encounters. Thus the row level locks are more
  precisely called index record locks.
 
  I developed some of my own benchmark tests which intentionally stress
  transactions in an artificial manner. The results were that MySQL with
  InnoDB didn't even come close to the performance of Oracle. Maybe my tests
  weren't very realistic and maybe a real world application won't encounter
  locking problems but I wouldn't just assume that InnoDB will scale like
  Oracle or meet the needs of your application. You've got to test it!
 
 Since a big customer requested this, MySQL/InnoDB-4.0.5 will feature the
 following READ COMMITTED isolation level which more closely imitates Oracle:

My organization would also prefer this isolation level!

 
 cut
 
  READ COMMITTED
 
  which will switch off next-key locks from
 
  1) SELECT ... FOR UPDATE;
  2) SELECT ... LOCK IN SHARE MODE;
  3) any UPDATE or DELETE which touches only a single row
   through a
 unique
  index.
  4) Furthermore, a plain consistent read SELECT will
   read the latest
  snapshot
  like in Oracle.
 
  It is NOT possible to switch off next-key locks from a
   range DELETE or
  UPDATE, because phantom rows would break MySQL replication and
 ^^
 recovery.

That's good to know!

 cut
 
  Open-source database providers readily admit that their databases are not
  yet geared toward powering high-end enterprise systems, such as ERP and
 CRM
  applications. From an Infoworld article about open-source databases
  entitled Finding an opening...
  http://www.infoworld.com/articles/pl/xml/02/09/23/020923pldatabses.xml
 
  One more thing to rant on... Regarding benchmark test...
  http://www.mysql.com/doc/en/MySQL-PostgreSQL_bench_marks.html
  Quoting from this page: We know of two benchmark tests that claim that
  PostgreSQL performs better than MySQL Server. These both where multi-user
  tests, a test that we here at MySQL AB haven't had time to write and
 include
  in the benchmark suite, mainly because it's a big task to do this in a
  manner that is fair to all databases.
 
  It's funny how MySQL AB just hasn't had time to write a multi-user
  benchmark. Based on the age of the link they haven't had time for a long
  time now. Yet they say benchmarking is important? Give me a break!
 
 We have run pgbench and compared it to similar mysqlbench.
 
 At 5 users MyISAM-4.0.2 was 1.3 times as fast as Pg-7.2.1, and InnoDB was 5
 times as fast.
 At 100 users MyISAM was 2 times as fast as Pg and InnoDB was 5 times as
 fast.
 
 I have been hoping some independent party would run these tests and publish
 the numbers.
 
  What we desperately need are some TPC benchmarks for the open-source
  databases. Benchmarks which are independenttly audited and verified.
 
 eWEEK ran a multiuser benchmark on DB2, SQL Server, Oracle, 

Re: Japanese Charset

2002-09-27 Thread Joel Rees

 Lastly, I am convinced that this is a problem with MySQL.

I have some time again, let me try again. It's a tortuous tale, but bear
with me.

Background in brief:

Shift-JIS is a real pain in the neck to parse. When you look at a byte,
it's often impossible to tell whether you're looking at the first byte
or the second byte of the character.

Shift-JIS has this almost-neat feature where they shoe-horned US-ASCII,
with the two exceptions I've mentioned before, into the lowest 128 codes.
_If_ _you_ _parse_ _from_ _the_ _beginning_, you can deterministically
pick off each one-byte character and each two byte character. 

Unfortunately, if line-noise causes you to miss a byte, or if you start
anywhere but the beginning of a string, you can run into a lot of
situations where you can't tell whether you're in the middle of a
character or not.

The byte value of 0x5c, which is that wonderful backslash which MySQL
(and C, PHP, Java, et. al.) uses as an escape character, is one case in
point. It can be either a single byte of backslash, or it can be the end
byte of one of several valid Japanese characters.

*** moderately important stuff ***

I believe, if you set up MySQL to operate in shift-JIS, it parses the
characters correctly, in addition to handling sort and collation
correctly. But that's kind of beside the point here. If my memory here
is correct, you can set your whole database (well, your instance of
MySQL) to assume the shift-JIS character set, and MySQL will properly
ignore any 0x5c that is not a backslash.

*** end moderately important stuff ***

(unimportant stuff)
(The fact that the backslash shows up as the yen symbol in your browser
when looking at a shift-JIS page is a red herring. I shouldn't have
brought it up. Ignore it. Another piece of information you didn't need,
and should ignore, is that shift-JIS double-wide backslash is 0x815f. It
is not used as an escape character, so just forget I told you its value.
Don't bother looking for it in your text. It has nothing to do with
what's going on. Incidentally, its end byte is the same value as
US-ASCII underscore, which you also don't need to know.)
(end unimportant stuff)

But, you are trying to use multiple languages in a single database. It
so happens that, if you play by the rules (which are a little difficult
to keep straight the first time) you can get away with this. Why?
Because you are not sorting or collating, just getting the data out by
keys that have nothing to do with shift-JIS.

In either the current MySQL 4.0 or the next version, I don't remember
which, I am told you will be able to set the language for each table.
This will be marvelous. A lot of peace of mind, and great help, in fact.
But not necessary for your current project, since you aren't collating
or sorting on Japanese.

** extremely important stuff **

The issue you face is how to avoid the 0x5c being treated as an escape
character.

But it doesn't matter whether the text is Japanese or not.

** end extremely important stuff **

Let me explain that. You are taking text from an ordinary source and
pasting it into MySQL (through the command line, shall we say). You
should never have any escapes in that text. If you see a \, it is merely
a backslash. \t, if it were in your text, would not mean the tab
character. \n would not mean a newline. A quote would not be the
beginning of a string, and a \ would be just that, a backslash followed
by a double quote. See

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

Note carefully that this page tells you exactly what characters will
require escaping. (Sorry I can't provide the code. It shouldn't be that
hard to write, or maybe someone else on the list who uses .asp will
volunteer. As a hints, I'll give you a bit of untested C below.)

If MySQL allows you to turn off character escaping, you would want to
simply turn it off. As I understand, it doesn't. So you need to catch
NULs, backslashes, and single and double quotes, and stick a(nother)
backslash in front of them before you pass them to the database.

(This should feel a lot like what you do when picking up text from a
form on the web to go into an html page. But it is done at a different
time, and the characters to escape are different.)

** crux-of-the-matter **

This is crude, it feels like a real kludge, but it works. 

Since your database is not set up to parse shift-JIS, it is absolutely
going to think that every 0x5c it sees is a backslash, even when preceded
by 0x83 or some other lead byte of a valid shift-JIS character. It
doesn't know for shift-JIS. Because you haven't set it up to care, it
doesn't care at all, and just basically ignores the whole multi-byte
character business.

So, you just treat the 0x5c end-bytes like backslashes. Escape them like
they were real backslashes, and the escaping backslash gets eaten on its
way into the database.

** end crux-of-the-matter **

0x835c, for instance: Your escaping routine doesn't need 

SHAPE command for Hierarchical Recordset

2002-09-27 Thread NZEYIMANA Emery Fabrice

I have created a MySQL database that will help me manage my Invoicing system
but I have been stack when I tried to print a report using a VB application.

I have read from Help that I will need to use a hierarchical recordset to
achieve what I want to.
You know an Invoice has some headers like: Customer names, Invoice number,
...

It also has details of ordered products/services Like: Item ID, Description,
...

So my invoice should look like:
++
NZEYIMANA (Customer name)
Some Addresses

Invoice No.: 2002-09/5

-+
Item IDDescriptionQtyUPTotal

-+
12dfhsdfdsfjsd525125
...
...
_
Total 125
VAT: -
++

To build such an invoice using ADO, VB, DataReport you need that
Hierarchical recordset because DataReport won't accept if it is not a
hierarchical recordset.

How do I achieve this?

Thanks
Emery





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

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: MyISAM or InnoDB

2002-09-27 Thread Heikki Tuuri

Frank,

- Original Message -
From: Dr. Frank Ullrich [EMAIL PROTECTED]
To: Heikki Tuuri [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 11:18 AM
Subject: Re: MyISAM or InnoDB


 Heikki,

 Heikki Tuuri schrieb:
 
  Hi!
 
  - Original Message -
  From: Orr, Steve [EMAIL PROTECTED]
  Newsgroups: mailing.database.mysql
  Sent: Thursday, September 26, 2002 9:56 PM
  Subject: RE: MyISAM or InnoDB
 
   PROVOCATIVE RANT
  
   MySQL doesn't provide native support for transactions but is
dependent
  on
   the Berkeley or InnoDB table types.
  
   Does MySQL really provide TRUE row level locking? That's the claim but
is
  it
 
  Does Oracle really provide TRUE row level locking? A Microsoft pamphlet
said
   ^^
   Yes, always!

  that if you set the transaction isolation level SERIALIZABLE in Oracle,
then
  Oracle uses an optimistic validation method which is page level. I have
not
^^^
 No, in Oracle there is no lock escalation - ever!
 This 'optimistic validation method' probably refers to the fact that in
 serializable mode Oracle provides the same level of concurrency as usual
but
 there is a price to pay: if during your transaction someone else modifies
data
 that you also want to modify you will not be allowed to do so. That's
because
 your transaction must be guaranteed to get always the data as it were at
the
 point in time the transaction started.



the optimistic validation method is analogous with pessimistic locking. If
the validation is row-based, the we can say that we are using row level
'optimistic locking'. In the SERIALIZABLE mode Oracle apparently uses page
level 'optimistic locking' according to that Microsoft pamphlet.

In 'optimistic locking' every 'lock conflict' is handled like a deadlock in
pessimistic locking: the transaction is rolled back. That is one of the
reasons why application programmers usually prefer pessimistic locking.

An optimistic locking method can be characterized like this:

* At the transaction end check if there WOULD HAVE been lock conflicts with
already committed transactions if pessimistic locking would have been used.
If yes, roll back.



  checked from the latest Oracle manual if this is still true. Or you must
use

 Should you have the time and opportunity look at the book expert 101 -
Oracle,
 written by Oracle's Tom Kyte. He has also a fantastic web site:
 http://asktom.oracle.com/

  table level manual locks.
 
  Does MS SQL Server really provide TRUE row level locking? If you set
many
  locks, then it escalates row lock first to pages, and eventually to
tables.
 
   valid? The InnoDB web site seems to be more accurate by explaining
that
   locking is a next-key value locking mechanism that is indexed based.
  Here's
   what the InnoDB manual says, InnoDB does the row level locking so
that
  when
   it searches or scans an index of a table, it sets shared or exclusive
  locks
   on the index records in encounters. Thus the row level locks are more
   precisely called index record locks.
  
   I developed some of my own benchmark tests which intentionally stress
   transactions in an artificial manner. The results were that MySQL with
   InnoDB didn't even come close to the performance of Oracle. Maybe my
tests
   weren't very realistic and maybe a real world application won't
encounter
   locking problems but I wouldn't just assume that InnoDB will scale
like
   Oracle or meet the needs of your application. You've got to test it!
 
  Since a big customer requested this, MySQL/InnoDB-4.0.5 will feature the
  following READ COMMITTED isolation level which more closely imitates
Oracle:

 My organization would also prefer this isolation level!

 
  cut
  
   READ COMMITTED
  
   which will switch off next-key locks from
  
   1) SELECT ... FOR UPDATE;
   2) SELECT ... LOCK IN SHARE MODE;
   3) any UPDATE or DELETE which touches only a single row
through a
  unique
   index.
   4) Furthermore, a plain consistent read SELECT will
read the latest
   snapshot
   like in Oracle.
  
   It is NOT possible to switch off next-key locks from a
range DELETE or
   UPDATE, because phantom rows would break MySQL replication and
  ^^
  recovery.

 That's good to know!

  cut
 
   Open-source database providers readily admit that their databases are
not
   yet geared toward powering high-end enterprise systems, such as ERP
and
  CRM
   applications. From an Infoworld article about open-source databases
   entitled Finding an opening...
   http://www.infoworld.com/articles/pl/xml/02/09/23/020923pldatabses.xml
  
   One more thing to rant on... Regarding benchmark test...
   http://www.mysql.com/doc/en/MySQL-PostgreSQL_bench_marks.html
   Quoting from this page: We know of two benchmark 

Re: SHAPE command for Hierarchical Recordset

2002-09-27 Thread CP

I would suggest you use MS Access report with MyTool-DLL For VB and MySQL.

- Original Message -
From: NZEYIMANA Emery Fabrice [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 4:40 PM
Subject: SHAPE command for Hierarchical Recordset


 I have created a MySQL database that will help me manage my Invoicing
system
 but I have been stack when I tried to print a report using a VB
application.

 I have read from Help that I will need to use a hierarchical recordset to
 achieve what I want to.
 You know an Invoice has some headers like: Customer names, Invoice number,
 ...

 It also has details of ordered products/services Like: Item ID,
Description,
 ...

 So my invoice should look like:
 ++
 NZEYIMANA (Customer name)
 Some Addresses

 Invoice No.: 2002-09/5
 --
--
 -+
 Item IDDescriptionQtyUPTotal
 --
--
 -+
 12dfhsdfdsfjsd525
125
 ...
 ...
 _
 Total 125
 VAT: -
 ++

 To build such an invoice using ADO, VB, DataReport you need that
 Hierarchical recordset because DataReport won't accept if it is not a
 hierarchical recordset.

 How do I achieve this?

 Thanks
 Emery





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

 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: SHAPE command for Hierarchical Recordset

2002-09-27 Thread NZEYIMANA Emery Fabrice

Where can I get those tools? With MS access, my queries work fine after
importing the data from MySQL

Thanks
Emery
- Original Message -
From: CP [EMAIL PROTECTED]
To: NZEYIMANA Emery Fabrice [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 10:47 AM
Subject: Re: SHAPE command for Hierarchical Recordset


 I would suggest you use MS Access report with MyTool-DLL For VB and MySQL.

 - Original Message -
 From: NZEYIMANA Emery Fabrice [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, September 27, 2002 4:40 PM
 Subject: SHAPE command for Hierarchical Recordset


  I have created a MySQL database that will help me manage my Invoicing
 system
  but I have been stack when I tried to print a report using a VB
 application.
 
  I have read from Help that I will need to use a hierarchical recordset
to
  achieve what I want to.
  You know an Invoice has some headers like: Customer names, Invoice
number,
  ...
 
  It also has details of ordered products/services Like: Item ID,
 Description,
  ...
 
  So my invoice should look like:
  ++
  NZEYIMANA (Customer name)
  Some Addresses
 
  Invoice No.: 2002-09/5

 --
 --
  -+
  Item IDDescriptionQtyUPTotal

 --
 --
  -+
  12dfhsdfdsfjsd525
 125
  ...
  ...
  _
  Total
125
  VAT: -
  ++
 
  To build such an invoice using ADO, VB, DataReport you need that
  Hierarchical recordset because DataReport won't accept if it is not a
  hierarchical recordset.
 
  How do I achieve this?
 
  Thanks
  Emery
 





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

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




Problem with symlinked files used with load data infile

2002-09-27 Thread Christian Mondrup

I'm new to MySql but accustomed to Oracle. Hope the below problem report 
contains the necessary information.

Output from mysqladmin:

mysqladmin  Ver 8.23 Distrib 3.23.49, for redhat-linux-gnu on i386
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.49
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 24 min 15 sec

Threads: 1  Questions: 7  Slow queries: 0  Opens: 7  Flush tables: 1 
Open tables: 1 Queries per second avg: 0.005

Edited output from mysqlbug:

SEND-PR: -*- send-pr -*-
SEND-PR: Lines starting with `SEND-PR' will be removed automatically, as
SEND-PR: will all comments (text enclosed in `' and `').
SEND-PR:
From: [EMAIL PROTECTED]
To: --help
Subject: Problem with symlinked files used with load data infile

 Description:
When I give an absolute path of a file as argument to LOAD DATA INFILE 
I get an errcode: 13 ( Can't get stat of 
'/home/reccmo/Musik/IckingArchive/Database/composers.txt') if the 
filename path involves a symbolic link, for example

/home/reccmo/Musik/IckingArchive/Database/composers.txt

which is symlinked to from

/music/Musik/IckingArchive/Database/composers.txt

 How-To-Repeat:
code/input/activities to reproduce the problem (multiple lines)

Table definition:

CREATE TABLE Composer (
Id  INTEGER(4) NOT NULL AUTO_INCREMENT,
Last_Name   VARCHAR(60) NOT NULL,
Sur_NameVARCHAR(60),
Year_Of_Birth   INTEGER(4),
Year_Of_Death   INTEGER(4),
Country_CodeINTEGER(4),
PRIMARY KEY (
Id))
;

LOAD DATA statement:

LOAD DATA INFILE /home/reccmo/Musik/IckingArchive/Database/composers.txt
INTO TABLE Composer
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\''
LINES TERMINATED BY '\n'
(Last_Name, Sur_Name, Year_Of_Birth, Year_Of_Death)
;

Data file content:

'Arcadelt','Jacob',1505,1568

 Fix:

Modify statement to

LOAD DATA INFILE /music/Musik/IckingArchive/Database/composers.txt
INTO TABLE Composer
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '\''
LINES TERMINATED BY '\n'
(Last_Name, Sur_Name, Year_Of_Birth, Year_Of_Death)
;


 Submitter-Id: submitter ID
 Originator:   Christian Mondrup
 Organization:
   Christian Mondrup, Computer Programmer
   Scandiatransplant, Skejby Hospital, University Hospital of Aarhus
   Brendstrupgaardsvej, DK 8200 Aarhus N, Denmark
   Phone: +45 89 49 53 01 - http://www.scandiatransplant.org
 
 MySQL support: none

 Synopsis: Problem with symlinked files used with load data infile
 Severity: non-critical
 Priority: [ low | medium | high ] (one line)
 Category: mysql
 Class:[ sw-bug | doc-bug | change-request | support ] (one line)
 Release:  mysql-3.23.49 (Source distribution)
 Server: /usr/bin/mysqladmin  Ver 8.23 Distrib 3.23.49, for 
redhat-linux-gnu on i386
Copyright (C) 2000 MySQL AB  MySQL Finland AB  TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version  3.23.49
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 30 min 2 sec

Threads: 1  Questions: 14  Slow queries: 0  Opens: 7  Flush tables: 1 
Open tables: 1 Queries per second avg: 0.008
 Environment:
machine, os, target, libraries (multiple lines)
System: Linux true 2.4.18-3 #1 Thu Apr 18 07:37:53 EDT 2002 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc 
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.3 2.96-110)
Compilation info: CC='gcc'  CFLAGS='-O2 -march=i386 -mcpu=i686 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE'  CXX='gcc' 
CXXFLAGS='-O2 -march=i386 -mcpu=i686 -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-rtti -fno-exceptions' 
LDFLAGS=''
LIBC:
lrwxrwxrwx1 root root   13 Sep 13 18:49 /lib/libc.so.6 
- libc-2.2.5.so
-rwxr-xr-x1 root root  1260480 Apr 15 15:44 /lib/libc-2.2.5.so
-rw-r--r--1 root root  2310808 Apr 15 16:02 /usr/lib/libc.a
-rw-r--r--1 root root  178 Apr 15 15:55 /usr/lib/libc.so
Configure command: ./configure  i386-redhat-linux --prefix=/usr 
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin 
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include 
--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var 
--sharedstatedir=/usr/com --mandir=/usr/share/man 
--infodir=/usr/share/info --without-debug --without-readline 
--enable-shared --with-extra-charsets=complex --with-bench 

Re: newbie only

2002-09-27 Thread Gunter Geis

Hello
The error 10061 on windows means, that the host refueses the connection.

In a command promt type:

  net helpmsg 10061

Do you running a firewall ?


Gunter


Victoria Reznichenko wrote:

 weng,
 Thursday, September 26, 2002, 3:05:25 AM, you wrote:

 wc i've installed ver 3.23.47 sa win2k pero di ko sya
 wc mstart as service..

 wc if i type this==mysqladmin create database01
 wc ERROR==mysqladmin: connect to server at 'localhost'
 wc failed
 wc error: 'Can't connect to MYSQL server on 'localhost'
 wc 10061'
 wc Check that mysqld is running on localhost and that the
 wc port is 3306.
 wc You can check this by doing 'telnet localhost 3306'

 wcand this ==telnet localhost 3306
 wcERROR==Conneting to localhost..Could not open a
 wc connection to host on port 3306 : Connect failed

 wc *note:windows 2000 is installed in my E: directory and
 wc i alrdy changed this in my.cnf

 Did you check if MySQL server is running?

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

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

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


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

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: Filemaker database to MYSQL

2002-09-27 Thread Joel Rees

 Has anyone created a plugin or script that will allow me to
 convert my filemaker database to MYSQL

Check the archives. There has been some discussion of this in the past.

-- 
Joel Rees [EMAIL PROTECTED]


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

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




Re: MYSQL C++ API

2002-09-27 Thread Stefan Fleiter

Paco wrote:

 I'm having probles with the c++ api of mysql... could somebody help me 
 plesae?

Could be, maybe you should post your specific 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




Passing Connection Objects between DLLS

2002-09-27 Thread Michael J. Fuhrman

Hello All,

When passing a connection object between DLL's it appears that myODBC
driver is not able to create Editable RecordSets objects from it.  However,
I
can create Static RecordSet objects.  A work around that I have found is to
have the 2nd DLL open a new connection object.

Code samples follow:

Any suggestions?

ENetArch


Code samples:

===
EXE - 1

Dim objStore As Store_mySQL
Const szODBC = UID=sa;PWD=sa;DSN=mySQL;

Sub Main()
   Set objStore = New Store_mySQL

   Dim cn As Object
   Set cn = CreateObject(adodb.connection)
   cn.open (szODBC)

   Set objStore.init = cn

   objStore.Test

End Sub

===
Table Defination

CREATE TABLE test
(
   ID INTEGER AUTO_INCREMENT,
   PRIMARY KEY (ID),
   szName VARCHAR (30)
)

===
DLL - Store_mySQL

Private cn As Connection

Private Sub Class_Initialize()
   Set cn = Nothing
End Sub

Public Property Set init(ByVal objCn As Connection)
   Set cn = objCn

   ' Work Around
   ' Set cn = CreateObject(adodb.connection)
   ' cn.Open objCn

End Property

Public Function test()

   Const cSQLTable = test
   Dim szSQL As String
   Dim rs As Object

   szSQL = _
   SELECT *   _
   FROMcSQLTable  _
   ORDER BY ID 

   ' rs = cn.execute (szSQL)
  ' returns a static record set OK, without workaround.

   Set rs = CreateObject(ADODB.RecordSet)

   rs.CursorLocation = 3 ' adUseClient
   rs.CursorType = 1 ' adOpenKeyset
   rs.LockType = 3 ' adLockOptimistic

   rs.Source = szSQL

   Set rs.ActiveConnection = cn
  ' Fails here: error 3709, or 3001

   rs.Open

   rs.AddNew
   rs(szName) = NavisStar International, Inc.

   rs.Update

   Debug.Print rs(ID)

End Function

===

' Keywords:
' myODBC, Visual Basic, VB, ADODB.RECORDSET
' ADODB.CONNECTION, ADO

' ERROR 3001 :  INVALID CONNECTION
'  The application is using arguments that are of the wrong type,
'  are out of acceptable range, or are in conflict with one another.

' ERROR 3709 : INVALID ARGUMENT
'  The application requested an operation on an object with a
'  reference to a closed or invalid Connection object.

' Environment:
' WkStn - Windows 2000 WkStn, 256 meg, AMD K6-2 500 mhz, build 2195, SP1
' MDAC 2.7
' myODBC 3.51 - WinX


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

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




provider for .net

2002-09-27 Thread Jay Fields

I'm building an asp.net app and I want to connect to mysql, but I dont what
which DataAdapter to use, and I don't know what Provider to specify in my
connection string.  Anyone have any advice?

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

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




Re: SELECT COUNT

2002-09-27 Thread andy thomas

On Fri, 27 Sep 2002, Michael J. Fuhrman wrote:

 Hello All,

 I seem to be running into a very strange problem.

 In the mySQL command line interface I issue SELECT COUNT (*) FROM

The correct syntax is SELCT COUNT(*) ie, there's no space between SELECT
and the (*).

Andy


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

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




re: SELECT COUNT

2002-09-27 Thread Egor Egorov

Michael,
Friday, September 27, 2002, 3:16:49 PM, you wrote:

MJF I seem to be running into a very strange problem.

MJF In the mySQL command line interface I issue SELECT COUNT (*) FROM
MJF test; and get -- ERROR 1064: You have an error in your SQL syntax
MJF near '(*) from test' at line 1.

MJF Below is the test table:

MJF CREATE TABLE test
MJF (
MJFID INTEGER AUTO_INCREMENT,
MJFPRIMARY KEY (ID),
MJFszName VARCHAR (30)
MJF )

MJF Any suggestions?

Remove space between COUNT and (*)



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




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

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




Re: Re: Replication

2002-09-27 Thread Victoria Reznichenko

Hello CP,
Friday, September 27, 2002, 3:11:14 AM, you wrote:

C hi Victoria, thanks for the reply. I have set server id in the very
C beginning, but its still not working. I don't understand why the MySQL would
C not let me change its server id accordingly. The server id was set to 1.

You must set up unique server-id for the master and for the slave. You
said that server-id=1, but it's only one server id, what about
another?


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





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

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




How to get select for missing row working?

2002-09-27 Thread rick

While the subject sounds counter-intuitive, I think I'm trying to do something simple 
and I can't figure it out.

I have a simple table, lookup, with two columns, id and decode. I want to write a 
simple query that retrieves the decode if there, and the id if the row is missing for 
a given literal id.

So after several iterations I tried:
select distinct ifnull(a.decode,333) from lookup a right outer join lookup b on 
a.id=b.id and b.id=333;

This works if the key is not found, but when the key is found I get two rows back 
(both the id and the decode).

I feel like I'm making this too complicated...is there an easier way to do this with a 
single statement?

Thx,
R



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

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: [bug] koi8-r codepage bug

2002-09-27 Thread Cyril Zlachevsky

Victoria Reznichenko wrote:
 Cyril,
 Thursday, September 26, 2002, 11:30:39 PM, you wrote:
 
 CZ ---cut---
 mysql DROP TABLE IF EXISTS COUNTRIES;
 CZ Query OK, 0 rows affected (0.02 sec)
 
 mysql CREATE TABLE COUNTRIES (Name varchar(30) NOT NULL DEFAULT 'n/a',
 CZ - PRIMARY KEY (Name) );
 CZ Query OK, 0 rows affected (0.00 sec)
 
 mysql INSERT INTO COUNTRIES VALUES ('éÒÌÁÎÄÉÑ');
 CZ Query OK, 1 row affected (0.00 sec)
 
 mysql INSERT INTO COUNTRIES VALUES ('éÓÌÁÎÄÉÑ');
 CZ ERROR 1062: ðÏ×ÔÏÒÑÀÝÅÅÓÑ ÚÎÁÞÅÎÉÅ 'éÓÌÁÎÄÉÑ' ÄÌÑ ËÌÀÞÁ 1
 
 mysql SELECT * FROM COUNTRIES WHERE Name='éÓÌÁÎÄÉÑ';
 CZ +--+
 CZ | Name |
 CZ +--+
 CZ | éÒÌÁÎÄÉÑ |
 CZ +--+
 CZ 1 row in set (0.00 sec)
 CZ ---cut---
 
 I tested your example with koi8_ru and it worked perfectly well for me
 
 mysql DROP TABLE IF EXISTS COUNTRIES;
 Query OK, 0 rows affected (0.01 sec)
 
 mysql CREATE TABLE COUNTRIES (Name varchar(30) NOT NULL DEFAULT 'n/a',
 - PRIMARY KEY (Name) );
 Query OK, 0 rows affected (0.04 sec)
 
 mysql INSERT INTO COUNTRIES VALUES ('éÒÌÁÎÄÉÑ');
 Query OK, 1 row affected (0.00 sec)
 
 mysql INSERT INTO COUNTRIES VALUES ('éÓÌÁÎÄÉÑ');
 Query OK, 1 row affected (0.00 sec)
 
 mysql SELECT * FROM COUNTRIES WHERE Name='éÓÌÁÎÄÉÑ';
 +--+
 | Name |
 +--+
 | éÓÌÁÎÄÉÑ |
 +--+
 1 row in set (0.00 sec)
 
 mysql show variables like char%;
 
++-+
 | Variable_name  | Value 
  
|
 
++-+
 | character_set  | koi8_ru   
  
|
 | character_sets | latin1 big5 czech euc_kr gb2312 gbk sjis tis620 ujis dec8 dos 
german1 hp8 koi8_ru latin2 swe7 usa7 cp1251 danish hebrew win1251 estonia hungarian 
koi8_ukr win1251ukr greek win1250 croat cp1257 latin5 |
 
++-+
 2 rows in set (0.01 sec)
 
 
if I build mysql with 
./configure --with-charset=koi8_ru
then check (make; make check; make test) failed!
But if I build mysql with
./configure --with-extra-charsets=all 
and then insert in /etc/my.cfg before mysqld start this strings:
---cut---
[mysqld]
character-sets-dir=/usr/share/mysql/charsets/
default-character-set=koi8_ru
---cut---
then all OK and query INSERT INTO COUNTRIES VALUES ('éÓÌÁÎÄÉÑ') not fail!

-- 
Ó Õ×ÁÖÅÎÉÅÍ
ëÉÒÉÌÌ úÌÁÞÅ×ÓËÉÊ
Don-Link ITSP
WWW   : http://www.phone.dn.ua
office: +380 62 3450119, +380 62 3341698, +380 62 3810593
mobile: +380 67 7072937




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

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




Re: SQL question

2002-09-27 Thread Joseph Bueno

Try:

SELECT fieldname FROM table ORDER BY 0+fieldname;

Regards

John Almberg wrote:
 That gives a syntax error, unfortunately.
 
 -- JOhn
 
 
-Original Message-
From: Mihail Manolov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 9:51 PM
To: Mysql
Subject: Re: SQL question


Try:

SELECT fieldname FROM table ORDER 0+fieldname;


Hope it helps.


Mihail

- Original Message -
From: John Almberg [EMAIL PROTECTED]
To: Mysql [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 8:04 PM
Subject: SQL question



I'm trying to sort a table on a character-type field that

contains mostly

numbers. This field always contains either a number or a number followed

by

a character. Like '57' or '57a'.

I'd like to sort the table *numerically* on this field, not

*alphabetically*

on this field. That is, I'd like the table to be sorted like:

1 ...
2 ...
2a ...
3 ...
4d ...

NOT like:

1 ...
11 ...
111a ...
2a ...
22 ...

See what I mean? This is a common problem, I think, when you sort an
character type field that contains numbers. The sort comes out

all wrong.

Is there anyway I can achieve this sort using SQL? The target server is
running 3.22.32. Any ideas greatly appreciated!

-- John



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

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

 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: problem changeing the root password

2002-09-27 Thread gerald_clark

mysqladmin is in the clients rpm.

Niko Itajarvi wrote:

I installed the MySQL-3.23.52-1.i386.rpm packet on my RedHat 7.3 server 
machine. 
Installation went OK, then it told me to change my root password by typeing:

/usr/bin/mysqladmin -u root password newpasswd

But i cant find mysqladmin at /bin/ directory! I cant find it no where.
Is is loacted somewhere else?
Or what should i do?

Thanks!


-Niko Itajarvi-
[EMAIL PROTECTED]

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

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


  




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

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




Re: provider for .net

2002-09-27 Thread Dr. Michael Wittmann

Hi Jay,

see http://www.mysql.com/press/release_2002_10.html for an overview.

HTH, 
Michael

Jay Fields wrote:
 
 I'm building an asp.net app and I want to connect to mysql, but I dont what
 which DataAdapter to use, and I don't know what Provider to specify in my
 connection string.  Anyone have any advice?


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

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: Bug report

2002-09-27 Thread gerald_clark

This is documented behavior.
Indexes are not used with DESC.
Ver 4.X does, however support DESC with an index.

Grigoriy Vinogradov wrote:

Bug Report:

Version: 3.23.51-max
OS: Windows ME

Problem:
Synopsis: Does not use index when ordering records on datetime field in
the descending order, even though though this field is NOT NULL.

I created the following table:

CREATE TABLE Threads (threadID int NOT NULL PRIMARY KEY,
  forumID int NOT NULL REFERENCES Forums(forumID),
  discussion char(100),
  starter char(40),
  num_replies int,
  last_modified datetime NOT NULL,
  INDEX (forumID, last_modified));

When I execute the following query with explain word I notice that index
is not used:

explain select * from Threads
where forumID = 1 order by last_modified desc;

If I want to select these records in the ascending order, than the index
IS used.

Thanks,
Greg Vinogradov


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

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: SQL question

2002-09-27 Thread gerald_clark

ORDER BY  0 + fieldname

if this is not quit right try

ORDER BY  0 + fieldname ,  fieldname

John Almberg wrote:

That gives a syntax error, unfortunately.

-- JOhn

  

-Original Message-
From: Mihail Manolov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 9:51 PM
To: Mysql
Subject: Re: SQL question


Try:

SELECT fieldname FROM table ORDER 0+fieldname;


Hope it helps.


Mihail

- Original Message -
From: John Almberg [EMAIL PROTECTED]
To: Mysql [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 8:04 PM
Subject: SQL question




I'm trying to sort a table on a character-type field that
  

contains mostly


numbers. This field always contains either a number or a number followed
  

by


a character. Like '57' or '57a'.

I'd like to sort the table *numerically* on this field, not
  

*alphabetically*


on this field. That is, I'd like the table to be sorted like:

1 ...
2 ...
2a ...
3 ...
4d ...

NOT like:

1 ...
11 ...
111a ...
2a ...
22 ...

See what I mean? This is a common problem, I think, when you sort an
character type field that contains numbers. The sort comes out
  

all wrong.


Is there anyway I can achieve this sort using SQL? The target server is
running 3.22.32. Any ideas greatly appreciated!

-- John
  


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

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





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

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: Japanese Charset

2002-09-27 Thread Michael T. Babcock

Joel Rees wrote:

Shift-JIS is a real pain in the neck to parse. When you look at a byte,
it's often impossible to tell whether you're looking at the first byte
or the second byte of the character.

Can I make a minor recommendation that doesn't help your current 
situation at all?

Use UTF-8.  You can _know_ which bytes are the first or middle bytes of 
a byte stream and in Japanese, its always three bytes per character 
(even though as an encoding, its variable length).  Its also sortable; 
but I haven't tried UTF-8 encoding in MySQL (nor do I know if it is 
actually supported).

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



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

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




connecting to mysql via ODBC from asp.net

2002-09-27 Thread Jay Fields

I've installed the windows version of mysql.  I configured nothing.
This is the code I'm trying to use to access mysql from an asp web service
(in vb):
-
WebMethod() Public Function dbConnect() As String
Dim connString As String = DRIVER={MySQL ODBC 3.51 Driver};  _
SERVER=localhost;  _
DATABASE=test;  _
UID=test;  _
PASSWORD=test;  _
OPTION=3
Dim MyConnection As New OdbcConnection(connString)
Try
MyConnection.Open()
MyConnection.Close()
Return connString
Catch e As Exception
Return e.Message
End Try
End Function
--
It's returning the following exception: ERROR [IM002] [Microsoft][ODBC
Driver Manager] Data source name not found and no default driver specified

Any ideas?

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

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




InnoDb restore - Please help

2002-09-27 Thread Scott Pippin

I am new to InnoDb and was wondering what steps I would have to do to
restore a table.  Lets assume I am backing up the data by backing up the
tablespaces.

Thanks in advance

(MySQL, 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: SQL question

2002-09-27 Thread William McCormick

I don't know that there is knowing the way sorts usually work I'd say no.
This is my first posting to this group and I am just in the initial phases
of supporting MySQL as a backend for out application.

If the numbers always precede the letters I would split them off into two
separate columns and index those columns. The numbers and letters may likely
represent something that could be used in your application as separate
entities. I may be off base but looks kind of like versioning.

Sincerely,

Will McCormick



-Original Message-
From: John Almberg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 8:05 PM
To: Mysql
Subject: SQL question


I'm trying to sort a table on a character-type field that contains mostly
numbers. This field always contains either a number or a number followed by
a character. Like '57' or '57a'.

I'd like to sort the table *numerically* on this field, not *alphabetically*
on this field. That is, I'd like the table to be sorted like:

1 ...
2 ...
2a ...
3 ...
4d ...

NOT like:

1 ...
11 ...
111a ...
2a ...
22 ...

See what I mean? This is a common problem, I think, when you sort an
character type field that contains numbers. The sort comes out all wrong.

Is there anyway I can achieve this sort using SQL? The target server is
running 3.22.32. Any ideas greatly appreciated!

-- John



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

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


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

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




rename database

2002-09-27 Thread Jorge Martinez

 Exists any way to rename a database ?
 
 Thanks Jorge

sql
 
 


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

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: stopping a query

2002-09-27 Thread Robert Citek


Hello Ozette,

At 05:36 AM 9/27/2002 -0400, Ozette Brown wrote:
To stop a running query, you'll need to do a 'myqsladmin processlist' 
 and once you find the PID for the query, issues a mysqladmin kill PID.
This should do the trick.

Is there not a more elegant solution?  Would not the above require me to
have the client and daemon running on the same machine?  Would not I also
have to have root priviledges to kill a process?

If not, how can I politely request to the developers to have the mysql
client trap the ctrl-C and pass it to the currently running query?

Regards,
- Robert


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

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: SQL question

2002-09-27 Thread John Almberg


Nope. I've tried every combination I can think of of these ideas. They all
give syntax errors. I don't think arithmatic is allowed in an ORDER BY
clause. Doesn't even work on an INT field.

-- John

 -Original Message-
 From: gerald_clark [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 27, 2002 9:52 AM
 To: John Almberg
 Cc: Mysql
 Subject: Re: SQL question


 ORDER BY  0 + fieldname

 if this is not quit right try

 ORDER BY  0 + fieldname ,  fieldname

 John Almberg wrote:

 That gives a syntax error, unfortunately.
 
 -- JOhn
 
 
 
 -Original Message-
 From: Mihail Manolov [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 9:51 PM
 To: Mysql
 Subject: Re: SQL question
 
 
 Try:
 
 SELECT fieldname FROM table ORDER 0+fieldname;
 
 
 Hope it helps.
 
 
 Mihail
 
 - Original Message -
 From: John Almberg [EMAIL PROTECTED]
 To: Mysql [EMAIL PROTECTED]
 Sent: Thursday, September 26, 2002 8:04 PM
 Subject: SQL question
 
 
 
 
 I'm trying to sort a table on a character-type field that
 
 
 contains mostly
 
 
 numbers. This field always contains either a number or a
 number followed
 
 
 by
 
 
 a character. Like '57' or '57a'.
 
 I'd like to sort the table *numerically* on this field, not
 
 
 *alphabetically*
 
 
 on this field. That is, I'd like the table to be sorted like:
 
 1 ...
 2 ...
 2a ...
 3 ...
 4d ...
 
 NOT like:
 
 1 ...
 11 ...
 111a ...
 2a ...
 22 ...
 
 See what I mean? This is a common problem, I think, when you sort an
 character type field that contains numbers. The sort comes out
 
 
 all wrong.
 
 
 Is there anyway I can achieve this sort using SQL? The target server is
 running 3.22.32. Any ideas greatly appreciated!
 
 -- John
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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




foreign key support??

2002-09-27 Thread Remco Barendse

Hi!

According to the website MySQL 4.0.x supports foreign key constraints.

For version 4.1 foreign key integrity rules are planned.

What is the difference between these 2? On previous versions of MySQL it 
was possible to create foreign keys but changed data was not replicated to 
other tables.

I need foreign key support for MySQL as is available in PostgreSQL.

Any input greatly appreciated!

Best regards,
Remco Barendse


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

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




re: Re: error:mysqld got signal 11

2002-09-27 Thread Victoria Reznichenko

Vaso,
Thursday, September 26, 2002, 11:48:03 PM, you wrote:

VK Hello Victoria,
VK I have installed mysql  3.23.49 for Sorlaris and I have installed it 
VK from the source distribution.

I checked it on 3.23.52 installed from binary and it worked well.

VK Do you have any idea about my problem?

Could you test it with our binaries?
There are many possible causes not related to MySQL code like wrong C
libc, buggy compiler and so on ..

VK Thanks :-)

VK Victoria Reznichenko wrote:

Vaso,
Thursday, September 26, 2002, 9:54:06 AM, you wrote:

VK I have started mysql server keeping binary logs and once in a while I
VK execute reset master.
VK Irregularly mysqld crashes and in the error logs I read the lines
VK bellow:

VK mysqld got signal 11;
VK This could be because you hit a bug. It is also possible that this
VK binary
VK or one of the libraries it was linked agaist is corrupt, improperly
VK built,
VK or misconfigured. This error can also be caused by malfunctioning
VK hardware.
VK We will try our best to scrape up some info that will hopefully help
VK diagnose
VK the problem, but since we have already crashed, something is definitely
VK wrong
VK and this may fail

VK key_buffer_size=67104768
VK record_buffer=1044480
VK sort_buffer=5242872
VK max_used_connections=9
VK max_connections=300
VK threads_connected=2
VK It is possible that mysqld could use up to
VK key_buffer_size + (record_buffer + sort_buffer)*max_connections =
VK 1907529 K
VK bytes of memory
VK Hope that's ok, if not, decrease some variables in the equation

VK Does anyone have any ideas what can I do about it and why is this
VK happening?

What version of MySQL do you use? What OS do you use? Did you installed
MySQL from the binary or from source distribution? You provided incomplere
enough info :(


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





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

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




Re: SHAPE command for Hierarchical Recordset

2002-09-27 Thread John Ragan


try corereader at http://ww.corereader.com/

it's certainly not designed to create reports with 
much of eye candy.

however, it queries mysql and access (and any other 
data source), lets you create queries with point and 
click, stores queries and connections, and gives you 
a few report headers.

it's mainly a query tool, but it outputs to text, 
schema based xml, etc, so you can feed its output 
into a word processor or whatever for eye candy.


 Where can I get those tools? With MS access, my queries work fine after
 importing the data from MySQL
 
 Thanks
 Emery
 - Original Message -
 From: CP [EMAIL PROTECTED]
 To: NZEYIMANA Emery Fabrice [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Friday, September 27, 2002 10:47 AM
 Subject: Re: SHAPE command for Hierarchical Recordset
 
 
  I would suggest you use MS Access report with MyTool-DLL For VB and MySQL.
 
  - Original Message -
  From: NZEYIMANA Emery Fabrice [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Friday, September 27, 2002 4:40 PM
  Subject: SHAPE command for Hierarchical Recordset
 
 
   I have created a MySQL database that will help me manage my Invoicing
  system
   but I have been stack when I tried to print a report using a VB
  application.
  
   I have read from Help that I will need to use a hierarchical recordset
 to
   achieve what I want to.
   You know an Invoice has some headers like: Customer names, Invoice
 number,
   ...
  
   It also has details of ordered products/services Like: Item ID,
  Description,
   ...
  
   So my invoice should look like:
   ++
   NZEYIMANA (Customer name)
   Some Addresses
  
   Invoice No.: 2002-09/5
 
  --
  --
   -+
   Item IDDescriptionQtyUPTotal
 
  --
  --
   -+
   12dfhsdfdsfjsd525
  125
   ...
   ...
   _
   Total
 125
   VAT: -
   ++
  
   To build such an invoice using ADO, VB, DataReport you need that
   Hierarchical recordset because DataReport won't accept if it is not a
   hierarchical recordset.
  
   How do I achieve this?
  
   Thanks
   Emery
  
 
 
 
 
 



-- 
John Ragan
[EMAIL PROTECTED]
501-228-0317
http://www.CoreReader.com/ 


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

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




Re: MySQL 4.0.3 on glibc-2.1.3?

2002-09-27 Thread Lenz Grimmer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Thursday 26 September 2002 15:11, Klaus Friis Østergaard wrote:

 Is it possible to run the new MySQL 4.0.3 on a system that uses glibc-2.1.3,
 especially the MySQL-shared?

Not using the precompiled binaries from the download pages (they have been built
against glibc 2.2.4), but if you recompile the MySQL source RPM on your system.

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

iD8DBQE9lIIqSVDhKrJykfIRAiVzAJ0WeEUseZwpYMso3zfNhBsszR6g8gCfcmB+
oJ9ckOXVjjfQsU15FrsVKWA=
=6NuZ
-END PGP SIGNATURE-


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

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




Force NOW() result to type datetime

2002-09-27 Thread Iago Sineiro

Hi all.

I execute the query SELECT NOW() in Delphi 5.0 against MySQL 3.22.30 and
Delphi understand that the column of the query is of type ftString (String)
when it should be ftDateTime (datetime).

Any query I execute that contains a datetime column returns the datetime
type.

In MySQL 4.0.3 I don't have this problem.

How could I change the result type from string to datetime?

Note: I use Delphi components WinZeos 3.0.2.

Thanks in advance.

Iago.




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

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




Obtaining a count of the First and Last values

2002-09-27 Thread Alexis Antonakis

Hi,

I have a table used for generating stats (In fact it is phpTracker)

What I am trying to do is to generate the 1st page visited and the last
paged visited, per session, but grouped together.

i.e.
request_timeSession referer_uri
21/09/2002 12:51:08 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php
21/09/2002 12:51:51 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?search=1
21/09/2002 12:51:58 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?view=1
21/09/2002 12:52:28 7cf95b3162dac3b1ac6049b784f9c0f2
/bid/index.php?displayid=81

this would produce:
First Page  Count
/bid/index.php  1
Last Page
/bid/index.php?displayid=81 1

Now for multiple sessions

request_timeSession referer_uri
21/09/2002 12:51:08 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php
21/09/2002 12:51:51 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?search=1
21/09/2002 12:51:58 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?view=1
21/09/2002 12:52:28 7cf95b3162dac3b1ac6049b784f9c0f2
/bid/index.php?displayid=81
21/09/2002 17:24:19 cb0b6d40a0c9004ebbbf9312ca13ecc1/bid/index.php
21/09/2002 17:24:50 cb0b6d40a0c9004ebbbf9312ca13ecc1/bid/index.php?view=1
21/09/2002 17:25:10 cb0b6d40a0c9004ebbbf9312ca13ecc1/bid/index.php?view=1
21/09/2002 17:25:38 cb0b6d40a0c9004ebbbf9312ca13ecc1
/bid/index.php?displayid=1

this would produce:
First Page  Count
/bid/index.php  2
Last Page
/bid/index.php?displayid=81 1
/bid/index.php?displayid=1  1

To add to this, some of the referrers have extra criteria which I want to
ignore
i.e.
if the value of the referer_uri field is:
/bid/index.php?displayid=1nextpage=2, I want to ignore everything after,
and including, the '' symbol.

I can do this using PHP, but I was wondering whether there is a way of doing
some or all of the above in a MySQL Query?
The main place where I fall down is when trying to COUNT upon the SUM of a
set of values, especially when trying to GROUP BY it.

MTIA
Alexis


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

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




Obtaining a count of the First and Last values

2002-09-27 Thread Alexis Antonakis

Hi,

I have a table used for generating stats (In fact it is phpTracker)

What I am trying to do is to generate the 1st page visited and the last
paged visited, per session, but grouped together.

i.e.
request_timeSession referer_uri
21/09/2002 12:51:08 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php
21/09/2002 12:51:51 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?search=1
21/09/2002 12:51:58 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?view=1
21/09/2002 12:52:28 7cf95b3162dac3b1ac6049b784f9c0f2
/bid/index.php?displayid=81

this would produce:
First Page  Count
/bid/index.php  1
Last Page
/bid/index.php?displayid=81 1

Now for multiple sessions

request_timeSession referer_uri
21/09/2002 12:51:08 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php
21/09/2002 12:51:51 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?search=1
21/09/2002 12:51:58 7cf95b3162dac3b1ac6049b784f9c0f2/bid/index.php?view=1
21/09/2002 12:52:28 7cf95b3162dac3b1ac6049b784f9c0f2
/bid/index.php?displayid=81
21/09/2002 17:24:19 cb0b6d40a0c9004ebbbf9312ca13ecc1/bid/index.php
21/09/2002 17:24:50 cb0b6d40a0c9004ebbbf9312ca13ecc1/bid/index.php?view=1
21/09/2002 17:25:10 cb0b6d40a0c9004ebbbf9312ca13ecc1/bid/index.php?view=1
21/09/2002 17:25:38 cb0b6d40a0c9004ebbbf9312ca13ecc1
/bid/index.php?displayid=1

this would produce:
First Page  Count
/bid/index.php  2
Last Page
/bid/index.php?displayid=81 1
/bid/index.php?displayid=1  1

To add to this, some of the referrers have extra criteria which I want to
ignore
i.e.
if the value of the referer_uri field is:
/bid/index.php?displayid=1nextpage=2, I want to ignore everything after,
and including, the '' symbol.

I can do this using PHP, but I was wondering whether there is a way of doing
some or all of the above in a MySQL Query?
The main place where I fall down is when trying to COUNT upon the SUM of a
set of values, especially when trying to GROUP BY it.

MTIA
Alexis


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

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: Not Null

2002-09-27 Thread Clayburn W. Juniel, III


On Thursday, September 26, 2002, at 06:30 AM, Egor Egorov wrote:

 Clayburn,
 Thursday, September 26, 2002, 3:58:13 AM, you wrote:

 CWJI I create a table with a VarChar field set to not null.  When I 
 do an
 CWJI insert into this table with no value for this field it goes 
 through
 CWJI without a problem.  I realize MySQL inserts a empty string into 
 the
 CWJI field.  But what a want is an error when this happens.  Is there 
 any
 CWJI way to force this?

 Yes, you are right, if you try to insert NULL into NOT NULL column, ''
 or 0 will be inserted:
http://www.mysql.com/doc/en/Bugs.html

 If you don't want to use default values, configure MySQL with 
 -DDONT_USE_DEFAULT_FIELDS

Thanks for the information.  I read also that MySQL AB says you should 
check insertions and updates in your program and not MySQL.

--
Clayburn W. Juniel, III -- Effective Software Solutions
Phone: (602) 326-7707Mobile: (602)326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.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: Re: [bug] koi8-r codepage bug

2002-09-27 Thread Victoria Reznichenko

Cyril,
Friday, September 27, 2002, 4:19:25 PM, you wrote:

CZ if I build mysql with
CZ ./configure --with-charset=koi8_ru
CZ then check (make; make check; make test) failed!

Because MySQL by default uses latin1 character set and you have compiled only
with koi8_ru.

CZ But if I build mysql with
CZ ./configure --with-extra-charsets=all 
CZ and then insert in /etc/my.cfg before mysqld start this strings:
CZ ---cut---
CZ [mysqld]
CZ character-sets-dir=/usr/share/mysql/charsets/
CZ default-character-set=koi8_ru
CZ ---cut---
CZ then all OK and query INSERT INTO COUNTRIES VALUES ('éÓÌÁÎÄÉÑ') not fail!

That's right.


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





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

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




Re: SQL question

2002-09-27 Thread speters

How about

SELECT fieldname FROM table ORDER BY CAST(fieldname as SIGNED)

UNSIGNED could replace SIGNED, depending on your needs.

this works for me on Mysql 4.02 alpha on solaris

regards,
sean peters
[EMAIL PROTECTED]


- Original Message -
From: John Almberg [EMAIL PROTECTED]
To: Mysql [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 8:29 AM
Subject: FW: SQL question



 Nope. I've tried every combination I can think of of these ideas. They all
 give syntax errors. I don't think arithmatic is allowed in an ORDER BY
 clause. Doesn't even work on an INT field.

 -- John

  -Original Message-
  From: gerald_clark [mailto:[EMAIL PROTECTED]]
  Sent: Friday, September 27, 2002 9:52 AM
  To: John Almberg
  Cc: Mysql
  Subject: Re: SQL question
 
 
  ORDER BY  0 + fieldname
 
  if this is not quit right try
 
  ORDER BY  0 + fieldname ,  fieldname
 
  John Almberg wrote:
 
  That gives a syntax error, unfortunately.
  
  -- JOhn
  
  
  
  -Original Message-
  From: Mihail Manolov [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 26, 2002 9:51 PM
  To: Mysql
  Subject: Re: SQL question
  
  
  Try:
  
  SELECT fieldname FROM table ORDER 0+fieldname;
  
  
  Hope it helps.
  
  
  Mihail
  
  - Original Message -
  From: John Almberg [EMAIL PROTECTED]
  To: Mysql [EMAIL PROTECTED]
  Sent: Thursday, September 26, 2002 8:04 PM
  Subject: SQL question
  
  
  
  
  I'm trying to sort a table on a character-type field that
  
  
  contains mostly
  
  
  numbers. This field always contains either a number or a
  number followed
  
  
  by
  
  
  a character. Like '57' or '57a'.
  
  I'd like to sort the table *numerically* on this field, not
  
  
  *alphabetically*
  
  
  on this field. That is, I'd like the table to be sorted like:
  
  1 ...
  2 ...
  2a ...
  3 ...
  4d ...
  
  NOT like:
  
  1 ...
  11 ...
  111a ...
  2a ...
  22 ...
  
  See what I mean? This is a common problem, I think, when you sort an
  character type field that contains numbers. The sort comes out
  
  
  all wrong.
  
  
  Is there anyway I can achieve this sort using SQL? The target server
is
  running 3.22.32. Any ideas greatly appreciated!
  
  -- John
  
  
  
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  
  
  
  
  
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  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: FW: SQL question

2002-09-27 Thread Joseph Bueno

Here is a small example I have just run :

mysql create table test (f char(20));
Query OK, 0 rows affected (0.90 sec)

mysql insert into test values ('11xbc');
Query OK, 1 row affected (0.01 sec)

mysql insert into test values ('2bcv');
Query OK, 1 row affected (0.00 sec)

mysql insert into test values ('1abc');
Query OK, 1 row affected (0.00 sec)

mysql select * from test order by 0+f;
+---+
| f |
+---+
| 1abc  |
| 2bcv  |
| 11xbc |
+---+
3 rows in set (0.00 sec)

mysql select version();
+---+
| version() |
+---+
| 3.23.39   |
+---+
1 row in set (0.64 sec)

Either you have a syntax error in your command or your version of mysql
is too old. May be you should consider an upgrade to 3.23.

Hope this helps
-- 
Joseph Bueno

John Almberg wrote:
 Nope. I've tried every combination I can think of of these ideas. They all
 give syntax errors. I don't think arithmatic is allowed in an ORDER BY
 clause. Doesn't even work on an INT field.
 
 -- John
 
 
-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 9:52 AM
To: John Almberg
Cc: Mysql
Subject: Re: SQL question


ORDER BY  0 + fieldname

if this is not quit right try

ORDER BY  0 + fieldname ,  fieldname

John Almberg wrote:


That gives a syntax error, unfortunately.

-- JOhn




-Original Message-
From: Mihail Manolov [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 9:51 PM
To: Mysql
Subject: Re: SQL question


Try:

SELECT fieldname FROM table ORDER 0+fieldname;


Hope it helps.


Mihail

- Original Message -
From: John Almberg [EMAIL PROTECTED]
To: Mysql [EMAIL PROTECTED]
Sent: Thursday, September 26, 2002 8:04 PM
Subject: SQL question





I'm trying to sort a table on a character-type field that



contains mostly



numbers. This field always contains either a number or a

number followed


by



a character. Like '57' or '57a'.

I'd like to sort the table *numerically* on this field, not



*alphabetically*



on this field. That is, I'd like the table to be sorted like:

1 ...
2 ...
2a ...
3 ...
4d ...

NOT like:

1 ...
11 ...
111a ...
2a ...
22 ...

See what I mean? This is a common problem, I think, when you sort an
character type field that contains numbers. The sort comes out



all wrong.



Is there anyway I can achieve this sort using SQL? The target server is
running 3.22.32. Any ideas greatly appreciated!

-- John





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

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




re: foreign key support??

2002-09-27 Thread Egor Egorov

Remco,
Friday, September 27, 2002, 6:29:28 PM, you wrote:

RB According to the website MySQL 4.0.x supports foreign key constraints.

RB For version 4.1 foreign key integrity rules are planned.

RB What is the difference between these 2? On previous versions of MySQL it 
RB was possible to create foreign keys but changed data was not replicated to 
RB other tables.

RB I need foreign key support for MySQL as is available in PostgreSQL.

Foreign key constraints currently is supported only on the InnoDB tables. Some
features for foreign key are still in the TODO list. Foreign key on
MyISAM tables will come in the 4.1



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




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

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




Re: foreign key support??

2002-09-27 Thread Paul DuBois

At 17:29 +0200 9/27/02, Remco Barendse wrote:
Hi!

According to the website MySQL 4.0.x supports foreign key constraints.

For version 4.1 foreign key integrity rules are planned.

What is the difference between these 2? On previous versions of MySQL it
was possible to create foreign keys but changed data was not replicated to
other tables.

I need foreign key support for MySQL as is available in PostgreSQL.

Any input greatly appreciated!

Best regards,
Remco Barendse

InnoDB tables support foreign key definitions as of 3.23.44.  This means
you cannot insert records into a child table unless the key value is listed
in the parent table.

MySQL 3.23.50 adds support for ON DELETE CASCADE and ON DELETE SET NULL.
This causes deletion of records in the parent table to affect the child
table.

ON UPDATE is not supported.

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

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: foreign key support??

2002-09-27 Thread Scott Pippin

It is supported in MySQL 4.0.x if you use the InnoDb table handler.  I'm
not sure about 4.1.

 Remco Barendse [EMAIL PROTECTED] 09/27/02 09:29AM 
Hi!

According to the website MySQL 4.0.x supports foreign key
constraints.

For version 4.1 foreign key integrity rules are planned.

What is the difference between these 2? On previous versions of MySQL
it 
was possible to create foreign keys but changed data was not replicated
to 
other tables.

I need foreign key support for MySQL as is available in PostgreSQL.

Any input greatly appreciated!

Best regards,
Remco Barendse


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

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: automating import process

2002-09-27 Thread sql_newbie

Hi Carl,

Thanks for your reply.

I have created a shell script but I get stuck on the part where it asks to
input password.

How do I get the script to input the password that I put in?

So far my script looks like this:

./mysql -u 'root' -p
echo abc

The script executes, but it just waits for the password after it executes
the line:
./mysql -u 'root' -p

Can anyone help with this? 


Thanks.

Peter
  





On Mon, 5 Aug 2002, Carl McNamee wrote:

 I'm assuming that you are using some form of unix in this.  From the system
 prompt type mysql -u root -ppassword  import_test1.  If this works just
 put it into a script (bash, perl, whatever) and run it either from the
 command line or via cron if you want it automated.
 
 Carl McNamee
 Systems Administrator
 Billing Concepts
 (210) 949-7282
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, August 03, 2002 11:58 PM
 To: [EMAIL PROTECTED]
 Subject: automating import process
 
 
 Hi,
 
 I want to try to automate a phonebook list import process into MySQL
 database.  The phonebook was originally created with MS Access and
 exported into a text file.  I upload that text file onto my server and I
 proceed with the following import process.
 
 Using Telnet I type:
 # ./mysql -u 'root' -p
 
 It then asks
 Enter password:
 
 I then select the database to use
 mysql use import_test1;
 
 I delete the previous phonebook list table because the import process does
 not know that it should replace the previous records even though there
 have been changes
 mysql use import_test1;
 
 mysql exit
 Bye
 
 
 I then import by doing the following:
 [root@ns2 bin]# ./mysqlimport --local -u root -p 
 --fields-terminated-by=, import_test1 phone2.txt
 Enter password:
 import_test1.phone2: Records: 53 Deleted: 0 Skipped: 0 Warnings: 1
 
 
 I was wondering is there anyway to automate this process in a script?
 
 I have never written a script in Linux before.  If I can automate this
 process, what kind of script should I use?  
 
 Thanks.
 
 Peter  
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: SQL question

2002-09-27 Thread Derek Scruggs

I just tried it and it works fine. It doesn't solve my similar problem,
which is related to letters coming *before* numbers, but the parser doesn't
reject it.

Wish I could offer a solution, but I'm not very knowledgable about MySQL
internals  config.

-Derek

 -Original Message-
 From: John Almberg [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 27, 2002 9:30 AM
 To: Mysql
 Subject: FW: SQL question



 Nope. I've tried every combination I can think of of these ideas. They all
 give syntax errors. I don't think arithmatic is allowed in an ORDER BY
 clause. Doesn't even work on an INT field.

 -- John



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

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




Re: Need help with simple problem... I think

2002-09-27 Thread Clayburn W. Juniel, III

On Thursday, September 26, 2002, at 10:46 AM, Darrell A. Sullivan, II 
wrote:

 I am sure I am going to feel ignorant when I get the answer to this 
 question
 because it will be something simple that I have overlooked, but here 
 goes
 anyhow.

 I am using MySQL Version 3.23.51-max.

 I am developing an N-tier application using Java on the server side
 accessing MySQL through JDBC.

 On one of my tables whenever someone makes a change to the record, 
 what I
 actually need to do is create a new record that is an exact copy of the
 existing record and apply the changes to it and set a deactivation 
 date on
 the original record so that it can later be viewed and we can see when 
 it
 was active and when it was deactivated.

 My problem is that I can't seem to put the SQL together to do this. You
 can't do an Insert...Into where the destination table also appears 
 in the
 From clause.

 What I need is something like insert into t1 select * from t1 where
 t1.ID=x. I have looked into the Select statement to see if there 
 was a
 way to do a Select t1.* into t2 temp from t1 where t1.id=x to create 
 a
 temporary table and then do an insert into t1 select * from t2, but 
 so far
 I can't see any way of doing this.

 It could be done in code by doing a select and rounding up all the 
 names of
 the fields except for the primary key and then creating an insert
 statement using the field names and values, but if there is a simpler 
 and
 less convoluted way of going about it I would prefer it.

Try this:

Create Temporary Table temp_table Select * From t1 Where ID = 'x';
Update temp_table Set ActivationDate = Now() where ID = 'x';
Insert into ti select * from temp_table where ID = 'x';

When I tried this a got a table already exist error on the first line, 
but the table was created correctly.  I also got an error on the third 
line but again it was entered correctly.

--
Clayburn W. Juniel, III -- Effective Software Solutions
Phone: (602) 326-7707Mobile: (602)326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.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: FW: SQL question

2002-09-27 Thread Mark Matthews

John Almberg wrote:

Nope. I've tried every combination I can think of of these ideas. They all
give syntax errors. I don't think arithmatic is allowed in an ORDER BY
clause. Doesn't even work on an INT field.

-- John
  

Have you tried a computed column, i.e,

SELECT BLAH, 0 + BLAH as orderByColumn ORDER BY orderByColumn ASC

-Mark

-- 
For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com




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

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




A FAQ type question, but not in the FAQ - How to change my hostname, but not make replication puke

2002-09-27 Thread Eric Frazier

Hi,

I changed my hostname(The DNS change was taken care of elseware) in FreeBSD 
4.6 in the rc.conf file, rebooted. Mysql had no problems starting, but it 
failed to start the slave.  In the new error log I saw:
020927 10:15:58  mysqld started
020927 10:15:59  InnoDB: Started
020927 10:15:59  Could not find target log during relay log initialization
020927 10:15:59  Warning: Can't create threads to handle slave
/usr/local/mysql/libexec/mysqld: ready for connections
020927 10:16:15  Could not find target log during relay log initialization

and I got a 'check permissions on master.info' sort of error when I tried 
to run 'slave start'

I see that error was related to a bug from a long time ago, but I am 
running 4.0.2 so I doubt that it is a bug issue.



Thanks,

Eric




Leading Edge Marketing Inc.
250-360-2992


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

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: FW: SQL question

2002-09-27 Thread jacob

A couple things off the top of my head:

- Have you looked into MySQL's 'SET' type?

- What about something like SELECT 0+fieldname as zerofield FROM table ORDER 
BY zerofield;

- Would using grouping help?

- Have you considered creating a custom character set? (This may be too 
extreme. Can be done with SET on the fly?) 
http://www.mysql.com/doc/en/Character_sets.html

Not sure if any of this will work but you can cross them off pretty quick 
probably.

Quoting John Almberg [EMAIL PROTECTED]:

 
 Nope. I've tried every combination I can think of of these ideas. They all
 give syntax errors. I don't think arithmatic is allowed in an ORDER BY
 clause. Doesn't even work on an INT field.
 
 -- John
 
  -Original Message-
  From: gerald_clark [mailto:[EMAIL PROTECTED]]
  Sent: Friday, September 27, 2002 9:52 AM
  To: John Almberg
  Cc: Mysql
  Subject: Re: SQL question
 
 
  ORDER BY  0 + fieldname
 
  if this is not quit right try
 
  ORDER BY  0 + fieldname ,  fieldname
 
  John Almberg wrote:
 
  That gives a syntax error, unfortunately.
  
  -- JOhn
  
  
  
  -Original Message-
  From: Mihail Manolov [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, September 26, 2002 9:51 PM
  To: Mysql
  Subject: Re: SQL question
  
  
  Try:
  
  SELECT fieldname FROM table ORDER 0+fieldname;
  
  
  Hope it helps.
  
  
  Mihail
  
  - Original Message -
  From: John Almberg [EMAIL PROTECTED]
  To: Mysql [EMAIL PROTECTED]
  Sent: Thursday, September 26, 2002 8:04 PM
  Subject: SQL question
  
  
  
  
  I'm trying to sort a table on a character-type field that
  
  
  contains mostly
  
  
  numbers. This field always contains either a number or a
  number followed
  
  
  by
  
  
  a character. Like '57' or '57a'.
  
  I'd like to sort the table *numerically* on this field, not
  
  
  *alphabetically*
  
  
  on this field. That is, I'd like the table to be sorted like:
  
  1 ...
  2 ...
  2a ...
  3 ...
  4d ...
  
  NOT like:
  
  1 ...
  11 ...
  111a ...
  2a ...
  22 ...
  
  See what I mean? This is a common problem, I think, when you sort an
  character type field that contains numbers. The sort comes out
  
  
  all wrong.
  
  
  Is there anyway I can achieve this sort using SQL? The target server is
  running 3.22.32. Any ideas greatly appreciated!
  
  -- John
  
  
  
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
  
  
  
  
  
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  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




Mysqld always shuts down after running mysqld

2002-09-27 Thread mailto

Description:
hi mysql team,
i am a mysql newbie (my first time i install it)
i give up, i can't solve the problem without help.
all the time i try to start the mysqld, it ends up instantly with a shutdown
of mysqld, i cant run the prog: i edited the mysqld.log and tried to figure
out the problem, here it is:

 '/usr/local/mysql/data/kolumbus.pid' (Errcode: 13)
020927 18:39:01  /usr/local/mysql/bin/mysqld: Can't find file:
'./mysql/host.frm' (errno: 13)
020927 18:39:01  /usr/local/mysql/bin/mysqld: Error on delete of
'/usr/local/mysql/data/kolumbus.pid' (Errcode: 13)
020927 18:39:01  mysqld ended

i looked for the files kolumbus.pid and didn't found one (find / -name
kolumbus.pid)
at the whole system. the host.frm is in the right pass.

in addition the message after runnung mysqld via config module:

kolumbus:/usr/local/mysql # ./configure --prefix=/usr/local/mysql/
NOTE: This is a MySQL binary distribution. It's ready to run, you don't
need to configure it!

To help you a bit, I am now going to create the needed MySQL databases
and start the MySQL server for you.  If you run into any trouble, please
consult the MySQL manual, that you can find in the Docs directory.

Installing all prepared tables
020927 18:37:29  ./bin/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
./bin/mysqladmin -u root  password 'new-password'
./bin/mysqladmin -u root -h kolumbus  password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
the ./bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd . ; ./bin/safe_mysqld 

You can test the MySQL daemon with the benchmarks in the 'sql-bench'
directory:
cd sql-bench ; run-all-tests

Please report any problems with the ./bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com

Starting the mysqld server.  You can test that it is up and running
with the command:
./bin/mysqladmin version
kolumbus:/usr/local/mysql # Starting mysqld daemon with databases from
/usr/local/mysql/data
020927 18:37:30  mysqld ended

at his point i tried to start mysqld direct but it stopped instantly with
this err message:

kolumbus:/usr/local/mysql # mysqld
Fatal error: Please read Security section of the manual to find out how
to run mysqld as root!
020927 19:40:13  Aborting

020927 19:40:13  mysqld: Shutdown Complete

so i tried to find a Security section at mysqld and mysql man pages but
didnt find something

i dont know how to work on that problem, i read the FAQ and the installation
guide,
also the documentation, but i didnt found something. i added the
mysqlbug-output to this mail.
I don't know if this is relevant for you: I tried to install an older
version before i tried this one, but i didn't realize to start the older one so i
picked this one. I tried to figure out the problem for 3 days now, I asked
friends and noone could help me, so i hope u can help me.

with best regards


joshua bacher
Submitter-Id:  submitter ID
Originator:root
Organization:
 organization of PR author (multiple lines)
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  synopsis of the problem (one line)
Severity:  [ non-critical | serious | critical ] (one line)
Priority:  [ low | medium | high ] (one line)
Category:  mysql
Class: [ sw-bug | doc-bug | change-request | support ] (one line)
Release:   mysql-3.23.48 (Source distribution)

Environment:
machine, os, target, libraries (multiple lines)
System: Linux kolumbus 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686
unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc
/usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.3/specs
gcc version 2.95.3 20010315 (SuSE)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS='-O2 -march=i486
-mcpu=i686  -D_FILE_OFFSET_BITS=64 
 -D_LARGEFILE_SOURCE
-felide-constructors
-fno-exceptions -fno-rtti'  LDFLAGS=''
LIBC: 
-rwxr-xr-x1 root root  1394238 Mar 23  2002 /lib/libc.so.6
-rw-r--r--1 root root 25361424 Mar 23  2002 /usr/lib/libc.a
-rw-r--r--1 root root  178 Mar 23  2002 /usr/lib/libc.so
Configure command: ./configure  --disable-shared
--with-mysqld-ldflags=-static --with-client-ldflags=-static --without-berkeley-db 
--without-innodb
--enable-assembler --enable-large-files --infodir=/usr/share/info
--libdir=/usr/lib --libexecdir=/usr/sbin --localstatedir=/var/lib/mysql
--mandir=/usr/share/man 

Re: rename database

2002-09-27 Thread Clayburn W. Juniel, III


On Friday, September 27, 2002, at 07:57 AM, Jorge Martinez wrote:

  Exists any way to rename a database ?

  Thanks Jorge

 sql

You can create a new database and then:

Rename Table old_database.table_name to new_database.table_name.

You would have to do this for every table.  You could then drop the old 
database.
--
Clayburn W. Juniel, III -- Effective Software Solutions
Phone: (602) 326-7707Mobile: (602)326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.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: Japanese Charset

2002-09-27 Thread Michael T. Babcock

Dawn Friedland wrote:

Prior to my client requesting that I add Japanese content to the content
tool  database, I had zero experience with characters sets other than
Latin. I always used notepad to filter out any weird MS Word formattings
and left the default as ANSI. 

I had that problem a year ago too, prior to doing Japanese database work.

Many people have recommended I use UTF-8. I interpreted that to mean
that when I have the Japanese text in notepad, I choose file, save as,
and then choose the encoding ast UTF-8. When I do that, and then
copy/paste to insert using the DOS prompt, I get the same problematic
results. Is there something I am missing or not understanding when
people tell me to use UTF-8  Am I supposed to configure the table
or database somehow to use it or should I be running the text through a
UTF-8 converter other than notepad? 
  

I wouldn't rely on your command prompt to be UTF-8 compliant; I'd 
recommend inserting data using a web interface if nothing else (or your 
own Unicode-compatible client) to a BINARY field (not TEXT) unless you 
have MySQL with Unicode support.  Treat the data as binary _everywhere_; 
pretend you can't translate it, etc. except using safe tools (like the 
iconv library on *nix).  UTF-8 is just an encoding of Unicode; you may 
get more milage in Windows using 16-bit Unicode.

See: http://www.unicode.org/ for reference, especially 
http://www.unicode.org/unicode/faq/basic_q.html.

To best deal with UTF-8 in a program, use dynamically-allocated strings 
and never assume things like the 4th char in a string is string[3] or 
anything.  Pass-through is the best way to deal with UTF-8 until you 
actually have to handle processing of it (doing something to a 
Unicode/UTF-8 string) -- read it from a Unicode-compliant program / 
field / widget and write it straight to the DB without translations, 
then read it when you need it and compare it against something if 
necessary and display it.  Just because it looks like garbage when its 
raw doesn't mean it _is_ garbage.

Others may have other tips ...

-- 
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock



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

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: automating import process

2002-09-27 Thread Iikka Meriläinen

Hi,

use this: mysql -u root -ppassword

It's important NOT to put a space between -p and the real password. Having a
password in a script is unsafe at its best, though. I'm not sure if you have
any other options than to put it that way or enter it manually each time you
run the script.

Regards,
Iikka

On Sat, 28 Sep 2002 [EMAIL PROTECTED] wrote:

 Hi Carl,

 Thanks for your reply.

 I have created a shell script but I get stuck on the part where it asks to
 input password.

 How do I get the script to input the password that I put in?

 So far my script looks like this:

 ./mysql -u 'root' -p
 echo abc

 The script executes, but it just waits for the password after it executes
 the line:
 ./mysql -u 'root' -p

 Can anyone help with this?


 Thanks.

 Peter






 On Mon, 5 Aug 2002, Carl McNamee wrote:

  I'm assuming that you are using some form of unix in this.  From the system
  prompt type mysql -u root -ppassword  import_test1.  If this works just
  put it into a script (bash, perl, whatever) and run it either from the
  command line or via cron if you want it automated.
 
  Carl McNamee
  Systems Administrator
  Billing Concepts
  (210) 949-7282
 
  -Original Message-
  From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, August 03, 2002 11:58 PM
  To: [EMAIL PROTECTED]
  Subject: automating import process
 
 
  Hi,
 
  I want to try to automate a phonebook list import process into MySQL
  database.  The phonebook was originally created with MS Access and
  exported into a text file.  I upload that text file onto my server and I
  proceed with the following import process.
 
  Using Telnet I type:
  # ./mysql -u 'root' -p
 
  It then asks
  Enter password:
 
  I then select the database to use
  mysql use import_test1;
 
  I delete the previous phonebook list table because the import process does
  not know that it should replace the previous records even though there
  have been changes
  mysql use import_test1;
 
  mysql exit
  Bye
 
 
  I then import by doing the following:
  [root@ns2 bin]# ./mysqlimport --local -u root -p
  --fields-terminated-by=, import_test1 phone2.txt
  Enter password:
  import_test1.phone2: Records: 53 Deleted: 0 Skipped: 0 Warnings: 1
 
 
  I was wondering is there anyway to automate this process in a script?
 
  I have never written a script in Linux before.  If I can automate this
  process, what kind of script should I use?
 
  Thanks.
 
  Peter
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  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


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


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

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




Re: SQL question

2002-09-27 Thread BobJ

I'm new at SQL so I may be off base, but in traditional programming practice
when you want that kind of sort (right justified) you would fill the field
with preceding zeros and that would cause the sort that you are seeking.
I'm sure that you could suppress the zeros on print with some sort of mask.
BobJ
- Original Message -
From: William McCormick [EMAIL PROTECTED]
To: John Almberg [EMAIL PROTECTED]; Mysql [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 10:08 AM
Subject: RE: SQL question


 I don't know that there is knowing the way sorts usually work I'd say no.
 This is my first posting to this group and I am just in the initial phases
 of supporting MySQL as a backend for out application.

 If the numbers always precede the letters I would split them off into two
 separate columns and index those columns. The numbers and letters may
likely
 represent something that could be used in your application as separate
 entities. I may be off base but looks kind of like versioning.

 Sincerely,

 Will McCormick



 -Original Message-
 From: John Almberg [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, September 26, 2002 8:05 PM
 To: Mysql
 Subject: SQL question


 I'm trying to sort a table on a character-type field that contains mostly
 numbers. This field always contains either a number or a number followed
by
 a character. Like '57' or '57a'.

 I'd like to sort the table *numerically* on this field, not
*alphabetically*
 on this field. That is, I'd like the table to be sorted like:

 1 ...
 2 ...
 2a ...
 3 ...
 4d ...

 NOT like:

 1 ...
 11 ...
 111a ...
 2a ...
 22 ...

 See what I mean? This is a common problem, I think, when you sort an
 character type field that contains numbers. The sort comes out all wrong.

 Is there anyway I can achieve this sort using SQL? The target server is
 running 3.22.32. Any ideas greatly appreciated!

 -- John



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

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


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

 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




possible left join problem?

2002-09-27 Thread Matt MacDougall

Hi,

I've got two tables, links and categories.

links ...


  id int(11) NOT NULL auto_increment,
  name text,
  note text,
  link text,
  category1 int(11) NOT NULL default '0',
  category2 int(11) NOT NULL default '0',
  category3 int(11) NOT NULL default '0',
  date_added timestamp(14) NOT NULL,
  rating int(11) NOT NULL default '0',
  how_many_votes int(11) NOT NULL default '0',
  display enum('yes','no') NOT NULL default 'no',
  PRIMARY KEY  (id)

categories ...


  id int(11) NOT NULL auto_increment,
  name text,
  description text,
  display enum('yes','no') NOT NULL default 'yes',
  PRIMARY KEY  (id)

Any one link could belong to as many as 3 categories.  Each link also has a
numerical rating.  What I'm trying to do is find the highest rated link in
each category so I can display the link.  From the mysql docs I've decided
to create a temporary table to figure this out but the sql below isn't
working.  Does anyone see any glaring errors here?  Or do you have thoughts
on how to do this easier?


CREATE TEMPORARY TABLE tmplinks (
id int(11),
name text,
link text,
category int(11) NOT NULL default '0',
rating int(11) NOT NULL default '0',
how_many_votes int(11) NOT NULL default '0');

LOCK TABLES links READ, categories READ, tmplinks WRITE;

INSERT INTO tmplinks SELECT id, name, link, MAX(category1) AS category,
rating, how_many_votes FROM links GROUP BY category1;

INSERT INTO tmplinks SELECT id, name, link, MAX(category2) AS category,
rating, how_many_votes FROM links GROUP BY category2;

INSERT INTO tmplinks SELECT id, name, link, MAX(category3) AS category,
rating, how_many_votes FROM links GROUP BY category3;

SELECT categories.id, categories.name, links.id, links.name, links.link,
links.category1, links.category2, links.category3, links.rating,
links.how_many_votes, tmplinks.category, tmplinks.rating
FROM categories, tmplinks
LEFT JOIN links ON categories.id = links.category1 OR categories.id =
links.category2 OR categories.id = links.category3
WHERE (links.category1=tmplinks.category OR
links.category2=tmplinks.category OR links.category3=tmplinks.category) AND
links.rating=tmplinks.rating AND links.display=yes GROUP BY
categories.name;

UNLOCK TABLES;

DROP TABLE tmplinks;


Thanks much!

-Matt MacDougall


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

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] Encrypted MySQL passwords

2002-09-27 Thread Steven Kreuzer

http://www.stunnel.org/examples/mysql.html

SK

mysql, sql, query

On Thursday, September 26, 2002, at 12:40 PM, John Holmes wrote:

 I am connecting to  a mysql server on a remote machine, and opened up
 port
 3306 for this purpose. But, I am concerned about sending a clear text
 password, via the mysql_pconnect() call. My question is, what is the
 procedure for connecting to a remote server with an encrypted
 password?
 Or, does mysql_pconnect handle this?

 Nope, it's all in the clear. MySQL 4.0 has support for doing this over
 SSL, I think.

 ---John Holmes...


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

 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: FW: SQL question

2002-09-27 Thread John Almberg

Yes, that works! Thank you very much!

-- John

 -Original Message-
 From: Mark Matthews [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 27, 2002 1:33 PM
 To: John Almberg
 Cc: Mysql
 Subject: Re: FW: SQL question
 
 
 John Almberg wrote:
 
 Nope. I've tried every combination I can think of of these 
 ideas. They all
 give syntax errors. I don't think arithmatic is allowed in an ORDER BY
 clause. Doesn't even work on an INT field.
 
 -- John
   
 
 Have you tried a computed column, i.e,
 
 SELECT BLAH, 0 + BLAH as orderByColumn ORDER BY orderByColumn ASC
 
 -Mark
 
 -- 
 For technical support contracts, visit https://order.mysql.com/?ref=mmma
 
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
   / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
  /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
 ___/ www.mysql.com
 
 
 

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

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




Postfix + MySQL on FreeBSD - Can't create a new thread

2002-09-27 Thread Marcio Merlone

Dears,

I'm running a postfix box with a mysql virtual users database on a 
FreeBSD 4.6.2 machine. It is a dual Xeon 800, 2GB RAM, 140GB Raid5 SCSI. 
This postfix holds about 11.000 virtual accounts and I'm running on a 
big problem.
Whem mysql approaches 240 simultaneous conections I get this error log:

Sep 26 17:26:21 koala postfix/smtpd[32250]: warning: connect to mysql 
server 10.0.0.4: Can't create a new thread (errno 35). If you are not 
out of available memory, you can consult the manual for a possible 
OS-dependent bug

I had to replicate my mysql server to distribute its load so I can have 
about 600 conections on 3 different servers.
On mysql site it says freebsd can have from 500 to 1000 conections on 
mysql, but mine can't!

Does anybody have any idea how to make it work without problem?
Ah! I have max_connections=5000 on my.cnf and maxusers=512 on kernel 
configuration.

One additional information: 2 of those 3 servers has mysql compiled from 
ports and only one supports more than 240 connections. The celeron 400 
with 64MB RAM and IDE disc supports 450 connections, while the dual xeon 
with 2GB RAM and RAID5 SCSI dies with only 240 connections. Both 
machines has same kernel configuration (aside of disks drivers), same 
sysctl parameters, etc.

Thanks for any idea or point to some usefull info.

Regards,

--
Marcio Merlone.


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

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

2002-09-27 Thread Support

From what I heard, yes.
If you stop MySQL, then rename the
dir/database.
It may work. Worked for me (did it
about 3 months ago).

HTH,
Ricardo.

- Original Message -
From: Jorge Martinez [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 11:57 AM
Subject: rename database


 Exists any way to rename a database ?

  Thanks Jorge

 sql




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

 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: CPU 100%

2002-09-27 Thread John R. Diehl, Jr.

If you find an answer, I would really like to hear about it.  I have 
been working on this for months.  No one seems to have a clear answer, 
although several people have reported curing it by either adding your 
server to c:\WINNT\system32\drivers\etc\hosts or setting the mysql 
service up to run logged in as a non-descript user.  Neither solution 
affects either of my W2K or XP computers.  The last response I got on 
the win32 list claims that the problem can go away and come back with no 
rhyme or reason.

Peter Zuidema wrote:

 Hello all,
 
 We use MySQL 3.23.51 on a NT Server and a Win2000 Server.
 
 On the Win2000 server all works fine. But wen we install MySQl on the NT
 Server
 CPU Usage goes through 100% for a while (20-30 seconds).
 
 What could be the reason of this?
 And how can we fix it?
 
 Regards
 Peter Zuidema
 [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
 


-- 
==
John R. Diehl, Jr.  FSU Department of Computer Science
==


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

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 and RedHat 7.3

2002-09-27 Thread Luc Foisy


When I installed Mysql ( whatever the current 3.x series is on RedHat 7.3, the service 
did not start when I restarted.
If you have gnome installed, you can acess Service Configuration and set MySQL to 
start when system boots.
Just information for those that may experience this.

Luc Foisy

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

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




Selective silence

2002-09-27 Thread rick

Is there anyway within a mysql batch script to make individual statements silent?
For example, if I have a script like:
select @t1:=desc from decode_table where id=42;
select @t2:=desc from decode_table where id=64;
select concat('the msg is ',ifnull(@t1,42),' part two is ',ifnull(@t2,64));

I just want the result of the last line to go to stdout, but all three lines go.  So I 
end up having to trick it up with a last line like:
select concat('##the msg is ',ifnull(@t1,42),' part two is ',ifnull(@t2,64));
and piping that to grep/sed to get my desired result (grep ^## | sed 's/^##//')

So - is there anyway to do selective select silence?  Or am I stuck with my tricked up 
version?

tia,
R




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

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




please help with sql query

2002-09-27 Thread Michael Knauf/Niles

I have two tables:

products
+-+--+--+-+-++
| Field   | Type | Null | Key | Default | Extra
|
+-+--+--+-+-++
| id  | int(6)   |  | PRI | NULL|
auto_increment |
| fg_number   | varchar(9)   |  | MUL | 0   |
|
| product_name| varchar(64)  |  | MUL | |
|
| product_description | varchar(255) |  | | |
|
+-+--+--+-+-++

and

images
+---+--+--+-+-++
| Field | Type | Null |
Key | Default | Extra  |
+---+--+--+-+-++
| id| int(6)   |  |
PRI | NULL| auto_increment |
| fg_number | varchar(8)   |  |
| ||
| image_name| varchar(64)  |  |
| ||
| thumbnail | varchar(255) | YES  |
| NULL||
| image_path| varchar(255) |  |
| ||
| color_depth   | enum('rgb','cmyk','greyscale','bitmap','vector') | YES  |
| NULL||
| width_inches  | decimal(6,0) | YES  |
| 0   ||
| height_inches | decimal(6,0) | YES  |
| 0   ||
| resolution| decimal(6,0) | YES  |
| 0   ||
| filesize  | varchar(36)  | YES  |
| NULL||
| filetype  | varchar(36)  | YES  |
| NULL||
| notes | text | YES  |
| NULL||
+---+--+--+-+-++

I've got a web page (php) that's displaying the images available for a
particular product using a query like:

select products.product_name, images.fg_number, images.image_name,
images.thumbnail, images.image_path, images.color_depth,
images.width_inches, images.height_inches, images.resolution,
images.filesize, images.filetype, images.notes from products, images where
products.fg_number ='$fg_number' and images.fg_number = products.fg_number;

Which works fine, as long as there is data in the images table
corresponding to a product, but in the case where there are no images
related to a particular fg_number, the query returns an empty set.

What I'd like to get, is the products.product_name regardless of weather
there are any corresponding images, so the variable $product_name will have
a value on the php page and I can generate a message something like sorry
there are no images of '$product_name' available...

I can see how to do this with 2 queries, but shouldn't I be able to do it
with one? and wouldn't I take a performance hit by running more than one
query per page?

Michael



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

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 instla

2002-09-27 Thread root


 I tried to start it with  safe-mysqld --u=mysql when I ran the mysqltest   I get 
cannot connect to local mysql server through  socket '/var/lib/mysql/mysql.sock'

Any idea ...

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

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 4.03 and merge tables: bug with BETWEEN

2002-09-27 Thread Tac

We're having a problem with a huge merge table and BETWEEN.  The same query
in MySQL 3, using an identical (binary) copy of the database, takes a
fraction of a second, in MySQL 4.03 it runs without stopping.

The query is a simple Select * from my_merge_table where my_code BETWEEN
'2026676653' AND '2026676655'

If I run a simple script that loops through the invidiual tables of the
merge table, using the same query (with each table), the response is very
fast.  And running the query when the operator is '=' instead of BETWEEN,
everything is fine, e.g.

Select * from my_merge_table where my_code = '2026676653'

Expanding out the BETWEEN still causes the query to run forever:

Select * from my_merge_table where my_code = '2026676653' AND my_code
= '2026676655'

Another bug that's in MySQL 3 (that I haven't checked in MySQL 4) is trying
to use a merge table where one of the tables has no rows.  When we create a
merge table, we go through each table first and check to make sure it has
something in it, otherwise, the merge table is created ok but queries
against it return no rows.

Finally, does anyone know if you can now use fulltext indexes with a merge
table?  We're not yet (since it's not supported), but I did see that on the
to-do list.

Thanks!

Tac


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

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




one step up ...

2002-09-27 Thread hans schneidhofer

hi list,
have a simple newbie-question
was looking for a possibility to go back one step after do a use sample_db 
but cannot find anything in the doc-files.

what I mean is this :
logging into mysql with using :
mysql -u root -p
then I get :
mysql 
now I'm using use sample_db
and can do some learnings, but how can I get back before use sample_db, so I 
can do a show databases; and see the mysql database ?

thanks for helping and bye
hans

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

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: FW: SQL question

2002-09-27 Thread John Almberg

Yes, that works! Thanks very much to all who suggested similar solutions!

-- John

 -Original Message-
 From: Mark Matthews [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 27, 2002 1:33 PM
 To: John Almberg
 Cc: Mysql
 Subject: Re: FW: SQL question
 
 
 John Almberg wrote:
 
 Nope. I've tried every combination I can think of of these 
 ideas. They all
 give syntax errors. I don't think arithmatic is allowed in an ORDER BY
 clause. Doesn't even work on an INT field.
 
 -- John
   
 
 Have you tried a computed column, i.e,
 
 SELECT BLAH, 0 + BLAH as orderByColumn ORDER BY orderByColumn ASC
 
 -Mark
 
 -- 
 For technical support contracts, visit https://order.mysql.com/?ref=mmma
 
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
   / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
  /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
 ___/ www.mysql.com
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

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

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




RE: FW: SQL question

2002-09-27 Thread John Almberg

Yes, that worked. Thanks to all who contributed similar solutions!

Now I'm going to mention MySQL in my message so that my message isn't
rejected as spam by the list manager! (What's that all about???)

Thanks again (mentioning MySQL again (just to be safe))

-- John

 -Original Message-
 From: Mark Matthews [mailto:[EMAIL PROTECTED]]
 Sent: Friday, September 27, 2002 1:33 PM
 To: John Almberg
 Cc: Mysql
 Subject: Re: FW: SQL question


 John Almberg wrote:

 Nope. I've tried every combination I can think of of these
 ideas. They all
 give syntax errors. I don't think arithmatic is allowed in an ORDER BY
 clause. Doesn't even work on an INT field.
 
 -- John
 
 
 Have you tried a computed column, i.e,

 SELECT BLAH, 0 + BLAH as orderByColumn ORDER BY orderByColumn ASC

 -Mark

 --
 For technical support contracts, visit https://order.mysql.com/?ref=mmma

 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
   / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
  /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
 ___/ www.mysql.com





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

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




Re: FW: SQL question

2002-09-27 Thread gerald_clark

Then try:
select  somefields,fieldname + 0 as orderfield order by orderfield


John Almberg wrote:

Nope. I've tried every combination I can think of of these ideas. They all
give syntax errors. I don't think arithmatic is allowed in an ORDER BY
clause. Doesn't even work on an INT field.

-- John

  

-Original Message-
From: gerald_clark [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 9:52 AM
To: John Almberg
Cc: Mysql
Subject: Re: SQL question


ORDER BY  0 + fieldname






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

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: please help with sql query

2002-09-27 Thread Clive Smart

Hi there

Try This:
SELECT products.product_name, products.fg_number, images.image_name, 
images.thumbnail, images.image_path, images.color_depth, 
images.width_inches, images.height_inches, images.resolution, 
images.filesize, images.filetype, images.notes
FROM products LEFT JOIN images ON products.fg_number = images.fg_number
WHERE products.fg_number='$fg_number';

Regards

Clive


Michael Knauf/Niles wrote:
 I have two tables:
 
 products
 +-+--+--+-+-++
 | Field   | Type | Null | Key | Default | Extra
 |
 +-+--+--+-+-++
 | id  | int(6)   |  | PRI | NULL|
 auto_increment |
 | fg_number   | varchar(9)   |  | MUL | 0   |
 |
 | product_name| varchar(64)  |  | MUL | |
 |
 | product_description | varchar(255) |  | | |
 |
 +-+--+--+-+-++
 
 and
 
 images
 
+---+--+--+-+-++
 | Field | Type | Null |
 Key | Default | Extra  |
 
+---+--+--+-+-++
 | id| int(6)   |  |
 PRI | NULL| auto_increment |
 | fg_number | varchar(8)   |  |
 | ||
 | image_name| varchar(64)  |  |
 | ||
 | thumbnail | varchar(255) | YES  |
 | NULL||
 | image_path| varchar(255) |  |
 | ||
 | color_depth   | enum('rgb','cmyk','greyscale','bitmap','vector') | YES  |
 | NULL||
 | width_inches  | decimal(6,0) | YES  |
 | 0   ||
 | height_inches | decimal(6,0) | YES  |
 | 0   ||
 | resolution| decimal(6,0) | YES  |
 | 0   ||
 | filesize  | varchar(36)  | YES  |
 | NULL||
 | filetype  | varchar(36)  | YES  |
 | NULL||
 | notes | text | YES  |
 | NULL||
 
+---+--+--+-+-++
 
 I've got a web page (php) that's displaying the images available for a
 particular product using a query like:
 
 select products.product_name, images.fg_number, images.image_name,
 images.thumbnail, images.image_path, images.color_depth,
 images.width_inches, images.height_inches, images.resolution,
 images.filesize, images.filetype, images.notes from products, images where
 products.fg_number ='$fg_number' and images.fg_number = products.fg_number;
 
 Which works fine, as long as there is data in the images table
 corresponding to a product, but in the case where there are no images
 related to a particular fg_number, the query returns an empty set.
 
 What I'd like to get, is the products.product_name regardless of weather
 there are any corresponding images, so the variable $product_name will have
 a value on the php page and I can generate a message something like sorry
 there are no images of '$product_name' available...
 
 I can see how to do this with 2 queries, but shouldn't I be able to do it
 with one? and wouldn't I take a performance hit by running more than one
 query per page?
 
 Michael
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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 instla

2002-09-27 Thread Clayburn W. Juniel, III


On Friday, September 27, 2002, at 12:28 PM, root wrote:


  I tried to start it with  safe-mysqld --u=mysql when I ran the 
 mysqltest   I get cannot connect to local mysql server through  socket 
 '/var/lib/mysql/mysql.sock'
 
 Any idea ...

Try:

safe_mysqld -u=mysql 

or

safe_mysqld --user=mysql 

--
Clayburn W. Juniel, III -- Effective Software Solutions
Phone: (602) 326-7707Mobile: (602)326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.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




granting FILE privileges

2002-09-27 Thread Mark Hennessy

I'm using FreeBSD 4.6 and MySQL 3.23.36

I keep trying to grant file privileges to a user, but no matter what I do,
it seems that the customer keeps getting access denied errors.

They are trying to execute the following:
select * into outfile '/tmp/list.txt' fields terminated by | lines terminated by 
\n from list;
ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)

I have tried using GRANT and REVOKE to recreate the user with the correct
priveleges.

I have even tried giving their user universal FILE and SELECT privileges
by hand by inserting them into the user table, and of course, flushing
privileges, and no luck.

Any ideas as to what settings could need to be changed?  Possibly a
restriction set at compile-time on users?

--
 Mark P. Hennessy [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: [PHP] Encrypted MySQL passwords

2002-09-27 Thread Mark Matthews

Steven Kreuzer wrote:

http://www.stunnel.org/examples/mysql.html

SK

mysql, sql, query

On Thursday, September 26, 2002, at 12:40 PM, John Holmes wrote:

  

I am connecting to  a mysql server on a remote machine, and opened up
  

port


3306 for this purpose. But, I am concerned about sending a clear text
password, via the mysql_pconnect() call. My question is, what is the
procedure for connecting to a remote server with an encrypted
  

password?


Or, does mysql_pconnect handle this?
  

Nope, it's all in the clear. MySQL 4.0 has support for doing this over
SSL, I think.

Actually, the password is never sent, in-the-clear or otherwise with 
MySQL. It's a challenge-response scheme based on a token the server 
gives the client on connect, and a hash of that token together with the 
password is sent back to the server. Only if both parties know the 
password, is the hash correct, and authentication is successful. In no 
case does the password actually travel over the wire.

-Mark

-- 
For technical support contracts, visit https://order.mysql.com/?ref=mmma

__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /  Mark Matthews [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
 /_/  /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
___/ www.mysql.com



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

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




Re: one step up ...

2002-09-27 Thread Clive Smart

Hi there

Just type in: show databases;, which will list all databases,
then type in: use mysql; or whichever database you require

Simple

Clive

hans schneidhofer wrote:
 hi list,
 have a simple newbie-question
 was looking for a possibility to go back one step after do a use sample_db 
 but cannot find anything in the doc-files.
 
 what I mean is this :
 logging into mysql with using :
 mysql -u root -p
 then I get :
 mysql 
 now I'm using use sample_db
 and can do some learnings, but how can I get back before use sample_db, so I 
 can do a show databases; and see the mysql database ?
 
 thanks for helping and bye
 hans
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: CPU 100%

2002-09-27 Thread Brian . Duke

Don't have a fix but look at the swap file size. May need to increase that.
A further note MS Access on NT run 100%,...100% of the time. 

-Original Message-
From: John R. Diehl, Jr. [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 1:05 PM
To: Peter Zuidema; [EMAIL PROTECTED]
Subject: Re: CPU 100%


If you find an answer, I would really like to hear about it.  I have 
been working on this for months.  No one seems to have a clear answer, 
although several people have reported curing it by either adding your 
server to c:\WINNT\system32\drivers\etc\hosts or setting the mysql 
service up to run logged in as a non-descript user.  Neither solution 
affects either of my W2K or XP computers.  The last response I got on 
the win32 list claims that the problem can go away and come back with no 
rhyme or reason.

Peter Zuidema wrote:

 Hello all,
 
 We use MySQL 3.23.51 on a NT Server and a Win2000 Server.
 
 On the Win2000 server all works fine. But wen we install MySQl on the NT
 Server
 CPU Usage goes through 100% for a while (20-30 seconds).
 
 What could be the reason of this?
 And how can we fix it?
 
 Regards
 Peter Zuidema
 [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
 


-- 
==
John R. Diehl, Jr.  FSU Department of Computer Science
==


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

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

2002-09-27 Thread Ken Menzel

Hi Cristiana,
   I am another FreeBSD user and I can tell you that FreeBSD 4.1.1
does have problems with threads.  I would very much recommend that you
update as there are also many security problems with that version if
you are running a server that is remotely available.   There were many
threads problems fixed in 4.3, the current version is 4.6.

Also this list is for the internal programming of how mysql works.
Please use [EMAIL PROTECTED] for questions that do not concern the
internal programming of MySQL.  I copied this response to the main
mailing list.

There is a really good tutorial on updating FreeBSD at
http://www.mostgraveconcern.com/freebsd/ See
http://www.mostgraveconcern.com/freebsd/cvsup.html

Good luck,
Ken
- Original Message -
From: Cristiana Amza [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, September 27, 2002 11:27 AM
Subject: MySQL overload problem ?



 Hi.

 We have been using MySQL for a couple of years as a back-end for a
dynamic
 content server. We are using it in a research setting, so we are
generally
 not averse to changing the MySQL code if necessary.
 This message, however is intended only to better understand its
inner workings.

 We see the following behaviour that we cannot really explain.

 We have a workload where several clients are concurrently
 issuing moderate-to-heavy-weight queries to MySQL.
 In particular, there is a query that takes about 700 msec if run
alone.
 If a low number of clients (e.g. 4-5!) execute this query
concurrently
 throughput degrades (to a value lower than if these queries were run
 sequentially).

 The query is a (SELECT) 3-table join, and has an order by and group
by
 clause (and limit 50).
 The query accesses a small amount of data and is CPU bound
 (there is little disk activity with warm caches).
 Other (INSERT/UPDATE) queries may run concurrently on the accessed
tables,
 but the problem appears even if there are none.
 The key point is - with very few concurrent clients, performance
degrades
 quite rapidly, and we need to limit the total load (in terms of
total
 execution time of queries outstanding at MySQL, not number of
clients/queries).

 We are not using the MySQL query cache.
 Table cache settings are standard.

 This points to a very high context-switching overhead.
 We have read in the documentation that this may be due to the thread
 library overhead because threads may acquire/release a mutex over a
 short critical region frequently.
 We are using FreeBSD 4.1.1 thus user-level threads, can't imagine
that context
 switching itself between (5!) threads could be that expensive,
unless it is
 for some reason very very frequent.
 Can you please elaborate on exactly the sequence of operations that
MySQL
 does that would produce this behaviour (possibly coupled with the
threading
 library's actions).

 We thank you in advance for shedding light on this. The problem has
 plagued us for some time.

 -Cristiana

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

 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]




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

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




RE: Mysql and RedHat 7.3

2002-09-27 Thread Brian . Duke

Redhat...Linux systems:
running Xwindows login at runlevel5

cd /etc/rc.d/init.d/rc5.d/

search for mysqld

mv ./K74mysqld ./S78mysqld

The K denotes Kill
The S denotes Start

If you run you system at a different run level like 3 then go to /rc5.d/
directory and change the file name there. The numbers represent at what time
does the system load that service in case some applications like syslog need
to be operational before mysqld can be started. I usually set it for some
number after S54inetd (xinetd) and before S85httpd. S79mysql works for me. 

-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 1:13 PM
To: MYSQL-List (E-mail)
Subject: Mysql and RedHat 7.3



When I installed Mysql ( whatever the current 3.x series is on RedHat 7.3,
the service did not start when I restarted.
If you have gnome installed, you can acess Service Configuration and set
MySQL to start when system boots.
Just information for those that may experience this.

Luc Foisy

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

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 and RedHat 7.3

2002-09-27 Thread Robert Citek


Hello Luc,

At 03:13 PM 9/27/2002 -0400, Luc Foisy wrote:
When I installed Mysql ( whatever the current 3.x series is on RedHat 7.3, 
the service did not start when I restarted.  If you have gnome installed, 
you can acess Service Configuration and set MySQL to start when system 
boots.  Just information for those that may experience this.

When you say restarted do you mean rebooted?  If so, you can also
check/set the service to on/off using the command line (i.e. regardless of
window manager) with chkconfig.  For example, to check if MySQL is set to
turn on automatically, login as root and type:
  chkconfig --list mysqld
To set mysqld to start automatically for runlevels 3, 4, and 5:
  chkconfig --level 345 mysqld on
To start the mysqld service manually in the current runlevel, type:
  service mysqld start

This works for RedHat Linux 7.x and maybe other linux distributions
(Mandrake, SuSE, etc.)

HTH,
- Robert


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

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: one step up ...

2002-09-27 Thread Clayburn W. Juniel, III


On Friday, September 27, 2002, at 12:56 PM, hans schneidhofer wrote:

 hi list,
 have a simple newbie-question
 was looking for a possibility to go back one step after do a use 
 sample_db
 but cannot find anything in the doc-files.

 what I mean is this :
 logging into mysql with using :
 mysql -u root -p
 then I get :
 mysql 
 now I'm using use sample_db
 and can do some learnings, but how can I get back before use 
 sample_db, so I
 can do a show databases; and see the mysql database ?

You can do a show databases at any location.
--
Clayburn W. Juniel, III -- Effective Software Solutions
Phone: (602) 326-7707Mobile: (602)326-7707
Email: [EMAIL PROTECTED]
http://EffectiveSoftwareSolutions.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




Basic RPM Installation

2002-09-27 Thread DeNewbie


I am new to this newsgroup and I am a SUSE Linux 7.3 user. I want to learn how to use 
PHP and MySQL and I am reading the MySQL reference manual. Firstly I am trying to 
install these RPM files.

 MySQL-3.23.52-1.i386.rpm
 MySQL-client-3.23.52-1.i386.rpm
 MySQL-devel-3.23.52-1.i386.rpm

They all installed successfully;

Then from  /usr/local I ran mysql_install_db and I got this;



cords-orj86jfje:/usr/local # mysql_install_db
Installing all prepared tables
020927 18:06:15  /usr/sbin/mysqld: Shutdown Complete


To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/usr/bin/mysqladmin -u root  password 'new-password'
/usr/bin/mysqladmin -u root -h cords-orj86jfje  password 'new-password'
See the manual for more instructions.

NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
able to use the new GRANT command!

You can start the MySQL daemon with:
cd / ; /usr/bin/safe_mysqld 

You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
cd sql-bench ; run-all-tests

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at https://order.mysql.com




Now at this point what do I do ??

I put in my passwords successfully but when I entered the 
safe_mysqld  I got this;




mike@cords-orj86jfje:/usr/bin safe_mysqld 
[1] 1759
mike@cords-orj86jfje:/usr/bin cat: /var/lib/mysql/cords-orj86jfje.pid: Permission 
denied
rm: cannot unlink `/var/lib/mysql/cords-orj86jfje.pid': Permission denied
Fatal error: Can't remove the pid file: /var/lib/mysql/cords-orj86jfje.pid
/usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied
Please remove it manually and start /usr/bin/safe_mysqld again
mysqld daemon not started



What do I do from here ???

Thanks, DeNewbie

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

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: Fixed width alternative to TEXT type field?

2002-09-27 Thread Gary Traffanstedt

On Thursday 26 September 2002 11:16 pm, Jeremy Zawodny scribbled something 
about:
 On Thu, Sep 26, 2002 at 11:24:14AM -0700, Gary Traffanstedt wrote:
  sql,query
 
  I have a table that has approximately 40 colums and all but 1 of
  them I have been able to make fixed width. The sole hold out is of
  the type TEXT and needs to be able to hold approximately 1000
  characters. The reason why I want it to be a fixed width field is
  for speed and reliability. From what I have read, if a table has no
  variable width fields, the database can access data faster.

 Right.  There's a lot less work involved in locating a random row.
 Since you know they're all the same size, it's a matter of
 multiplication.  No need to check all the row headers.

  Maybe you can answer a couple of questions for me. First, will
  having all fixed-width fields make a noticeable difference?

 That depends.  Can you benchmark it and see, using your real data?

  Second, is there a field that is fixed-width that can handle
  approximately 1,000 characters or is TEXT my only option?

 No.  But you could use 4 CHAR(250) columns.  Or try and compress the

Thank you very much for your help. zlib was not able to compress my data 
enough. For english characters it did fine but for Arabic characters it 
wasn't enough so I tried Compress::Bzip2 and that did the trick. I tested it 
to 5,000 characters using the highest level of compression and it was able to 
handle it. Now I'll play with it and turn the compression level down to save 
a bit on speed.
Thanks again!!!

-Gary

 data to fit it into a 255 byte field (zlib, perhaps).

 Jeremy


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

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




Basic RPM Installation

2002-09-27 Thread DeNewbie

--  Forwarded message --
Date: Fri, 27 Sep 2002 19:27:22 -0400
From: DeNewbie [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Basic RPM Installation

 
 I am new to this newsgroup and I am a SUSE Linux 7.3 user. I want to learn how to 
use PHP and MySQL and I am reading the MySQL reference manual. Firstly I am trying to 
install these RPM files.
 
  MySQL-3.23.52-1.i386.rpm
  MySQL-client-3.23.52-1.i386.rpm
  MySQL-devel-3.23.52-1.i386.rpm
 
 They all installed successfully;
 
 Then from  /usr/local I ran mysql_install_db and I got this;
 
 
 
 cords-orj86jfje:/usr/local # mysql_install_db
 Installing all prepared tables
 020927 18:06:15  /usr/sbin/mysqld: Shutdown Complete
 
 
 To start mysqld at boot time you have to copy support-files/mysql.server
 to the right place for your system
 
 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 This is done with:
 /usr/bin/mysqladmin -u root  password 'new-password'
 /usr/bin/mysqladmin -u root -h cords-orj86jfje  password 'new-password'
 See the manual for more instructions.
 
 NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
 the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
 able to use the new GRANT command!
 
 You can start the MySQL daemon with:
 cd / ; /usr/bin/safe_mysqld 
 
 You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
 cd sql-bench ; run-all-tests
 
 Please report any problems with the /usr/bin/mysqlbug script!
 
 The latest information about MySQL is available on the web at
 http://www.mysql.com
 Support MySQL by buying support/licenses at https://order.mysql.com
 
 
 
 
 Now at this point what do I do ??
 
 I put in my passwords successfully but when I entered the 
 safe_mysqld  I got this;
 
 
 
 
 mike@cords-orj86jfje:/usr/bin safe_mysqld 
 [1] 1759
 mike@cords-orj86jfje:/usr/bin cat: /var/lib/mysql/cords-orj86jfje.pid: Permission 
denied
 rm: cannot unlink `/var/lib/mysql/cords-orj86jfje.pid': Permission denied
 Fatal error: Can't remove the pid file: /var/lib/mysql/cords-orj86jfje.pid
 /usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied
 Please remove it manually and start /usr/bin/safe_mysqld again
 mysqld daemon not started
 
 
 
 What do I do from here ???
 
 Thanks, DeNewbie

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

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 to see warning messages for load data infile

2002-09-27 Thread David Yee

Hi all.  I'm trying to load a file into mysql using load data infile and
got a ton of warnings.  Is there any way to see what the warnings are?
Thanks.
 
David

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

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: Basic RPM Installation

2002-09-27 Thread Chuck \PUP\ Payne

Did you install from the SuSE CD? If so then you have to tell YaST to start
MySQL. You can start it from /etc/rc.d/mysql. If you want to use PHP you
will need to tell YaST to install PHP for apache as well. SuSE has made
running MySQL and PHP so easy by using YaST. Also run YaST to update PHP
there been an update on 7.3.

If you need any more help. Let me know I have used SuSE since 5.3 and I am
currently on 8.0.

Chuck Payne


On 9/27/02 7:27 PM, DeNewbie [EMAIL PROTECTED] wrote:

 
 I am new to this newsgroup and I am a SUSE Linux 7.3 user. I want to learn how
 to use PHP and MySQL and I am reading the MySQL reference manual. Firstly I am
 trying to install these RPM files.
 
 MySQL-3.23.52-1.i386.rpm
 MySQL-client-3.23.52-1.i386.rpm
 MySQL-devel-3.23.52-1.i386.rpm
 
 They all installed successfully;
 
 Then from  /usr/local I ran mysql_install_db and I got this;
 
 
 
 cords-orj86jfje:/usr/local # mysql_install_db
 Installing all prepared tables
 020927 18:06:15  /usr/sbin/mysqld: Shutdown Complete
 
 
 To start mysqld at boot time you have to copy support-files/mysql.server
 to the right place for your system
 
 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 This is done with:
 /usr/bin/mysqladmin -u root  password 'new-password'
 /usr/bin/mysqladmin -u root -h cords-orj86jfje  password 'new-password'
 See the manual for more instructions.
 
 NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
 the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
 able to use the new GRANT command!
 
 You can start the MySQL daemon with:
 cd / ; /usr/bin/safe_mysqld 
 
 You can test the MySQL daemon with the benchmarks in the 'sql-bench'
 directory:
 cd sql-bench ; run-all-tests
 
 Please report any problems with the /usr/bin/mysqlbug script!
 
 The latest information about MySQL is available on the web at
 http://www.mysql.com
 Support MySQL by buying support/licenses at https://order.mysql.com
 
 
 
 
 Now at this point what do I do ??
 
 I put in my passwords successfully but when I entered the
 safe_mysqld  I got this;
 
 
 
 
 mike@cords-orj86jfje:/usr/bin safe_mysqld 
 [1] 1759
 mike@cords-orj86jfje:/usr/bin cat: /var/lib/mysql/cords-orj86jfje.pid:
 Permission denied
 rm: cannot unlink `/var/lib/mysql/cords-orj86jfje.pid': Permission denied
 Fatal error: Can't remove the pid file: /var/lib/mysql/cords-orj86jfje.pid
 /usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied
 Please remove it manually and start /usr/bin/safe_mysqld again
 mysqld daemon not started
 
 
 
 What do I do from here ???
 
 Thanks, DeNewbie
 
 -
 Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
 
 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 and RedHat 7.3

2002-09-27 Thread Brian . Duke

Oops correction:

If you run you system at a different run level like 3 then go to /rc3.d/
directory and change the file name there.

-Original Message-
From: Duke, Brian 
Sent: Friday, September 27, 2002 3:45 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Mysql and RedHat 7.3


Redhat...Linux systems:
running Xwindows login at runlevel5

cd /etc/rc.d/init.d/rc5.d/

search for mysqld

mv ./K74mysqld ./S78mysqld

The K denotes Kill
The S denotes Start

If you run you system at a different run level like 3 then go to /rc5.d/
directory and change the file name there. The numbers represent at what time
does the system load that service in case some applications like syslog need
to be operational before mysqld can be started. I usually set it for some
number after S54inetd (xinetd) and before S85httpd. S79mysql works for me. 

-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 27, 2002 1:13 PM
To: MYSQL-List (E-mail)
Subject: Mysql and RedHat 7.3



When I installed Mysql ( whatever the current 3.x series is on RedHat 7.3,
the service did not start when I restarted.
If you have gnome installed, you can acess Service Configuration and set
MySQL to start when system boots.
Just information for those that may experience this.

Luc Foisy

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

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: automating import process

2002-09-27 Thread sql_newbie

Thanks for your reply.

Just out of curiousity, is it possible to use it by echoing back the
password somehow?

I think that echoing back the reply would work great if I ever needed
any unattended process using scripts.

Thanks.

Peter

On Fri, 27 Sep 2002, [ISO-8859-1] Iikka Meriläinen wrote:

 Hi,
 
 use this: mysql -u root -ppassword
 
 It's important NOT to put a space between -p and the real password. Having a
 password in a script is unsafe at its best, though. I'm not sure if you have
 any other options than to put it that way or enter it manually each time you
 run the script.
 
 Regards,
 Iikka
 
 On Sat, 28 Sep 2002 [EMAIL PROTECTED] wrote:
 
  Hi Carl,
 
  Thanks for your reply.
 
  I have created a shell script but I get stuck on the part where it asks to
  input password.
 
  How do I get the script to input the password that I put in?
 
  So far my script looks like this:
 
  ./mysql -u 'root' -p
  echo abc
 
  The script executes, but it just waits for the password after it executes
  the line:
  ./mysql -u 'root' -p
 
  Can anyone help with this?
 
 
  Thanks.
 
  Peter
 
 
 
 
 
 
  On Mon, 5 Aug 2002, Carl McNamee wrote:
 
   I'm assuming that you are using some form of unix in this.  From the system
   prompt type mysql -u root -ppassword  import_test1.  If this works just
   put it into a script (bash, perl, whatever) and run it either from the
   command line or via cron if you want it automated.
  
   Carl McNamee
   Systems Administrator
   Billing Concepts
   (210) 949-7282
  
   -Original Message-
   From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
   Sent: Saturday, August 03, 2002 11:58 PM
   To: [EMAIL PROTECTED]
   Subject: automating import process
  
  
   Hi,
  
   I want to try to automate a phonebook list import process into MySQL
   database.  The phonebook was originally created with MS Access and
   exported into a text file.  I upload that text file onto my server and I
   proceed with the following import process.
  
   Using Telnet I type:
   # ./mysql -u 'root' -p
  
   It then asks
   Enter password:
  
   I then select the database to use
   mysql use import_test1;
  
   I delete the previous phonebook list table because the import process does
   not know that it should replace the previous records even though there
   have been changes
   mysql use import_test1;
  
   mysql exit
   Bye
  
  
   I then import by doing the following:
   [root@ns2 bin]# ./mysqlimport --local -u root -p
   --fields-terminated-by=, import_test1 phone2.txt
   Enter password:
   import_test1.phone2: Records: 53 Deleted: 0 Skipped: 0 Warnings: 1
  
  
   I was wondering is there anyway to automate this process in a script?
  
   I have never written a script in Linux before.  If I can automate this
   process, what kind of script should I use?
  
   Thanks.
  
   Peter
  
  
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   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
 
 
 **
 * Iikka Meriläinen   *
 * E-mail: [EMAIL PROTECTED] *
 * Vaala, Finland *
 **
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


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

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: Basic RPM Installation

2002-09-27 Thread John Coder

On Fri, 2002-09-27 at 19:27, DeNewbie wrote:
 
 I am new to this newsgroup and I am a SUSE Linux 7.3 user. I want to learn how to 
use PHP and MySQL and I am reading the MySQL reference manual. Firstly I am trying to 
install these RPM files.
 
  MySQL-3.23.52-1.i386.rpm
  MySQL-client-3.23.52-1.i386.rpm
  MySQL-devel-3.23.52-1.i386.rpm
 
 They all installed successfully;
 
 Then from  /usr/local I ran mysql_install_db and I got this;
 
 
 
 cords-orj86jfje:/usr/local # mysql_install_db
 Installing all prepared tables
 020927 18:06:15  /usr/sbin/mysqld: Shutdown Complete
 
 
 To start mysqld at boot time you have to copy support-files/mysql.server
 to the right place for your system
 
 PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
 This is done with:
 /usr/bin/mysqladmin -u root  password 'new-password'
 /usr/bin/mysqladmin -u root -h cords-orj86jfje  password 'new-password'
 See the manual for more instructions.
 
 NOTE:  If you are upgrading from a MySQL = 3.22.10 you should run
 the /usr/bin/mysql_fix_privilege_tables. Otherwise you will not be
 able to use the new GRANT command!
 
 You can start the MySQL daemon with:
 cd / ; /usr/bin/safe_mysqld 
 
 You can test the MySQL daemon with the benchmarks in the 'sql-bench' directory:
 cd sql-bench ; run-all-tests
 
 Please report any problems with the /usr/bin/mysqlbug script!
 
 The latest information about MySQL is available on the web at
 http://www.mysql.com
 Support MySQL by buying support/licenses at https://order.mysql.com
 
 
 
 
 Now at this point what do I do ??
 
 I put in my passwords successfully but when I entered the 
 safe_mysqld  I got this;
 
 
 
 
 mike@cords-orj86jfje:/usr/bin safe_mysqld 
 [1] 1759
 mike@cords-orj86jfje:/usr/bin cat: /var/lib/mysql/cords-orj86jfje.pid: Permission 
denied
 rm: cannot unlink `/var/lib/mysql/cords-orj86jfje.pid': Permission denied
 Fatal error: Can't remove the pid file: /var/lib/mysql/cords-orj86jfje.pid
 /usr/bin/safe_mysqld: /var/lib/mysql/cords-orj86jfje.err: Permission denied
 Please remove it manually and start /usr/bin/safe_mysqld again
 mysqld daemon not started

From the sounds of it you must remove those files as root since mysql is
the owner of them.

John Coder


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

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




Duplicate entries

2002-09-27 Thread John Coder

at work I run mysql 3.23.45. on a windows2000 machine with apache 1.3.23
and php4.06. at home it's Linux SuSe *.0, mysql 4.03 apache 1.3.26 and
php4.2.3. the problem is I'm having problems inserting data into
temporary tables. the results are different running the same script.
here is the script (It's semi long so please bear with me).
$CreateTempTable=mysql_query(Create temporary table
 Tmp (maintId int unique,
 deptId varchar(30),
 exhibitId VARCHAR(30),
 datefinished date,
 progressId VARCHAR(33),
 reset int(1)));
//create temp table for all occurrences during dates specified

mysql_query(INSERT into Tmp
SELECT maintId, 
deptId, 
exhibitId, 
datefinished,
progressId, 
reset
from maintenance where DateReported='$firstdate'
and DateReported='$lastdate');
// insert into temporary table date reported data

mysql_query(INSERT into Tmp
SELECT maintId, 
deptId, 
exhibitId, 
datefinished, 
progressId, 
reset
from maintenance where DateFinished='$firstdate'
and DateFinished='$lastdate');
// insert into temporary table date finished data

mysql_query(INSERT INTO Tmp
SELECT maintId, 
deptId, 
exhibitId, 
datefinished, 
progressId, 
reset 
from maintenance where DateReported='$firstdate'
and DateFinished='-00-00');
//insert into  temporary table unfinished and previously started data

mysql_query(INSERT into Tmp
SELECT maintId, 
deptId, 
exhibitId,
datefinished,  
progressId, 
reset
from maintenance where DateReported='$firstdate'
and DateFinished='$lastdate');
// insert into temporary table finished and previously started data

mysql_query(UPDATE Tmp set progressid='in progress'
where DateFinished'$lastdate');
//change database to show what was completed by lastdate

mysql_query(alter table Tmp add complete
tinyint default 0);
//added to be able to sum() complete

mysql_query(alter table Tmp add InProgress
tinyint default 0);
// added to be able to sum() InProgress

mysql_query(Alter table Tmp add parts
tinyint default 0);
//added to be able to sum() parts

mysql_query(ALTER TABLE Tmp add deferred 
tinyint default 0);
//added to be able to sum() deferred

mysql_query(UPDATE Tmp set complete='1' where
progressId='complete');
//changed to be able to sum()complete

mysql_query(UPDATE Tmp set InProgress='1'
where progressId='in progress');
//changed to be able to sum()InProgress

mysql_query(UPDATE Tmp set parts='1'
where progressId='waiting for parts');
//changed to be able to sum()Waiting for parts

mysql_query(UPDATE Tmp set deferred='1'
where progressId='deferred');
//changed to be able to sum() deferred

$row=mysql_query(SELECT  dept.name,
count(Tmp.deptId),
sum(complete),
sum(InProgress),
sum(parts),
sum(deferred),
sum(reset)/sum(complete) * 100,
 sum(reset)/$days_result from Tmp, dept where
Tmp.deptId=dept.deptid
 Group by dept.deptId order by dept.name);
 // selecting departments by groups
 
 if ($row==0)
  

MySql Insert optimization

2002-09-27 Thread Dan Cumpian

Hello,
 
I am running MySql on a Windows 2000 PIII-1Ghz PC with 256MB of RAM. I
have three table that need to get updates when a new record gets
created. I have minimized the number of indexes on the tables and the
insert process goes like this:
 
(All three tables have a primary key to prevent duplicates)
 
Try 
  Insert into table1…
Except
  // Record already exists…
End;
 
Try
  Insert into table2…
Except
  // Record already exists…
End;
 
Try 
  Insert into table3…
Except
  // Record already exists…
End;
 
Each table contains different data that is parsed from the data that is
passed to the insert module. This module contains these three inserts. I
am using CHAR fields rather than VARCHARS, because I read that MySQL
handled these fields more efficiently (even though there is a cost in
storage space). 
 
My question is: I am running the default NT version with the default
settings, the table types are all MyISAM, however, I am only able to
process approximately 7-10 transactions (into all three tables) per
second. Is this a “reasonable” expectation of the performance I can
expect?
 
What server variables should I modify (if any) for better performance?
 
Thanks for any advice,
Dan Cumpian
 
 
 


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

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

2002-09-27 Thread Mrs. ELIZABETH OBED

Dear mysql ,

MRS ELIZABETH OBED
C/O. SAM BELLO
BARRISTER SAM BELLO  CO.
LEGAL PRACTITIONAL 2,
FALOHUN STREET,
AGUDA S/L LAGOS,
NIGERIA.
FAX: 234-1-7594260

 I am Mrs. Elziabeth Obed, widow of the late Lt. Col. M. Obed, the former military 
Administrator of Kaduna state of Nigeria. my late husband was one of the victims of 
the 7th November 1996 ADC Aircraft Boing 727 that crashed in Lagos. I have just been 
informed by our family attorney, Barrister SAM BELLO that my late husband operated a 
secret account with the Union Bank Plc into which a total sum of Thirty million United 
state Dollars ($30,000,000.00) was lodged in. This above mentioned amount was paid in 
and credited in the name of his American business friend Engr. John Creek who 
unfortunately died in the same mishap. The attorney now advised me to seek in 
confidence a foreign partner whom this fund would be transferred into his/her bank 
account for disbursement as directed by my late husband's WILL. It has been resolved 
that 20% will be your share for nominating an account for this purpose and any other 
assistance you will give in this regard. 10% has been slated out for the reimbursement 
of local and international expenses which may be incurred in the transfer process. 
finally, 70% will come to my children and my self and good part of this shall be 
directed towards executing my late husband's WILL, which is to buy shares and stocks 
in foreign country to secure his children's future. To facilitate the conclusion of 
this project if accepted by you, do send to me promptly via email your response or you 
direct it to my family attorney through his direct fax line: 234-1-7594260. You should 
please furnish us with the following details: 1. The bank Account number to be used 
for the remittance. 2. Name and address of the bank. 3. Your telephone, fax and mobile 
numbers for easy communication Please note that I have been assured that the 
transaction will be concluded within (2) weeks upon receiving from you the above 
listed information. May I at this point emphasis the high level of confidentiality 
which this business demands and hope you will not betray the trust and confidence 
which I repose on you. Since the death of my husband, life has been very difficult for 
my children and I, so this is to say that this fund is the hope of my children and I. 
God woÇÔj-bless you as you assist the poor widow and the fatherless children.
 Best wishes and many thanks.
Mrs. ELIZABETH OBED




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

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




DB Problems

2002-09-27 Thread Odhiambo Washington

Hi Users,

I have some problems with my database and not being quite profficient in SQL,
I did myisamcheck and posted the data on the site below:

http://ns2.wananchi.com/~wash/RT2/myisamcheck.txt

I am wondering if someone can take a look and possibly tell me if they notice
a problem and what I can do to fix that problem.


Thanking you in advance.


-Wash

-- 
Odhiambo Washington   [EMAIL PROTECTED]  The box said 'Requires
Wananchi Online Ltd.  www.wananchi.com  Windows 95, NT, or better,'
Tel: +254 2 313985-9  +254 2 313922 so I installed FreeBSD.   
GSM: +254 72 743223   +254 733 744121   This sig is McQ!  :-)


We ARE as gods and might as well get good at it.
-- Whole Earth Catalog

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

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.sock mystery!

2002-09-27 Thread ÀÌö¿ì\(õ¸®¾È\)

Hello, Freinds!

I'm new to MySQL.

Anyway...

My O/S is FreeBSD 4.6.

In /etc/hosts there are only two line.

127.0.0.1localhostlocalhost.paldal.com
192.168.0.88unix.paldal.comunix

And in /etc/host.conf,
first seek : /etc/hosts
second seek : bind

And some PHP codes are below:


--
HTML
P align=center ÀÌö¿ìÀÇ °¡Á·/P
?php
 $connection = mysql_connect(localhost.paldal.com, mysqladm,
mysql1) or  die(Couldn't connect to server.);
 $db = mysql_select_db(test, $connection) or die(Couldn't select
database.);

--
But the forth line of th the PHP codes results:

-. $connection = mysql_connect(unix, mysqladm, mysql1) or
die(Couldn't connect to server.);-- OK

-. $connection = mysql_connect(unix.paldal.com, mysqladm, mysql1) or
die(Couldn't connect to server.); -- OK

-. $connection = mysql_connect(localhost.paldal.com, mysqladm, mysql1)
or  die(Couldn't connect to server.); -- OK


-. $connection = mysql_connect(localhost, mysqladm, mysql1) or
die(Couldn't connect to server.);

--

Warning: Can't connect to local MySQL server through socket
'/usr/local/mysql/var/mysql.sock' (13) in /usr/home/lee/htdocs/index.php on line
4

Warning: MySQL Connection Failed: Can't connect to local MySQL server through
socket '/usr/local/mysql/var/mysql.sock' (13) in /usr/home/lee/htdocs/index.php
on line 4
Couldn't connect to server.

For me, the Last is a mystery!

Please help me!

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