Select a Random record

2001-02-26 Thread Sheni R. Meledath

Dear MySQL masters,

Is there any way to display a random record from a table. If there are no 
direct SQL commands can you pls suggest a logic for doing the same.

Details:
There is a table of 200 records. The user must be able to select a record 
randomly. Once that record is displayed then that record will  not be 
available for the next query. (this I am planning to do with a flag field 
and adding this in the query statement).

SELECT * from $table WHERE flag != 'TRUE';

I am using PHP to retrieve the records. so the PHP function
mysql_fetch_array($query); should retrieve a random record, not a record in 
any particular order (ORDER BY).

If anybody has got any suggestions on this please send it to me.

thanks
Sheni R Meledath
[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: Can't drop tables me too, please send help...

2001-02-26 Thread tlr7425

At 8:15 PM -0700 2/25/01, Geoff Coffey wrote:
I just installed mysql 3.23 and then ran a script to create a database I had
previously been using in an older version. I have a couple questions.

First, how can I make a drop database statement not fail if the database
doesn't exist. A book I was using seemed to say:

drop database dbname if exists;

Would work, but I get an error with this. What is the correct syntax?

Second, on this newest installation, I can't drop a database. I get the
error "failed to rmdir ./dbname, errno 21" or something similar. If I su to
my mysql user, and cd to the data directory, an rmdir dbname works
successfully, so I'm not sure why this is failing. The actual data files in
the database are all gone after the drop statement. Only the empty directory
sticks around.

Any help would be appreciated.

Thanks,

Geoff

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

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




Re: can create, cannot drop...?

2001-02-26 Thread tlr7425

but Rolf.. if i can create wouldn't that indicate permission to drop also?

thanx

At 10:01 AM +0800 2/26/01, Rolf Hopkins wrote:
Suggestion: Check file permissions.


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 25, 2001 12:33
Subject: can create, cannot drop...?


  i'm newbie.

  how come i can create but cannot drop? (errno: 21)
  i am root.

  mysqladmin asks if i am sure... i say 'yes' and i get the same (can't
  rmdir. errno: 21)

  TIA

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

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


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

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




MySQL performances?

2001-02-26 Thread Mohamed Sadok MOUHA

Hi,
does any one used MySQL in  real environment with big databases and
a big number of connections? If yes, what's the hardware config?

Thanks
--



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

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


RE: missing library libz.so

2001-02-26 Thread Rutger Beens

No this is on an Apache server... running on BSDI BSD/OS 4.01

thanks

-Oorspronkelijk bericht-
Van: Brady Orand [mailto:[EMAIL PROTECTED]]
Verzonden: maandag 26 februari 2001 3:21
Aan: Rutger Beens; [EMAIL PROTECTED]
Onderwerp: Re: missing library libz.so




I'm assuming this is on Solaris.

One workaround that you may be able to do is to set you LD_LIBRARY_PATH
to 
the path where libz.so is.

I've seen this problem with other products and it turned out to be a
Solaris 
install issue.  I had to back rev to 2.7 in order to get it to work.  I 
_belive_ that later versions of Solaris 2.8 include this library, but am
not 
sure.

Brady...

Original Message Follows
From: "Rutger Beens" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: missing library libz.so
Date: Sun, 25 Feb 2001 19:37:55 +0100

Hi there,

I just installed mysql (3.23) but when I run mysql_install_db or mysqld
it comes with an error message that the programming can't load the
libz.so file. I've found that file online and copied it into all myysql
directories but still it can't load the file. I propably should copy the
file to the /local/lib directorie or something, but I can't acces those
directories. So is it possible to disable the use of this lib or can I
specify the path to it?

I am using the binary version on a BSDI 4.01 server...

Thanks!

Rutger

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

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


_
Get your FREE download of MSN Explorer at http://explorer.msn.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: Setting access rights

2001-02-26 Thread Donald Korth

The "%" in the first command to User table spoils it all. It means logging from ffrom 
any host is valid .
Remove that command. It'll work
Cheers
Donald 
  - Original Message - 
  From: David Hulka 
  To: [EMAIL PROTECTED] 
  Sent: Monday, February 26, 2001 1:28 AM
  Subject: Setting access rights


  Hi everyone, 
  I have problem with Database inteded for setting access rights.  
  The problem is that IP addresses set in table 'db' dont affect access rights. 
  With no problem I accessed database from IP 147.229.177.57.

  Dumping data for this database are as follows:

  # DATABASE mysql

  #
  # Dumping data for table 'user'
  #
  INSERT INTO user VALUES 
  ('%','YYY','passwd','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
  INSERT INTO user VALUES 
  ('localhost','root','passwd','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y'
  ,'Y');


  #
  # Dumping data for table 'db'
  #
  INSERT INTO db VALUES 
  ('localhost','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.193','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.194','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.195','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.196','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.197','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');
  INSERT INTO db VALUES 
  ('193.179.240.198','XXX','YYY','Y','Y','Y','Y','N','N','N','N','N','N');


  Server Configuration is:
  RedHat v7.0 + Apache 1.3.14 + PHP 4.0.4pl1(patched zend_list.c) + MySQL v 
  3.23.33.

  Can somebody help me? What is wrong?

  Best regards
  Dave.


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

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



Mail()

2001-02-26 Thread Joakim Svensson

rtfm in all honour ,but I use PWS and win98...
How do I get the mail() function to work...
What do I need?

Do I need anything diffrent if I'm uppgrading to win2000?

/Joakim Svensson



Re: MySQL performances?

2001-02-26 Thread Irmund Thum

Mohamed Sadok MOUHA schrieb:
 
 Hi,
 does any one used MySQL in  real environment with big databases and
 a big number of connections? If yes, what's the hardware config?
http://iworld.compaq.de 

-- http://it97.dyn.dhs.org --
 IrmundThum

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

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




can sorting be avoided

2001-02-26 Thread TEXLID_SUPPORT

Hello,

I have a table which keeps a list of of clients. When a new client is to be added to 
the list I want it to be added to the first row of the table so that I will have a 
list of clients with the most recent arrival at the top and the least recent at the 
bottom of the table. I know I can do this by sorting the records by timestamp. However 
sorting always costs time. 

Is there a way of inserting new entries into a mysql table as a first entry at the 
top. Normally mysql adds them to the bottom of the table.

I want to do this because I want the most recent entry to appear at the top of the 
list of a dynamically generated web page.


Much obliged for any help on this issue.

Edd.





set password

2001-02-26 Thread René Tegel

The documentation describes the use of "set password = password ('newpass')
as:
"PASSWORD = PASSWORD('some password')
Set the password for the current user. Any non-anonymous user can change his
own password!"

Well, nice I thought, a user can change it's password without having access
rights to mysql db as I presume.

However, when i try to do so (i tried 2 users: a 'power' user with all
privileges and a restricted user) i get the error:
"mysql set password = password('test');
ERROR 1133: Can't find any matching row in the user table"

however, the logged on user does exist (of course), with appropiate hostname
(set to fixed ip address, not a range).

Any clue?

Sysinfo:
server: mysql v. 3.23.32 on NT4 sp6a
client: mysql v.3.23 on w2kpro sp1




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

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




replication error message question

2001-02-26 Thread John P . Looney

 I have two mysql servers, setup to replicate each other.

 However, every so often, one or both starts logging;

010226  9:40:27  Slave thread: error connecting to master:Can't connect to MySQL 
server on '0' (11)(107), retry in 0 sec
010226  9:40:27  Slave thread: error connecting to master:Can't connect to MySQL 
server on '0' (11)(107), retry in 0 sec
010226  9:40:27  Slave thread: error connecting to master:Can't connect to MySQL 
server on '0' (11)(107), retry in 0 sec

 and this quickly fills up the disk. Is this a bug, or could I have things
setup incorrectly ? Usually, the only fix is to remove all .bin and .err
and the master.info, and copy /var/lib/mysql to the client, and restart
both mysql servers (not ideal, as you can imagine).

John

-- 
 When I say 'free', I mean 'free': free from bond, of chain or command: 
to go where you will, even to Mordor, Saruman, if you desire. " 
-- Gandalf, paraphrasing the choice between Free and Non-free software

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

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




Re: can sorting be avoided

2001-02-26 Thread Peter Skipworth

Edd,

mySQL, like any other RDBMS, does (and can not) not insert data in a
guaranteed order into a table. While mySQL might usually insert the most
recent record "last" in a table, you should never rely upon the fact.

Refusing to sort your data on the basis of system load sounds a little
strange - you're missing out on 99% of the functionality of a database
server if the only thing you do with are are simple unordered
non-joined inserts and selects. Perhaps you should just be using Notepad
or Pico to edit your webpage by hand ?

regards,

Peter


On Mon, 26 Feb 2001, TEXLID_SUPPORT wrote:

 Hello,
 
 I have a table which keeps a list of of clients. When a new client is to be added to 
the list I want it to be added to the first row of the table so that I will have a 
list of clients with the most recent arrival at the top and the least recent at the 
bottom of the table. I know I can do this by sorting the records by timestamp. 
However sorting always costs time. 
 
 Is there a way of inserting new entries into a mysql table as a first entry at the 
top. Normally mysql adds them to the bottom of the table.
 
 I want to do this because I want the most recent entry to appear at the top of the 
list of a dynamically generated web page.
 
 
 Much obliged for any help on this issue.
 
 Edd.
 
 
 


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

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, Linux and Hardware config

2001-02-26 Thread Mohamed Sadok MOUHA

We plan to use MySQL in a database of more than 200 000 client.
Every client has about 1000 bytes of information (stored in 40 fields).
The number of simultaneos connections could reach 1000.
With such environment, what di you requires as OS? Does Linux RH 6.2
is ok? Does MySQL is also OK? What about the hardware config
(multiprocessor??, RAM??)?

Does Any one can help me?

Thanxs a lot




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

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 as spider database.

2001-02-26 Thread Dave Hodgkinson

Vahan Yerkanian [EMAIL PROTECTED] writes:

 My task is to implement several custom word parsing/modification
 before writing the keywords into the database, as well as I just
 want to have my own code ;-)

Ah, OK. You could always just hack the spidering part of ht://Dig?


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

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

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




Re: Server Tuning

2001-02-26 Thread Dave Hodgkinson

"Florian G. Pflug" [EMAIL PROTECTED] writes:

 Hi
 
 I am running Mysql on a Machine with two PIII-600, and 1 GB of RAM.
 The disks are connected via U2W-SCSI.
 
 I tried tuning mysql for maximal performance the last days, but I'm not
 exactly sure which parameters I should increase, und to what value.
 
 Our web application is quite slow at the moment, and often the server is
 slower in doing the queries than they are created by the users, which
 steadily increases the number of running mysql-processes until they reach
 max_connection (which is 100 at the moment).

don't do this. you disappear up your own tailpipe. put a second apache
behind your first and limit its MaxClients setting. this is a standard
mod_perl trick and is in the mod_perl guide.

 Our Application searches through about 1.000.000 Records, and does heavy
 grouping, sometimes over 100.000 records.
 
 Is there any chance, that we can keep doing this queries on the fly, or will
 we have to cache them somehow? (which has a _lot_ of downsides, since the
 data changes quite frequently, about once every 1/2 hour).

Have you had a good hard look at your EXPLAINs?

 
 Which server parameters should we increase to make things faster?
 
 Since a lot of users "do the same thing" on this website, we often have the
 very _same_ query running 5 to 10 times, one started within 5 seconds or so
 after the other.

Definitely look at some form of cacheing. Do the result sets have the
same columns in the result sets? you might want to consider selecting
into a new results table...?


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

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

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




LOOKING FOR A FRONTEND FOR MYSQL

2001-02-26 Thread MANGERA, Faizal

Hi everyone,

Is there a front-end available for Mysql.  I am currently using Mascon as an
administrative front-end, which is very good.  However I need a front-end
with less administrative features, something where-by users can
create/edit/drop tables - therefore it has to be very easy to use.

I have already an ODBC link to Lotus Approach/MS Access but they only allow
you to create a table - unfortunately they do not allow any editing to be
done to the tables.

Is there anybody who can point me in the right direction. 

Thanks in advance
 ---
Faizal Mangera
Systems Department
CarnaudMetalbox Engineering
Shipley
West Yorkshire 
BD17 7AY

Tel:  01274 846386
Fax:  01274 846201

[EMAIL PROTECTED]
 



CONFIDENTIALITY NOTICE 
The information contained in this e-mail is intended only for the
confidential use of the above named recipient. If you are not the intended
recipient or person responsible for delivering it to the intended recipient,
you have received this communication in error and must not distribute or
copy it.  Please accept the sender's apologies, notify the sender
immediately by return e-mail and delete this communication.  Thank you. 

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

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




ORDER BY optimisation

2001-02-26 Thread Joseph Bueno

Hi list,

I have some trouble trying to optimise SELECT queries
that use ORDER BY condition.

I have found out that each time the server is busy
(100% CPU usage), it is due to queries that show
up in 'mysqladmin processlist' report with 'Sorting result'
state in 'Command' column.

I am trying to optimise it by adding proper indexes so
that these sorts could be avoided.

According to MySQL manual (12.4 How MySQL Uses Indexes),

SELECT * FROM foo ORDER BY key_part1,key_part2,key_part3;
SELECT * FROM foo WHERE key_part1=const ORDER BY key_part2;

should use an index to avoid sorting
(second SELECT is actually a GROUP BY in the manual but I
assume it applies also to ORDER BY since the manual makes
no distinction between them).

In my case, sort is still used.

My table looks like:

CREATE TABLE pa (
  region int(11) NOT NULL default '0',
  code int(11) NOT NULL default '0',
  pseudo varchar(20) NOT NULL default '',
  date_depose int(11) NOT NULL default '0',
  nom varchar(80) NOT NULL default '',
  pays int(11) NOT NULL default '0',
  commentaire text NOT NULL,
  PRIMARY KEY (code),
  UNIQUE KEY idx1(pseudo),
  KEY date_depose(date_depose),
  KEY pays_date_depose(pays,date_depose)
) TYPE=MyISAM;

and here are some EXPLAIN:

mysql explain select code from pa order by date_depose desc;
+---+--+---+--+-+--+++
| table | type | possible_keys | key  | key_len | ref  | rows   | Extra  |
+---+--+---+--+-+--+++
| pa| ALL  | NULL  | NULL |NULL | NULL | 151826 | Using filesort |
+---+--+---+--+-+--+++
1 row in set (0.00 sec)

mysql explain select code from pa order by date_depose desc limit 2000;
+---+---+---+-+-+--++---+
| table | type  | possible_keys | key | key_len | ref  | rows   | Extra |
+---+---+---+-+-+--++---+
| pa| index | NULL  | date_depose |   4 | NULL | 151826 |   |
+---+---+---+-+-+--++---+
1 row in set (0.00 sec)

It seems that the index is used in second case only; may be because
of LIMIT option; but this is NOT what is described in the manual.

mysql explain select code from pa where pays=2 order by date_depose desc;
+---+--+--+--+-+---+--++
| table | type | possible_keys| key  | key_len | ref   | rows | Extra  
||
+---+--+--+--+-+---+--++
| pa| ref  | pays_date_depose | pays_date_depose |   4 | const | 1178 | where 
|used; Using filesort |
+---+--+--+--+-+---+--++
1 row in set (0.00 sec)


mysql explain select code from pa where pays=2 order by date_depose desc limit 100;
+---+--+--+--+-+---+--++
| table | type | possible_keys| key  | key_len | ref   | rows | Extra  
||
+---+--+--+--+-+---+--++
| pa| ref  | pays_date_depose | pays_date_depose |   4 | const | 1178 | where 
|used; Using filesort |
+---+--+--+--+-+---+--++
1 row in set (0.01 sec)

In this case, the index is NEVER used to avoid sorting even when LIMIT
option is restricting the result set.

I am currently running MySQL version 3.23.30-gamma, but I have
checked release notes for more recent versions I have not found
anything related to this.

What can I do to make these queries less CPU hungry ?

Thanks
--
Joseph Bueno
NetClub/Trader.com

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

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




Re: MySQL Gui Won't connect

2001-02-26 Thread Sinisa Milivojevic

Christopher McClan writes:
  Hello,
  
  The staticly compiled mySQL gui, comes up with the following when I start 
  mysqlgui :
  
  Can't connect to local mySQL server through socket (111)
  
  I'm doing this as root, I have set a password, and managed to create a 
  databse (using mysqladmin), and then play with it using the mysql command.
  
  Help!
  
  Thanks,
  
  Christopher.
  


Hi!

All you have to do is follow up instructions in the README that came
with mysqlgui, which I resend to you:


When you start it for the first time, click on ``Options'' button, fill up
all entries correctly and click on ``Save'' button. From then on, you will
logon automatically to the running server on every mysqlgui startup.

Take care to put the right value in ``Ask for password'' button. Also, if
you have problems with location of socket files on *nix, enter a full path
of the socket file in the ``SQL command on the start-up''. This input field
is used on Windoze if you wish to specify that named pipe option.




Regards,

Sinisa

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

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

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




tab-completition not working with libreadline4

2001-02-26 Thread Christian Hammers

Hello

Since a few weeks tablename completition using tab is not working any longer.
I build with bundled lbireadline and with my system libreadline (4.2)
but neither work as I am used to.

Any ideas?

bye,

 -christian- 

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

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




Re: MySQL, Linux and Hardware config

2001-02-26 Thread Joseph Bueno

Mohamed Sadok MOUHA a crit :
 
 We plan to use MySQL in a database of more than 200 000 client.
 Every client has about 1000 bytes of information (stored in 40 fields).
 The number of simultaneos connections could reach 1000.
 With such environment, what di you requires as OS? Does Linux RH 6.2
 is ok? Does MySQL is also OK? What about the hardware config
 (multiprocessor??, RAM??)?
 
 Does Any one can help me?
 
 Thanxs a lot
 
   

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

Hi Mohamed,

I am currently running MySQL on RH 6.2 servers:

- It seems that due to some glibc limitations (it has been discussed
on this mailing list a few weeks ago), MySQL cannot open more than 1024 file
descriptors. Since each active connection uses one file descriptor for its
socket and one for each table used in query; it is not possible
to have 1000 simultaneous connections. My server crashed very often when
there was more than 400 connections, it is stable now with a maximum of 360.

- Under heavy load, I experienced a lot of index corruptions on a biprocessor
machine. The problem has disappeared after rebooting in single processor mode.
It seems that upgrading to a Linux 2.4 kernel with glibc 2.2 should solve the
problem but I have not tested it yet.

- RAM configuration is crucial for maximum performance. My databases use ~450Mb
(this a little bit more than what you describe,~200 Mb, but you should also add
space for indexes), MySQL is running on dedicated servers and ~ 1Gb of RAM is
used.

Hope this helps 
--
Joseph Bueno
NetClub/Trader.com

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

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




Error in select .... from.... where... with BDB

2001-02-26 Thread TisSoft s.c.

Description:
  I made a table:
  CREATE TABLE parametry (
  SYMBOL varchar(30) DEFAULT '' NOT NULL,
  WART blob DEFAULT '' NOT NULL,
  PRIMARY KEY (SYMBOL),
  UNIQUE SYMBOL (SYMBOL)
  ) type=BerkeleyDB;

  then I put some values in it:

  INSERT INTO parametry (SYMBOL, WART) VALUES
   ('Datalic',''),
   ('Kod',''),
   ('Kontakt',''),
   ('Konto',''),
   ('logo','53'),
   ('Miasto',''),
   ('Nazwa',''),
   ('NazwaW',''),
   ('NIP',''),
   ('NIPW',''),
   ('Ulica','');

then I do:
  select * FROM parametry  WHERE SYMBOL='logo';

and I get:
 ++---+
  | SYMBOL | WART |
 ++---+
  | logo   | @|   |
 ++---+

but if I do
  select * FROM parametry;

and I get:
 ++---+
  | SYMBOL | WART |
 ++---+
  | Datalic   | |
  | Kod  | |
  | Kontakt | |
  | Konto   | |
  | logo   | 53|  - this is correct
value
  | Miasto   | |
  | Nazwa   | |
  | NazwaW   | |
  | NIP   | |
  | NIPW   | |
  | Ulica  | |
 ++---+

How-To-Repeat:
 code/input/activities to reproduce the problem (multiple lines)
  It happens every time I do it
Fix:

Submitter-Id: [EMAIL PROTECTED]
Originator: Sebastian Biniecki
Organization: TisSoft
 organization of PR author (multiple lines)
MySQL support: [none | licence | email support | extended email support ]
  nono
Synopsis: synopsis of the problem (one line)
  select ... from  where ... result bad data with BDB
Severity: [ non-critical | serious | critical ] (one line)
  serious
Priority: [ low | medium | high ] (one line)
  high
Category: mysql
Class:  [ sw-bug | doc-bug | change-request | support ] (one line)
  sw-bug
Release: mysql-3.23.33 (Source distribution)

Environment:
System: Linux mymag.g7.pl 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000 i586
unknown
Architecture: i586

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/i586-mandrake-linux/2.95.3/specs
gcc version 2.95.3 19991030 (prerelease)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC:
lrwxrwxrwx1 root root   13 lut 22 22:05 /lib/libc.so.6 -
libc-2.1.3.so
-rwxr-xr-x1 root root   931668 pa  4 18:26 /lib/libc-2.1.3.so
-rw-r--r--1 root root 20749008 pa  4 18:25 /usr/lib/libc.a
-rw-r--r--1 root root  178 pa  4 18:25 /usr/lib/libc.so
Configure command:
./configure  --enable-static --prefix=/mysql --with-low-memory




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

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




Re: MySQL performances?

2001-02-26 Thread Mikel King

Well what exactly do you consider big?


Mohamed Sadok MOUHA wrote:

 Hi,
 does any one used MySQL in  real environment with big databases and
 a big number of connections? If yes, what's the hardware config?

 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


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

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




Antwort: LOOKING FOR A FRONTEND FOR MYSQL

2001-02-26 Thread alexander . skwar


On 26.02.2001 12:54:02 MANGERA, Faizal wrote:

 Hi everyone,

 Is there a front-end available for Mysql.  I am currently using Mascon as an
 administrative front-end, which is very good.  However I need a front-end
 with less administrative features, something where-by users can
 create/edit/drop tables - therefore it has to be very easy to use.

Hmm, phpMyAdmin maybe?



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

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




RE: Error in select .... from.... where... with BDB

2001-02-26 Thread Julian Strickland

It would seem that you are getting the character corresponding to the ASCII
code 53 as the result of the first query. Try inserting the value for logo
in your table without the quotes round the 53 and see if the results of the
queries become consistent. IMHO this is a bug because the two queries are
returning different interpretations of the stored data.

 -Original Message-
 From: TisSoft s.c. [SMTP:[EMAIL PROTECTED]]
 Sent: 26 February 2001 13:20
 To:   [EMAIL PROTECTED]
 Subject:  Error in "select  from where..." with BDB
 
 Description:
   I made a table:
   CREATE TABLE parametry (
   SYMBOL varchar(30) DEFAULT '' NOT NULL,
   WART blob DEFAULT '' NOT NULL,
   PRIMARY KEY (SYMBOL),
   UNIQUE SYMBOL (SYMBOL)
   ) type=BerkeleyDB;
 
   then I put some values in it:
 
   INSERT INTO parametry (SYMBOL, WART) VALUES
('Datalic',''),
('Kod',''),
('Kontakt',''),
('Konto',''),
('logo','53'),
('Miasto',''),
('Nazwa',''),
('NazwaW',''),
('NIP',''),
('NIPW',''),
('Ulica','');
 
 then I do:
   select * FROM parametry  WHERE SYMBOL='logo';
 
 and I get:
  ++---+
   | SYMBOL | WART |
  ++---+
   | logo   | @|   |
  ++---+
 
 but if I do
   select * FROM parametry;
 
 and I get:
  ++---+
   | SYMBOL | WART |
  ++---+
   | Datalic   | |
   | Kod  | |
   | Kontakt | |
   | Konto   | |
   | logo   | 53|  - this is correct
 value
   | Miasto   | |
   | Nazwa   | |
   | NazwaW   | |
   | NIP   | |
   | NIPW   | |
   | Ulica  | |
  ++---+
 
 How-To-Repeat:
  code/input/activities to reproduce the problem (multiple lines)
   It happens every time I do it
 Fix:
 
 Submitter-Id: [EMAIL PROTECTED]
 Originator: Sebastian Biniecki
 Organization: TisSoft
  organization of PR author (multiple lines)
 MySQL support: [none | licence | email support | extended email support ]
   nono
 Synopsis: synopsis of the problem (one line)
   select ... from  where ... result bad data with BDB
 Severity: [ non-critical | serious | critical ] (one line)
   serious
 Priority: [ low | medium | high ] (one line)
   high
 Category: mysql
 Class:  [ sw-bug | doc-bug | change-request | support ] (one line)
   sw-bug
 Release: mysql-3.23.33 (Source distribution)
 
 Environment:
 System: Linux mymag.g7.pl 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST 2000
 i586
 unknown
 Architecture: i586
 
 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/i586-mandrake-linux/2.95.3/specs
 gcc version 2.95.3 19991030 (prerelease)
 Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
 LIBC:
 lrwxrwxrwx1 root root   13 lut 22 22:05 /lib/libc.so.6 -
 libc-2.1.3.so
 -rwxr-xr-x1 root root   931668 pa  4 18:26 /lib/libc-2.1.3.so
 -rw-r--r--1 root root 20749008 pa  4 18:25 /usr/lib/libc.a
 -rw-r--r--1 root root  178 pa  4 18:25 /usr/lib/libc.so
 Configure command:
 ./configure  --enable-static --prefix=/mysql --with-low-memory
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)

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

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

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 question to ask

2001-02-26 Thread Dart

Dear all,
Sorry to ask question again, or maybe i am just a beginner.

I wanna ask:
If there are 2 records
Name Income  Out
Data1   1000   700
Data2970500

If i want to have the output:
Name  Income  Out  Balance
Data1   1000  700   300
Data2970   500770

How to do that?
Thx

Yours sincerely,
Jason Chan



mysql process running

2001-02-26 Thread mkirank

Hi Everybody,
 I am a web developer (Apache ,Perl Mysql) , I am facing a problem , i have a 
program that runs a query on a text field and displays results , but since the 
database is huge sometimes apache sends a timeout to the client(browser) but my 
problem is that when i check the process list the mysqld is still running that query , 
how do i stop mysql from running the query once the perl program is stopped .Are there 
any server parameters that i have to tune 

i am using Mysql version 3.22.32 

Thanks in Advance


Kiran


__
123India.com - India's Premier Portal 
Get your Free Email Account at http://www.123india.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 question to ask

2001-02-26 Thread Peter Skipworth

select Name,Income,Out,(Income-Out) as Balance from tblname


On Mon, 26 Feb
2001 [EMAIL PROTECTED] wrote:

 Dear all,
 Sorry to ask question again, or maybe i am just a beginner.
 
 I wanna ask:
 If there are 2 records
 Name Income  Out
 Data1   1000   700
 Data2970500
 
 If i want to have the output:
 Name  Income  Out  Balance
 Data1   1000  700   300
 Data2970   500770
 
 How to do that?
 Thx
 
 Yours sincerely,
 Jason Chan
 


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

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

2001-02-26 Thread Simon Green

Hi there Kiran
We had the same problme and we found that updating ModAuthMySQL solved the
problem..
Hope this helps...

Simon

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 26 February 2001 13:27
To: [EMAIL PROTECTED]
Subject: mysql process running


Hi Everybody,
 I am a web developer (Apache ,Perl Mysql) , I am facing a problem , i
have a program that runs a query on a text field and displays results , but
since the database is huge sometimes apache sends a timeout to the
client(browser) but my problem is that when i check the process list the
mysqld is still running that query , how do i stop mysql from running the
query once the perl program is stopped .Are there any server parameters that
i have to tune

i am using Mysql version 3.22.32

Thanks in Advance


Kiran


__
123India.com - India's Premier Portal
Get your Free Email Account at http://www.123india.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: mysql process running

2001-02-26 Thread Peter Skipworth

As far as I know, this is on the wishlist, but has not been implemented
- ie, a thread should die if the client disconnects. You'll probably
need to run mysqladmin kill xxx, where  is the offending thread id.

regards,

P

On
26 Feb 2001 [EMAIL PROTECTED] wrote:

 Hi Everybody,
  I am a web developer (Apache ,Perl Mysql) , I am facing a problem , i have a 
program that runs a query on a text field and displays results , but since the 
database is huge sometimes apache sends a timeout to the client(browser) but my 
problem is that when i check the process list the mysqld is still running that query 
, how do i stop mysql from running the query once the perl program is stopped .Are 
there any server parameters that i have to tune 
 
 i am using Mysql version 3.22.32 
 
 Thanks in Advance
 
 
 Kiran
 
 
 __
 123India.com - India's Premier Portal 
 Get your Free Email Account at http://www.123india.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: MySQL question to ask

2001-02-26 Thread Samuel


Hi Jason!

Give this a try for the required table you want to produce below...

SELECT Name, Income, Out, (Income - Out) AS Balance
FROM tablename;


Sam.




- Original Message - 
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, February 26, 2001 1:45 PM
Subject: MySQL question to ask


Dear all,
Sorry to ask question again, or maybe i am just a beginner.

I wanna ask:
If there are 2 records
Name Income  Out
Data1   1000   700
Data2970500

If i want to have the output:
Name  Income  Out  Balance
Data1   1000  700   300
Data2970   500770

How to do that?
Thx

Yours sincerely,
Jason Chan


=
This message has been virus scanned by Messagelabs.
=


==
This message has been checked for all known viruses by MessageLabs. 
This message is intended for the stated recipients only and may be confidential. 
Opinions expressed in this email do not necessarily reflect the opinions of GlobePost 
Travel or Travelselect.com. If you are not the intended recipient of this message, 
please notify the sender immediately.  
==

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

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

2001-02-26 Thread Peter Skipworth

Oh...

Isn't ModAuthMySQL used for HTTP authentication against a mysql database 
? I can't see how that could influence queries running from within a
mod_perl/CGI script...

P


On Mon, 26 Feb 2001, Simon Green wrote:

 Hi there Kiran
 We had the same problme and we found that updating ModAuthMySQL solved the
 problem..
 Hope this helps...
 
 Simon
 
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: 26 February 2001 13:27
 To: [EMAIL PROTECTED]
 Subject: mysql process running
 
 
 Hi Everybody,
  I am a web developer (Apache ,Perl Mysql) , I am facing a problem , i
 have a program that runs a query on a text field and displays results , but
 since the database is huge sometimes apache sends a timeout to the
 client(browser) but my problem is that when i check the process list the
 mysqld is still running that query , how do i stop mysql from running the
 query once the perl program is stopped .Are there any server parameters that
 i have to tune
 
 i am using Mysql version 3.22.32
 
 Thanks in Advance
 
 
 Kiran
 
 
 __
 123India.com - India's Premier Portal
 Get your Free Email Account at http://www.123india.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
 
 


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

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 question to ask

2001-02-26 Thread Joseph Bueno

[EMAIL PROTECTED] a crit :
 
 Dear all,
 Sorry to ask question again, or maybe i am just a beginner.
 
 I wanna ask:
 If there are 2 records
 Name Income  Out
 Data1   1000   700
 Data2970500
 
 If i want to have the output:
 Name  Income  Out  Balance
 Data1   1000  700   300
 Data2970   500770
 
 How to do that?
 Thx
 
 Yours sincerely,
 Jason Chan

Hi,

Have you tried 
select income,out,income-out as balance from table ?

Assuming 770=970-500 (strange math isn't it ;)

Regards
--
Joseph Bueno
NetClub/Trader.com

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

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




Re[2]: More Innobase questions (Was: RE: Innobase)

2001-02-26 Thread Heikki Tuuri

Hi!

There were more questions about Innobase:

Here is the comming question - can you speak some more about apace
allocation consepts used in innobase. For example how would it like to
work with huge number (10.000+ of the tables) and how space allocation

The data dictionary is hashed, a huge number of tables is no problem.
Space allocation is done for small tables one database page at a time
(default 16 kB). For big tables space is allocated in chunks of
consecutive pages, up to 256 pages big.

is done - I know innobase supports clusterisation, but if I'm not

Yes, all tables in Innobase are clustered by their primary key, that is,
rows are physically in the order of their primary key. If you do not
specify a primary key, then a generated row id is internally used as
the primary key: the rows will be ordered according to their insertion
sequence. The support for the Oracle-like clustering, physically mixing
several tables, is built in but I do not have a user interface for it.

mistaken only for rows from one table. The next thing is is there a
difference made in handling dynamic and static rows and how
fragmentation is avoided for last ones ?

You probably mean what happens if the size of a row changes?
Innobase uses no overflow pages. If a row is updated so that it
cannot fit on the page, we split the B-tree page to get more space.
This will of course slow down table scans. Recreating tables where
this happens may be sensible from time to time.

As far as I know some space allocation problems are qute different in
file systems and in databases, so I'm surprising you're speaking about
similar algorithm.

Yes, in file systems you cannot grow a file in the middle, only at the
end.

Other thing is - does innobase supports hash indexes internally ?

Yes, it automatically creates hash indexes, no user configuration is
needed.

Other thing - can I not add files but increase it size ?   How
innobase will handle if I'll do so ?

Currently, you cannot increase a size of a data file, but you have
to add a new. Increasing the size of the last data file would of course
be technically easy to implement.

Few words about creation. As I looked at innobase files they are
mostly zero filled while created. I think it would be nice to add a
possibility to create files not by write() but by lseek() this will
make creation faster and files taking less space on file system which
support holes in files - last one is good as you can just create huge
files in the very begining and do not care much about wasting thespace.

The problem is that the OS may fragment the files if they are not
physically allocated.

D) can you safely add new files when there is data in them already?
HT Yes you can, but you have to shut down the database first.
Shurely special command may be added for this later :)

Yes, in Oracle you can add a data file while the database is up
(ALTER TABLESPACE ADD DATAFILE), and it is easily implementable.

Other thing is - don't you think it's not quite good idea to store
database configuration in config file. For now it's quite simple and
can be easyly recovered by looking at the files anf their sizes but
then you will have more complex configuration (i.e several tablespaces
with external mirroring) it will be hard to recover.

You have to keep backups of .cnf files also.

Other question - files sizes. Does innobase itself support 4GB+ files?

The support is built in, but not tested yet.

   4) Currently ATIS test fails with innobase table: Retrieving data
 Warning: Query 'select 
 city.city_name,state.state_name,city.city_code from state,city 
 where city.state_code=state.state_code' returned 1 rows when it 
 should have returned 11 rows Got error:  when executing select 
 flight.flight_code,aircraft.aircraft_type from flight,aircraft 
 where flight.aircraft_code=aircraft.aircraft_code got 0 instead of 579 *** 
HT You may have an outdated version of the MySQL source distribution.
HT (I am currently exchanging lots of emails with Peter and looking at the
HT problem.)
I've currently patched a version but still get the same error. Other
tests (i.e big tables) now passes.

The Linux version runs the test without errors on my machine. Maybe
the source repository you are using is still somewhat outdated.

HT physically writes its data files full at database creation, so that
HT the space is physically occupied.
Yes of couse. But I think this should be mentioned in the manual so
users not surprised mysqld is doing something several minutes after
startup before it's ready.

Will be added to the manual, and to the message the database prints when
a new data file is created.

Do you have plans for external RAID support I.E stripping and
mirroring. At leas in row device configuration I thing this may give
better perfomance then OS/Hardware RAID.

No, I have no plans for simulating RAID in the database server,
it is done on a lower level, like RAID disk hardware. We have
to measure the speed of hardware RAID systems, to 

Re: More Link Probs

2001-02-26 Thread Gerald L. Clark

Alec Solway wrote:
 
 Hi,
 
 My problems with open64 and fopen64 have been solved by using a newer
 version of glibc, however now I get the following errors when trying to
 link the MySQL C Client API library with my program.
 
 /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function `my_uncompress':
 my_compress.o(.text+0x97): undefined reference to `uncompress'
 /usr/lib/mysql/libmysqlclient.a(my_compress.o): In function
 `my_compress_alloc':
 my_compress.o(.text+0x12b): undefined reference to `compress'
 collect2: ld returned 1 exit status
 
 Which library has the compress functions?
 
 Regards.
 Alec
 
libz

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

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 question to ask

2001-02-26 Thread Steve Ruby


His balance is a running balance...

Joseph, you will have to keep the running balance in some thing
that you write to get the query.. you can't do a running sum
in SQL directly. You can only use the examples people provided
to get the net per line.



Joseph Bueno wrote:
 
 [EMAIL PROTECTED] a crit :
 
  Dear all,
  Sorry to ask question again, or maybe i am just a beginner.
 
  I wanna ask:
  If there are 2 records
  Name Income  Out
  Data1   1000   700
  Data2970500
 
  If i want to have the output:
  Name  Income  Out  Balance
  Data1   1000  700   300
  Data2970   500770
 
  How to do that?
  Thx
 
  Yours sincerely,
  Jason Chan
 
 Hi,
 
 Have you tried
 select income,out,income-out as balance from table ?
 
 Assuming 770=970-500 (strange math isn't it ;)
 
 Regards
 --
 Joseph Bueno
 NetClub/Trader.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

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

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




Re: Replication question!

2001-02-26 Thread Gerald L. Clark

 wrote:
 
 Hi...
 
 I Have a Master(version 3.23.33) and
 
 one Slave(version 3.23.32)
 
 When I shutdown the slave,
 And make some change Master.
 
 then I restart the slave.
 
 But, Slave didn't catch the change on Master.
 
 bug or feature?
 
 thank you for advanced answer.
 
 
3.23.32 has a known slave problem. Upgrade it
to 3.23.33.

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

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




XML interface to MySQL

2001-02-26 Thread Claude Hoffmann

Hi list,

does anyone know of an XML interface to MySQL which would enable me to
import or export data using the XML language definition?

Many thanks for any hints!

Kind regards,

Claude Hoffmann

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

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




Re: Can't find ./mysql/host.frm when starting mysqld

2001-02-26 Thread Gerald L. Clark

ben foo wrote:
 
 I have  mysql-server-3.23.22.6  and mysql-3.23.22.6, packages
 installed on my PC during Linux RedHat 7.0 installation.
 
 The problem occurs when starting mysqld program :
 The command :
 mysql install db
 is OK
 but the command :
 safe mysqld
 starts the server mysqld witch stops immediately after.
 When I look at the file :
 /var/lib/mysql/my local host.err
 I find the lines :
 
 010212 13:26:29  mysqld started
 010212 13:26:30  /usr/libexec/mysqld: Can't find file:
 './mysql/host.frm' (errno: 13)
 010212 13:26:30  mysqld ended
 
 The file host.frm is in : /var/lib/mysql/mysql/
 
 I tried to copy all the files from  /var/lib/mysql/mysql/  to
 /var/lib/mysql/
 but the problem still remain.
 
 Can you help me please.
 Thank you.
 
 [EMAIL PROTECTED]

chown -R mysql /var/lib/mysql

This is a known problem with MySQL on the RH7.0 CD.
There are updates on the redhat.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: where clausel with float

2001-02-26 Thread Gerald L. Clark

Helmut Ebelt wrote:
 
 I have some kind of floats(8,2) in my table and want to make an query ...
 
 Select * from tablename where floatthing = '21999.00';
 
 0 rows !
 
 Select * from tablename where floatthing = 21999.00;
 
 0 rows !!
 
 but there ARE result !! can anybody help me !! please
 
 thx in advance !
 
 HElmut Ebelt
 :-===http://www.webmaid.de===-:
 :-Helmut Ebelt - Ahornstr. 25 - 12163 Berlin-:
 :-===http://www.webmaid.de===-:
 
 -
Floats can not be reliably tested for equality.  They are stored in a
binary
form that cannot precisely represent most numbers.
If you need to test for equality, check out the DECIMAL type.

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

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




Newbie DATESTAMP problem

2001-02-26 Thread Ken Tuck

Hi All

This is my first post of possibly many to this list. I am having a
problem with trying to display time related content to a page. I
initially setup the column with a 10 digit timestamp but found out that
the date_sub function works with DATESTAMP data type. I only have 8 rows
of test data in the table so I didn't loose anything valuable but now
the column isn't automatically putting in the date in the format that I
need.

I suppose the question is where do I go now and is the following query
using the correct syntax?

if ($type == "newtoday"){
$sql_text = ("SELECT * FROM kawarthas, Customer WHERE
kawarthas.timestamp (date_sub(now()+0, interval 2 DAY)) 
(kawarthas.agent1aid=Customer.MemberID) ORDER BY price;");
}
if ($type == "newthisweek"){
$sql_text = ("SELECT * FROM kawarthas, Customer WHERE
kawarthas.timestamp= (date_sub(now()+0, interval 7 DAY)) 
(kawarthas.agent1aid=Customer.MemberID) ORDER BY price;");
}


--
Cheers!
Ken Tuck
EyeCreate Inc.
Net~Solutions
Design - Hosting - E-Commerce
[EMAIL PROTECTED]
http://www.eyecreate.net/
ph: 705 755-1120
fx: 705 743-9259



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

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: cant connect except as root

2001-02-26 Thread Gerald L. Clark

Willie Strickland wrote:
 
 I have just installed MySQL for the first time on my RedHat linux 7.0
 machine.  I thought it all went fine and was working.  However, now I
 realize that only root can start the client program mysql (or the
 server program for that matter, but I figure that is a good thing).
 Root can login using any of the other valid users and mysql -u
 someuser.  But someuser cannot connect except by su to root then
 connect using mysql -u someuser.
 
 I spent several hours yesterday trying to research this on the
 internet and in my reference books but didnt get it resolved.
 
 Where did I go wrong?  How do I correct it?
 
 Thanks,
 
 Willie
 --
 
 [EMAIL PROTECTED]
 
If you loaded MySQL rpm from the RH 7.0 CD, go to redhat.com or
mysql.com for 
an rpm that works.

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

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




Antwort: Error in select .... from.... where... with BDB

2001-02-26 Thread alexander . skwar


On 26.02.2001 14:19:40 TisSoft s.c. wrote:

   PRIMARY KEY (SYMBOL),
   UNIQUE SYMBOL (SYMBOL)

What's the sense of this?  PRIMARY is already UNIQUE, so you don't need to
UNIQUE symbol again.



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

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




Re: importing data from excel

2001-02-26 Thread Thomas Spahni

On Thu, 4 Jan 2001, TEXLID_SUPPORT wrote:

 Could anyone please let me know how I can transfer data from excel to
 a mysql database? If it is possible. The data is stored in an excel
 file on my PC. And I want to transfer the contents (about 500 records
 with 20 fields)  of this excel file to a mysql table on a remote linux
 server.

Edd,

export from EXCEL to *.csv format. Then pipe it though the program below.
Depending on your data some additional quoting with sed might be needed.
Resulting TAB separated file is easily read with "load data infile". You
have to write the CREATE clause manually.

Thomas

/*
 *  csv - preprocess *.csv files
 *
 *  AUTHOR: Thomas Spahni ([EMAIL PROTECTED])
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License
 *  as published by the Free Software Foundation; either version 2
 *  of the License, or (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */

#include stdio.h
#include stdlib.h

/*
 * Files in *.csv format can be a pain to process with sed when they
 * contain '\n' ( newline or line-feed ) characters within quoted 
 * data fields.
 *
 * This filter will go through the file and determine if a newline is
 * part of the data or indicates the end of a record. Any newline
 * found as data is converted to '\r' or carriage-return and existing
 * carriage-returns are deleted. At the same time this is a conversion
 * from DOS to unix style.
 *
 * Functions performed:
 *  - field separating semicolons are replaced by tab
 *  - field delimiting semicolons are deleted
 *  - newlines within quoted data fields become '\r'
 *  - preexisting carriage returns are deleted
 *
 */

int main (int argc, char *argv[])
{

int c;

   /*
* quoted_data is a switch to indicate whether we are in a quoted
* data field or not. 0 = normal outside, 1 = within data field
*/
 
int quoted_data = 0;

   /*
* hanging_quote is a switch to remember if we have already 
* seen the first one of a pair of double quotes.
*/
 
int hanging_quote = 0;


while ((c = getchar()) != EOF) {
if ( c == '"' ) {
/*
 * quoted_data status does not matter if it is a quote;
 * this quote could be the beginning or the end of a
 * data field or it is the beginning of a quote ""
 */
if ( hanging_quote ) {
/* this is definitely a complete quote now */
hanging_quote = 0;
putchar(c);
} else {
hanging_quote = 1;   /* wait to see what follows */
}
} else {
/* not a quote character */
if ( quoted_data ) {
/* we are within a quoted data field */
if ( hanging_quote ) {
/* it's a single quote terminating quoted data */
quoted_data   = 0;
hanging_quote = 0;
if ( c == ';' ) {
putchar('\t');
} else if ( c != '\r' ) {
putchar(c);
}
} else {
/* within quoted data, special rules apply */
if ( c == '\n' ) {
putchar('\r');
} else if ( c != '\r' ) {
putchar(c);
}
}
} else {
if ( hanging_quote ) {
/* it's a single quote starting quoted data */
quoted_data   = 1;
hanging_quote = 0;
}
if ( c == ';' ) {
putchar('\t');
} else if ( c != '\r' ) {
putchar(c);
}
}
}
} /* wend */
fflush(stdout);
exit(EXIT_SUCCESS);
}


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

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




Re: can create, cannot drop...?

2001-02-26 Thread Rolf Hopkins

Actually, at the file system level, yes, you're right.  But database level
security, not necessarily.  Check you have the right permissions for a start


- Original Message -
From: [EMAIL PROTECTED]
To: "Rolf Hopkins" [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, February 26, 2001 17:03
Subject: Re: can create, cannot drop...?


 but Rolf.. if i can create wouldn't that indicate permission to drop also?

 thanx

 At 10:01 AM +0800 2/26/01, Rolf Hopkins wrote:
 Suggestion: Check file permissions.
 
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Sunday, February 25, 2001 12:33
 Subject: can create, cannot drop...?
 
 
   i'm newbie.
 
   how come i can create but cannot drop? (errno: 21)
   i am root.
 
   mysqladmin asks if i am sure... i say 'yes' and i get the same (can't
   rmdir. errno: 21)
 
   TIA
 
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
 
   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




Berkeley DB and mysql

2001-02-26 Thread Bill Rossi


I recently tried to build mysql version 3.23.33, with support for  Berkeley
DB.  I was using BDB version 3.2.9, and was unable to compile mysql with
this version of BDB.

Is this a known problem, an if so, what version of BDB should I use with
mysql?

Thanks in advance.

Bill


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

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: Random record

2001-02-26 Thread Alan Halls

You have to have version 3.23 of mysql and then you can add  ORDER BY RAND()
to the end of your query.
Alan

-Original Message-
From: joe [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 25, 2018 4:40 PM
To: MySQL
Subject: Random record


Does anyone have any good ideas on how to pull a random record? I've been
using PHP's random function to create a random number to pull, but the
problem is that if I delete a record, it could still try to pull it.  Is
there a better way?  I'd really like to be able to just pull it in the SQL
statement instead of pulling a bunch of records then sorting throught that.

Thanks,

JOE


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

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: LOOKING FOR A FRONTEND FOR MYSQL

2001-02-26 Thread j.urban

You might have a look at urSQL - www.urbanresearch.com/ursql

On Mon, 26 Feb 2001, MANGERA, Faizal wrote:

 Hi everyone,
 
 Is there a front-end available for Mysql.  I am currently using Mascon as an
 administrative front-end, which is very good.  However I need a front-end
 with less administrative features, something where-by users can
 create/edit/drop tables - therefore it has to be very easy to use.
 
 I have already an ODBC link to Lotus Approach/MS Access but they only allow
 you to create a table - unfortunately they do not allow any editing to be
 done to the tables.
 
 Is there anybody who can point me in the right direction. 
 
 Thanks in advance
  ---
 Faizal Mangera
 Systems Department
 CarnaudMetalbox Engineering
 Shipley
 West Yorkshire 
 BD17 7AY
 
 Tel:  01274 846386
 Fax:  01274 846201
 
 [EMAIL PROTECTED]
  
 
 
 
 CONFIDENTIALITY NOTICE 
 The information contained in this e-mail is intended only for the
 confidential use of the above named recipient. If you are not the intended
 recipient or person responsible for delivering it to the intended recipient,
 you have received this communication in error and must not distribute or
 copy it.  Please accept the sender's apologies, notify the sender
 immediately by return e-mail and delete this communication.  Thank you. 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


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

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: Printed MySQL manual

2001-02-26 Thread Thomas Spahni

On Mon, 19 Feb 2001, Don Read wrote:

 On 20-Feb-01 Denis L. Menezes wrote:
  Can anyone please advise how I can obtain a printed copy of  the MYSQL
  manual?
 
 $ cd /usr/local/share/doc/mysql
 $ lpr manual.txt

Denis, Don,

The source of the manual is in texinfo format. Why not use texi2dvi to
produce a nicely formatted manual? (looks like a real book, with index and
everything you could wish ...)

If you have to waste a tree, go this way.

Thomas


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

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[3]: More Innobase questions (Was: RE: Innobase)

2001-02-26 Thread Peter Zaitsev

Hello Heikki,

Monday, February 26, 2001, 5:08:52 PM, you wrote:

HT Hi!

HT There were more questions about Innobase:

Here is the comming question - can you speak some more about apace
allocation consepts used in innobase. For example how would it like to
work with huge number (10.000+ of the tables) and how space allocation

HT The data dictionary is hashed, a huge number of tables is no problem.
HT Space allocation is done for small tables one database page at a time
HT (default 16 kB). For big tables space is allocated in chunks of
HT consecutive pages, up to 256 pages big.
Good. This sounds it should reduce fragmentation.

Anyway as I look at the benchmarks currently table creation test runs
about 5 times faster on MYISAM, but well about 5 times faster then
BDB. May be the speed difference is because of interface or
transaction handling...

is done - I know innobase supports clusterisation, but if I'm not

HT Yes, all tables in Innobase are clustered by their primary key, that is,
HT rows are physically in the order of their primary key. If you do not
HT specify a primary key, then a generated row id is internally used as
HT the primary key: the rows will be ordered according to their insertion
HT sequence. The support for the Oracle-like clustering, physically mixing
HT several tables, is built in but I do not have a user interface for it.
Hm. How does this connects with one page is in use by one table (or
I'm mistaken)

mistaken only for rows from one table. The next thing is is there a
difference made in handling dynamic and static rows and how
fragmentation is avoided for last ones ?

HT You probably mean what happens if the size of a row changes?
HT Innobase uses no overflow pages. If a row is updated so that it
HT cannot fit on the page, we split the B-tree page to get more space.
HT This will of course slow down table scans. Recreating tables where
HT this happens may be sensible from time to time.
The better way would be to have a possibility of online optimization.
If you have online backup feature this should also be possible - the
idea is almost the same.

Other thing is - probably you hold some of space free on each page to
have a possibility to insert new rows in the same page ? Other
question is what you do with holes then for example row size changes
from small to huger and you've copied it to other location ?  Wat's
happening if you would have place on the page for a row but it's
fragmented ? Do you somehow defragment the page ?


As far as I know some space allocation problems are qute different in
file systems and in databases, so I'm surprising you're speaking about
similar algorithm.

HT Yes, in file systems you cannot grow a file in the middle, only at the
HT end.

This is not only the difference :) For example filesystems usually
work with big amount of files while databases has limit number of
them, Database does not have directories. Database have different
object types (table data, indexes) which have a bit different access
methods.

Other thing is - does innobase supports hash indexes internally ?

HT Yes, it automatically creates hash indexes, no user configuration is
HT needed.

Hm. What do you meen by this - it somehow tracks the queries and
creates indexes of needed type automatically ? This is good feature
but someone will anyway want to turn it of as want to deside himself
the index layout.

I'm speaking about user level hash indexes - for example if I'm using
index on 200 by string for reference only, and do not do range scans
on it I can save much space and  get much space using hash indexes,
there in other case I would want btree one.

Other thing - can I not add files but increase it size ?   How
innobase will handle if I'll do so ?

HT Currently, you cannot increase a size of a data file, but you have
HT to add a new. Increasing the size of the last data file would of course
HT be technically easy to implement.

Yes.  That's not the problem. The question is what innobase will do in
this case - take the actual length or panic ?

Few words about creation. As I looked at innobase files they are
mostly zero filled while created. I think it would be nice to add a
possibility to create files not by write() but by lseek() this will
make creation faster and files taking less space on file system which
support holes in files - last one is good as you can just create huge
files in the very begining and do not care much about wasting thespace.

HT The problem is that the OS may fragment the files if they are not
HT physically allocated.

Yes. Of course - but some people may not need real speed from innobase
they just want transactions with mysql and does not want to bother
with space much.
So I think this may be good as an option for some users. Not really
important one of course. It's important also for debugging purposes -
currently It's quite annoing to wait while 512Mb database file
required for test is creating

D) can you safely add new files when there is data 

Security annoucement mailing-list ?

2001-02-26 Thread Nicolas GREGOIRE

Hi,

is it possible to create (I don't think it already exists) a
mailing-list just for security problems about MySQL.

I'm very concerned about the security of my web sites, and I rely on
MySQL to provide dynamic content.

So, for the moment, I must subscribe to the general list and receive
tons of messages just to see sometimes a security annoucement (like the
recent buffer-overflows)

Does anybody share my point of view about this security-only list ?

Nicob

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

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




Re: MySQL 3.23.32 / SuSE Linux 7.1 / php and normal user

2001-02-26 Thread Thomas Spahni

On Wed, 21 Feb 2001, Hagen Hoepfner wrote:

 I can normaly use mysql 
 if I am root. But if i'm logged in as normal user or try to connect to mysql 
 via php i got the following error message:
 
 MySQL Connection Failed: Can't connect to local MySQL server through socket 
 '/var/lib/mysql/mysql.sock' (13) in 
 /usr/local/httpd/htdocs/gutefrage/secure/statistic.php on line 19
 
 What can I do?

Hagen, 
please read the very fine Manual chapter 4 about the "The MySQL Access
Privilege System". This will solve your problem.

Thomas


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

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

2001-02-26 Thread Jenkins Mike LtCol ACSC/DEX

I am having exactly the same problem.  Does anyone know what is causing
this?

Thanks

Mike jenkins

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

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




Antwort: MySQL question to ask

2001-02-26 Thread alexander . skwar


On 26.02.2001 14:45:50 Dart wrote:

 Dear all,
 Sorry to ask question again, or maybe i am just a beginner.

 I wanna ask:
 If there are 2 records
 Name Income  Out
 Data1   1000   700
 Data2970500

 If i want to have the output:
 Name  Income  Out  Balance
 Data1   1000  700   300
 Data2970   500770

SELECT Name, Income, Out, (Income - Out) AS Balance FROM Table WHERE Name
IN['Data1', 'Data2'];

Hmm, not to sure about the IN part - look it up *G*

Uh, just saw that:
 Data2970   500770

How is the balance calculated?  First I thought, that it is (Income - Out) - but
this gives 270, and not 770?  Or is it (1st (Income-Out) + 2nd (Income-Out))?
But no, this would only give 570.
Hmm, nevermind my SELECT statement above, it's probably wrong



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

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




Problem starting MySQL

2001-02-26 Thread Bjorn Harvold

I've tried to install MySQL in all the different ways (binary, source and rpm) on my 
RH v6.2 but end up with the same result. After install I try to start safe_mysqld 
(safe_mysqld -user mysql ) but it shuts down immediately afterwards. I check out the 
error log and it tells me that "--password" is an unknown parameter. And that's right 
so I don't understand why it's being invoked. I'm running all the latest patches from 
RH v6.2, including glibc v2.1.3-21.

Any ideas,

bjorn

___

Bjorn Harvold
Xenotrope Inc.
55 John St
New York, NY 10038
212 964 4242
[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: can create, cannot drop...?

2001-02-26 Thread Geoff Coffey

on 2/26/01 8:07 AM, Rolf Hopkins at [EMAIL PROTECTED] wrote:

 Actually, at the file system level, yes, you're right.  But database level
 security, not necessarily.  Check you have the right permissions for a start

At least in my case, the drop _almost_ succeeds. The table files are
deleted. The database's directory is entirely emptied, but it fails to
delete the directory itself. Mysql reports that rmdir failed with errno 21.

Errno 21 on my system is EISDIR -- 'is a directory', which doesn't seem to
be an error at all... And rmdir is not defined to return this error. But, I
can use the command rmdir to delete the directory without a problem, so I
suspect the error is not being reported correctly.

It does not have anything to do with security in mysql...it happens when I
drop as the root user with everything turned on in the user table...

Thanks,

Geoff


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

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




Re: missing library libz.so

2001-02-26 Thread Ken Menzel

Hi Rutger,
   The problem is you can't just drop the library anywhere.  I am
guessing from you message that you do not have root privleges on the
server. I doubt that you will be able to add a shared library without
root access.  The second problem I see you may have is the the binary
was compile for BSDI 4.2 and you are running 4.01 which has many know
bugs in the threads libraries (which are fixed on 4.2).  Is there any
way that you can get the server updated?  4.01 is very old,  does it
have all patches for bugs applied?  I think you might have better luck
compiling from source if you have gcc2.95 installed.
Anyway with root access if you have the file /usr/lib just run
ldconfig -v and you should see it added  provided it is a valid
library.  (You may need to create a link to get it to add ) see the
man page for ldconfig.
  Good Luck  Ken
-
Ken Menzel  ICQ# 9325188
www.icarz.com  [EMAIL PROTECTED]
- Original Message -
From: "Rutger Beens" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 25, 2001 1:37 PM
Subject: missing library libz.so


 Hi there,

 I just installed mysql (3.23) but when I run mysql_install_db or
mysqld
 it comes with an error message that the programming can't load the
 libz.so file. I've found that file online and copied it into all
myysql
 directories but still it can't load the file. I propably should copy
the
 file to the /local/lib directorie or something, but I can't acces
those
 directories. So is it possible to disable the use of this lib or can
I
 specify the path to it?

 I am using the binary version on a BSDI 4.01 server...

 Thanks!

 Rutger

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

 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: Error while trying to run binary mySQL on FreeBSD4.0

2001-02-26 Thread Ken Menzel

Drew,  the binary was compile for BSDi 4.2,  if you have gcc 2.95
installed try compiling from source.  You will have other problems
though as there are many bugs with threads on 4.0 BSDi.  Is there any
way you can upgrade to 4.2?
Ken
-
Ken Menzel  ICQ# 9325188
www.icarz.com  [EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, February 25, 2001 7:07 PM
Subject: Error while trying to run binary mySQL on FreeBSD4.0


 Hi all,
 I have just tried to use the mysql binary supplied for
FreeBSD
 (mysql-3.23.32-unknown-freebsdelf4.2-i386.tar.gz) on FreeBSD4.0 I
 have gcc-2.95.2 installed.

 M problem is I get this error when I try and run the
 scripts/mysql_install_db:
 /usr/libexec/ld-elf.so.1: /usr/lib/libstdc++.so.3: Undefined symbol
 "__ti9exception"
 I also get the same error when I try and run mysql itself.
 Here is what the mysqlbug script returned:
 System: FreeBSD heffalump.ricshaw.com.au 4.0-RELEASE
 FreeBSD 4.0-RELEASE #0: Wed Aug  2 13:05:22 EST 2000
 [EMAIL PROTECTED]:/usr/src/sys-altq/compile/ALTQ
 i386

 Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gcc /usr/bin/cc
 GCC: Using builtin specs.
 gcc version 2.95.2 19991024 (release)
 Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''
 LDFLAGS=''
 LIBC:
 -r--r--r--  1 root  wheel  1128450 Mar 21  2000 /usr/lib/libc.a
 lrwxrwxrwx  1 root  wheel  9 Jul 18  2000 /usr/lib/libc.so -
libc.so.4
 -r--r--r--  1 root  wheel  531444 Mar 21  2000 /usr/lib/libc.so.4
 Configure command: ./configure  --enable-large-files
 Perl: This is perl, version 5.005_03 built for i386-freebsd

 Any heap will be much appreciated. Thankyou in advance.
 Drew


 Andrew Toussaint
 Richardson-Shaw Pty Ltd
 [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: Antwort: tab-completition not working with libreadline4

2001-02-26 Thread Christian Hammers

On Mon, Feb 26, 2001 at 03:02:41PM +0100, [EMAIL PROTECTED] wrote:
  Since a few weeks tablename completition using tab is not working any longer.
 Are you sure that the table information is actually read at start of mysql?  Do
 a 'rehash' and see if it works then.
Cool that helped, thank you. Now I think I have to read a bit docs what
this rehash thing does and why I suddenly have to type it.

bye,

-christian-

-- 
Christian HammersWESTEND GmbH - Aachen und Dueren Tel 0241/701333-0
[EMAIL PROTECTED] Internet  Security for ProfessionalsFax 0241/911879
   WESTEND ist CISCO Systems Partner - Premium Certified

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

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.server ignoring my.cnf?

2001-02-26 Thread Joel Gwynn

I'm running mysql  3.23.33 on debian.  I'm using /etc/init.d/mysql.server
to start up and shut down mysql server.  My configuration file is
/etc/mysql/my.cnf.  In that file, I've set my socket as follows:

socket  = /var/run/mysqld/mysqld.sock

When mysql starts, it seems to ignore this directive, and set up the socket
on /tmp/mysql.sock.  I looked into the mysql.server file, and found that it
was looking for my.cnf at /etc/my.cnf,  so I tried a couple of things.
First I moved my.cnf to /etc/my.cnf.  No difference.  So I moved it back
and edited the mysql.server file to look at /etc/mysql/my.cnf as follows:

conf=/etc/mysql/my.cnf

Still nothing.  The only way I could get it to run on
/var/run/mysqld/mysqld.sock was to edit the line in mysql.server that
starts safe_mysql, ie:
I had to change
$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file 
to
$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file
--socket=/var/run/mysqld/mysqld.sock 

Isn't there a more elegant way to do this?  Why is mysql.server ignoring
the /etc/mysql/my.cnf file?

Thank you for your time.
-
Joel Gwynn  Designers' CADD Company, Inc.
A bus station is where a bus stops. 
A train station is where a train stops. 
So now you know why they call this a workstation... 

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

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: Security annoucement mailing-list ?

2001-02-26 Thread Simon Green

Hi all
I find the MySQL mail service very useful but he has a point hat due to the
number of e-mails form this list it mite be an idler to split things up a
bit?
Simon Green ISE

-Original Message-
From: Nicolas GREGOIRE [mailto:[EMAIL PROTECTED]]
Sent: 26 February 2001 15:34
To: [EMAIL PROTECTED]
Subject: Security annoucement mailing-list ?


Hi,

is it possible to create (I don't think it already exists) a
mailing-list just for security problems about MySQL.

I'm very concerned about the security of my web sites, and I rely on
MySQL to provide dynamic content.

So, for the moment, I must subscribe to the general list and receive
tons of messages just to see sometimes a security annoucement (like the
recent buffer-overflows)

Does anybody share my point of view about this security-only list ?

Nicob

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

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: Redhat 7 newbie.....

2001-02-26 Thread Luis

Thomas O'Neill wrote:

 I just installed Redhat 7.0 and MySql while i was at it.  But the deamon is not 
running. I get the

 ERROR 2002: Can't connect to local MySQL server through socket 
'/var/lib/mysql/mysql.sock' (111)

 when i try to use the client.  Could someone please clue me in as to home I get this 
baby going...

 Thanks!

 Tom

You know what the version that came with the red hat cd sucks !!!

you have to download the current one. Theres a lot of bugs with the red hat 7 cd.

try going to www.mysql.com and download the rpm file .

Luis


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

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




using parameters

2001-02-26 Thread mvandaele

HI,
Is it possible to do a select-statement like this:
select * from @parameter ?
Thanks,
Marijke


Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.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: Berkeley DB and mysql

2001-02-26 Thread Ashley M. Kirchner

Bill Rossi wrote:

 I recently tried to build mysql version 3.23.33, with support for  Berkeley
 DB.  I was using BDB version 3.2.9, and was unable to compile mysql with
 this version of BDB.

 Is this a known problem, an if so, what version of BDB should I use with
 mysql?

MySQL rolls its own BerkeleyDB, available on www.mysql.com, on the
same page
you downloaded MySQL from.

AMK4

--
W |
  |  I haven't lost my mind; it's backed up on tape somewhere.
  |
  ~
  Ashley M. Kirchner mailto:[EMAIL PROTECTED]   .   303.442.6410 x130
  SysAdmin / Websmith   . 800.441.3873 x130
  Photo Craft Laboratories, Inc. .eFax 248.671.0909
  http://www.pcraft.com  . 3550 Arapahoe Ave #6
  .. .  .  . .   Boulder, CO 80303, USA

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

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




LIMIT usage

2001-02-26 Thread Joseph Bueno

Hi,

I currently use a SELECT that looks like:
  SELECT field
FROM some_table
   WHERE some_condition
ORDER BY some_date DESC
   LIMIT 2000

in order to get the most recent records from some_table.

Since it is not possible (yet) to optimise an ORDER BY ... DESC
by using an index; is it possible to rewrite SELECT statement:

  SELECT field
FROM some_table
   WHERE some_condition
ORDER BY some_date
   LIMIT ?

so that results will be ordered in ascending order and return
the 2000 *last* records ?

Thanks
--
Joseph Bueno
NetClub/Trader.com

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

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




Re: Berkeley DB and mysql

2001-02-26 Thread Guenther Pewny

Hi,

I get an error at "make install" because mySQL did not
correctly modify BDB's Makefile (which has been slightly changed).

mySQL tries to modify the "install" target of the Makefile
so that ist does only contain
install: all
instead of additional "install_xxx"'s.
Previously there was _one_ line, now there are two lines
and mysql only modifes the first one.

If you modify the install target manually as describe above,
it should work.

Gnther Pewny

Bill Rossi wrote:

 I recently tried to build mysql version 3.23.33, with support for  Berkeley
 DB.  I was using BDB version 3.2.9, and was unable to compile mysql with
 this version of BDB.

 Is this a known problem, an if so, what version of BDB should I use with
 mysql?

 Thanks in advance.

 Bill

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

 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: Patching w/o the compiler was Re: Replication time patch

2001-02-26 Thread Thimble Smith

On Fri, Feb 23, 2001 at 03:35:06PM -0800, William R. Mussatto wrote:
 Your reply triggered a question?
 
 If you are on a win32 box and using the binary builds, what is the 
 proceure for getting these patchs?  Last time I checked the site is was 
 still showing 3.23.33 as the current release?  

If you can't compile from source, you must wait for the next
release.  3.23.34 should be coming out within two weeks.

Tim

-- 
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Tim Smith [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Development Team
/_/  /_/\_, /___/\___\_\___/   Boone, NC  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




GUI

2001-02-26 Thread Dr J. Froggatt

Hi from the UK,


Firstly just let me say how cool and NON microsoft MySQL is. It is a BRILLIANT 
PIECE OF SOFTWARE.

Second - help!! I have just downloaded 

Win32 static binary of MySQLGUI 1.7.4-2  onto my (sadly) IBM PC and when I've 
unzipped it and run it, it asks for a password. (I may have set one on a 
previous installation but have forgotten it). I cannot remember my password! 
I've tried to delete and re-install it but it still asks for a password... What 
can I do???


Please help.


Kind Regards


James Froggatt
Human genome mapping project
UK


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

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




Re: Security annoucement mailing-list ?

2001-02-26 Thread Jeremy D. Zawodny

On Mon, Feb 26, 2001 at 04:34:20PM +0100, Nicolas GREGOIRE wrote:
 
 is it possible to create (I don't think it already exists) a
 mailing-list just for security problems about MySQL.
 
 I'm very concerned about the security of my web sites, and I rely on
 MySQL to provide dynamic content.
 
 So, for the moment, I must subscribe to the general list and receive
 tons of messages just to see sometimes a security annoucement (like the
 recent buffer-overflows)
 
 Does anybody share my point of view about this security-only list ?

Not exactly.

I'd rather see them sent to the MySQL announcements list. It is
already VERY low-traffic, and that seems like appropriate content.

No sense creating another list just for the VERY occasional
announcements when we already have one [mostly] for that purpose.

Thoughts?

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

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

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




Help Installing MySQL

2001-02-26 Thread Terry Babbey

 I keep getting errors trying to install Mysql 3.23.33 on a Digital
 Unix 4.0d alpha box. I am using gnumake 3.79.1 and gcc 2.95.2.

 The error message is as follow:
 g++ -O3 -DDBUG_OFF -fno-implicit-templates -o mysqlbinlog
 mysqlbinlog.o mini_cli
 ent.o net_serv.o mini_client_errors.o violite.o password.o
 ../isam/libnisam.a ..
 /merge/libmerge.a ../myisam/libmyisam.a ../myisammrg/libmyisammrg.a
 ../heap/libh
 eap.a ../mysys/libmysys.a ../dbug/libdbug.a ../regex/libregex.a
 ../strings/libmy
 strings.a -lm -lpthread -lmach -lexc
 /usr/bin/ld:
 /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0d/2.95.2/libgcc.a(_eh.o):
 __throw: mu
 ltiply defined
 collect2: ld returned 1 exit status
 gnumake[3]: *** [mysqlbinlog] Error 1
 gnumake[3]: Leaving directory `/usr/local/mysql/mysql-3.23.33/sql'
 gnumake[2]: *** [all-recursive] Error 1
 gnumake[2]: Leaving directory `/usr/local/mysql/mysql-3.23.33/sql'
 gnumake[1]: *** [all-recursive] Error 1
 gnumake[1]: Leaving directory `/usr/local/mysql/mysql-3.23.33'
 gnumake: *** [all-recursive-am] Error 2

 My configure command was as follows:
 # CC="gcc" CXX="g++" \
  ./configure --with-named-threads="-lpthread -lmach -lexc -lc" \
  --prefix=/usr/local/mysql

 And here is exerps my config.log:
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.

 configure:3901: gcc -o conftest conftest.c -ldir   15
 /usr/bin/ld:
 Can't locate file for: -ldir
 collect2: ld returned 1 exit status
 configure: failed program was:
 #line 3890 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 builtin and then its argument prototype would still apply.  */
 char opendir();

 int main() {
 opendir()
 ; return 0; }
 configure:4126: floatingpoint.h: No such file or directory
 configure: failed program was:
 #line 4125 "configure"
 #include "confdefs.h"
 #include floatingpoint.h
 configure:4120: checking for ieeefp.h
 configure:4130: gcc -E  conftest.c /dev/null 2conftest.out
 configure:4126: ieeefp.h: No such file or directory
 configure: failed program was:
 #line 4125 "configure"
 #include "confdefs.h"
 #include ieeefp.h
 configure:4120: checking for limits.h
 configure:4126: select.h: No such file or directory
 configure: failed program was:
 #line 4125 "configure"
 #include "confdefs.h"
 #include select.h
 configure:4126: synch.h: No such file or directory
 configure: failed program was:
 #line 4125 "configure"
 #include "confdefs.h"
 #include synch.h
 configure:4126: sys/utime.h: No such file or directory
 configure: failed program was:
 #line 4125 "configure"
 #include "confdefs.h"
 #include sys/utime.h
 configure:4618: gcc -o conftest conftest.c -lm  15
 /usr/bin/ld:
 Unresolved:
 p2open
 collect2: ld returned 1 exit status
 configure: failed program was:
 #line 4595 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,

 which can conflict with char p2open(); below.  */
 #include assert.h
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 builtin and then its argument prototype would still apply.  */
 char p2open();

 int main() {

 /* The GNU C library defines this for functions which it implements
 to always fail with ENOSYS.  Some functions are actually named
 something starting with __ and the normal name is an alias.  */
 #if defined (__stub_p2open) || defined (__stub___p2open)
 choke me
 #else
 p2open();
 #endif

 ; return 0; }
 configure:4636: checking for p2open in -lgen
 configure:4655: gcc -o conftest conftest.c -lgen  -lm  15
 /usr/bin/ld:
 Can't locate file for: -lgen
 collect2: ld returned 1 exit status
 configure: failed program was:
 #line 4644 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 builtin and then its argument prototype would still apply.  */
 char p2open();

 int main() {
 p2open()
 ; return 0; }
 configure:4686: checking for bind
 configure:4714: gcc -o conftest conftest.c -lm  15
 configure:4782: checking for crypt in -lcrypt
 configure:4801: gcc -o conftest conftest.c -lcrypt  -lm  15
 /usr/bin/ld:
 Can't locate file for: -lcrypt
 collect2: ld returned 1 exit status
 configure: failed program was:
 #line 4790 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
 builtin and then its argument prototype would still apply.  */
 char crypt();

 int main() {
 crypt()
 ; return 0; }
 configure:4829: checking for crypt
 configure:4857: gcc -o conftest conftest.c -lm  15
 configure:4885: checking if libz with compress
 configure:4902: gcc -o conftest conftest.c -lz -lm  15
 

Re: Security annoucement mailing-list ?

2001-02-26 Thread Nicolas GREGOIRE



 I'd rather see them sent to the MySQL announcements list. It is
 already VERY low-traffic, and that seems like appropriate content.
 
 No sense creating another list just for the VERY occasional
 announcements when we already have one [mostly] for that purpose.

It seems to be a good idea.
My main concern is to avoid the numerous messages of the general list,
not to create a new, dedicated list.

Are the security info sent to the Announcement list ?
(if it is the case, i will subscribe to it and unsubscribe of the
general one)

Nicob

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

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.server ignoring my.cnf?

2001-02-26 Thread Joel Gwynn

I'm running mysql  3.23.33 on debian.  I'm using /etc/init.d/mysql.server
to start up and shut down mysql server.  My configuration file is
/etc/mysql/my.cnf.  In that file, I've set my socket as follows:

socket  = /var/run/mysqld/mysqld.sock

When mysql starts, it seems to ignore this directive, and set up the socket
on /tmp/mysql.sock.  I looked into the mysql.server file, and found that it
was looking for my.cnf at /etc/my.cnf,  so I tried a couple of things.
First I moved my.cnf to /etc/my.cnf.  No difference.  So I moved it back
and edited the mysql.server file to look at /etc/mysql/my.cnf as follows:

conf=/etc/mysql/my.cnf

Still nothing.  The only way I could get it to run on
/var/run/mysqld/mysqld.sock was to edit the line in mysql.server that
starts safe_mysql, ie:
I had to change
$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file 
to
$bindir/safe_mysqld --datadir=$datadir --pid-file=$pid_file
--socket=/var/run/mysqld/mysqld.sock 

Isn't there a more elegant way to do this?  Why is mysql.server ignoring
the /etc/mysql/my.cnf file?

Thank you for your time. 
-
Joel Gwynn  Designers' CADD Company, Inc.
A bus station is where a bus stops. 
A train station is where a train stops. 
So now you know why they call this a workstation... 

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

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




Replication

2001-02-26 Thread Kent Hoover

I would try running multiple MySQL servers on your backup host machine,
where
each one is a slave to its own respective master DB. I think that keeps
maintenance
of replication/recovery/restore scenarios much cleaner. If your Master
DB A
breaks, what you have to do to recover it from Slave A is simpler if you
don't
have to deal with the current states of Slaves B and C, for instance.

Cheers,

Kent


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

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




Re: LIMIT usage

2001-02-26 Thread Jeremy D. Zawodny

On Mon, Feb 26, 2001 at 06:19:46PM +0100, Joseph Bueno wrote:
 Hi,
 
 I currently use a SELECT that looks like:
   SELECT field
 FROM some_table
WHERE some_condition
 ORDER BY some_date DESC
LIMIT 2000
 
 in order to get the most recent records from some_table.
 
 Since it is not possible (yet) to optimise an ORDER BY ... DESC
 by using an index; is it possible to rewrite SELECT statement:
 
   SELECT field
 FROM some_table
WHERE some_condition
 ORDER BY some_date
LIMIT ?
 
 so that results will be ordered in ascending order and return the
 2000 *last* records ?

Well, you could store an additional field which is like the opposite
of the date. Since dates normally count forward from some time in the
past, you just need something that counts backward from some time in
the future.

You might consider using a unixtime value. MySQL can convert from/to
unixtime easily (check the manual), and there is currently a known
upper bound on the date that a unixtime can represent.

So you could store a field which you compute by taking the current
unixtime (983213418) and subtracting it from the upper-bound.

Think of it as field = max_unixtime - current_unixtime

Then the numbers will be SMALLER as you go into the future, so you can
sort them easily.

But there are many cases in which this isn't a good idea. So it may
work for you, or it may not. :-)

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

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

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




mcrypt and encrypted field length

2001-02-26 Thread Hardy Merrill

Please see my questions below - I asked the PHP list and no-one
responded.  

Basically I'm new to "mcrypt" and I'm trying to use mcrypt and
PHP with MySQL - I'd like to encrypt a 20-character field and
store the result in a MySQL column, but I'm not sure

  1. what data type to make the column - varchar?
  2. how big to make the column

I'm testing using Triple DES encryption, and the resulting
string contains all kinds of strange characters - I'm able to
store the field using the PHP add_slashes function to escape
a few special characters, but in the "mysql" client when I
query the row containing the encrypted field, mysql displays
a bunch of strange characters - I can refer to the row by the
non-encrypted key although the same key does *NOT* display
properly in mysql(the encrypted column must be screwing up
the displayi).

Anyone have any ideas how to help?

TIA.

-- 
Hardy Merrill
Mission Critical Linux, Inc.
http://www.missioncriticallinux.com

- Forwarded message from Hardy Merrill [EMAIL PROTECTED] -

 Date: Mon, 26 Feb 2001 10:49:37 -0500
 From: Hardy Merrill [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: [PHP] mcrypt and encrypted field length
 
 First, can anyone point me to a good "mcrypt" primer or tutorial?
 
 Second, how can I determine what type and length I should make a
 database field that will hold encrypted data?  Is there some table
 somewhere which tells how long a resulting encrypted field will be
 based on the encryption type and/or length of the plaintext field?
 
   Example: If I have a 20 character field and want to use Triple
DES to encrypt it, can I find out how long the resulting
field will be - what is the longest it will be?  Will
the resulting encrypted field always be the same length?
Should I make the data type some variation of "text" or
"varchar"?
 
 TIA.
 
 -- 
 Hardy Merrill
 Mission Critical Linux, Inc.
 http://www.missioncriticallinux.com
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

- End forwarded message -

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

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




clever head needed

2001-02-26 Thread Henrik Lebtien Mohr

Hi there!

If any of you have tried the following with ASP/ADO and MySQL, please inform
me of how you did it:

I use ASP and adodb.recordset to connect to a MySQL-database.
I use the following code to insert into the db:

[CODE START]
set rsGroup = server.CreateObject("adodb.recordset")
sql = "tblGroup"
rsGruppe.Open sql, connect

with rsGroup
.AddNew
.Fields("group_name") = strGName
.Fields("group_slogan") = strGSlogan
.Update
end with
[CODE END]

Now - the thing I have to do in the next line is, to get the (auto
incremented, indexed and unique) group_id of the newly inserted group from
tblGroup.

How do I do that? Can I call the last_insert_id() function in MySQL through
the recordset in some way? Or any other suggestions?

When I used Access-databases instead of MySQL, I could just call
rsGroup("group_id") in the next line of code, which would return the correct
group_id.

Please help, anybody!?

Kind regards,
Henrik Mohr, Denmark


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

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 query which cannot be fast even theoretically?

2001-02-26 Thread Kent Hoover

Your table bb is not indexed in a way that helps this query. Creating an

index on min_number may help somewhat.

If your intervals DON'T overlap each other, there's probably a much
better
algorithm for you to use than an SQL join. (e.g., select each number
from aa
in sequence, form a query for each one to determine the range into which
it fits:
"Select range_type from bb where some_number = min_number order by
min_number limit 1" or something like that.
You might be able to complete these 50,000 queries faster than 7
minutes.)

Cheers,

Kent


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

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.server ignoring my.cnf?

2001-02-26 Thread Kent Hoover

Tried /etc/my.cnf  in place of /etc/mysql/my.cnf ?

Cheers,

Kent


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

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.server ignoring my.cnf?

2001-02-26 Thread Kent Hoover

Sorry. Sent the last message before I was done

If you have a stray $DATADIR/my.cnf or a $HOME/.my.cnf, their
contents will override what you have set in /etc/my.cnf.

Cheers,

Kent


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

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.server ignoring my.cnf?

2001-02-26 Thread Joel Gwynn

I tried /etc/my.cnf and got the same results.  As far as $DATADIR or $HOME
are concerned, I don't see them when I do 'printenv'.  Is there another way
to find out if those may be set, and by what?

thanks.

At 02:33 PM 2/26/01 -0500, Kent Hoover wrote:
Sorry. Sent the last message before I was done

If you have a stray $DATADIR/my.cnf or a $HOME/.my.cnf, their
contents will override what you have set in /etc/my.cnf.

Cheers,

Kent


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

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

-
Joel Gwynn  Designers' CADD Company, Inc.
A bus station is where a bus stops. 
A train station is where a train stops. 
So now you know why they call this a workstation... 

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

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




HAVING clause malfunction; probable bug

2001-02-26 Thread Harvey Chinn

2001 Feb 26

Problem: HAVING clause malfunction

I get wrong results when using certain combinations of
filtering conditions in the HAVING clause.  I'm calculating
the total number of nights (Nights) and the average number
of nights (AvgNights) that travelers stay in hotels.  Below
are the descriptions of the relevant fields of the two main
tables.  Also shown are the SQL queries along with the
result sets.

Case 1 shows the result set for no HAVING clause.

Case 2:
Filter for groups HAVING Nights = 2 (a SUM); the query
results are as expected.

Case 3:
Add the condition AvgNights = 5 (an AVG)
HAVING Nights = 2 AND
   AvgNights = 5
What I expect to see is the result set shown in case _4_,
but what I get is shown in case 3 below, which, as you can
see, is identical with case 2.  MySQL appears to be ignoring
the condition applied to the calculated floating point
field.

(I do recognize that the Night = 2 is irrelevant to the
results of this query; this code is part of an automated
system that allows users to add multiple filter conditions,
but makes no attempt to check for such irrelevancies.)


Case 4:
Finally, when I remove the first condition and use
HAVING AvgNights = 5
the correct filtering now takes place.


The problem seems to involve a comparison to an AVG
aggregate field when combined with a comparison to either an
integer field or a SUM aggregate field.  The comparison to
the AVG field is ignored.

In contrast, combining two comparisons to two integer
fields, or combining two comparisons to two decimal fields
(include two AVG aggregates), both work as expected.

Is this a (known) bug?

Is there a work-around?

Thank you,
 Harvey Chinn
[EMAIL PROTECTED]




MySQL Server version: 3.23.32

describe transx [only the relevant fields shown]
++--+--+-+-++
| Field  | Type | Null | Key | Default | Extra  |
++--+--+-+-++
| tid| int(10) unsigned |  | PRI | NULL| auto_increment |
| accountid  | int(10) unsigned | YES  | MUL | NULL||
| invdate| date | YES  | MUL | NULL||
| traveler   | varchar(50)  | YES  | MUL | NULL||
++--+--+-+-++

describe hotel [only the relevant fields shown]
++--+--+-+-+---+
| Field  | Type | Null | Key | Default | Extra |
++--+--+-+-+---+
| tid| int(10) unsigned |  | MUL | 0   |   |
| indate | date | YES  | MUL | NULL|   |
| outdate| date | YES  | MUL | NULL|   |
++--+--+-+-+---+



Case 1

SELECT   account.name Account, transx.traveler Traveler, count(*) Num,
 SUM( to_days(hotel.outdate) - to_days(hotel.indate) ) Nights,
 AVG( to_days(hotel.outdate) - to_days(hotel.indate) ) AvgNights
FROM hotel LEFT JOIN transx USING (tid)
 LEFT JOIN account ON account.id = transx.accountid
WHEREtransx.accountid = 1290
 AND transx.invdate BETWEEN '2001-01-01' AND '2001-01-31'
GROUP BY Account, Traveler
ORDER BY Traveler

+---++-++---+
| Account   | Traveler   | Num | Nights | AvgNights |
+---++-++---+
| DEMO COUPON USAGE | ABRAHAMSON/JERRY   |   1 |  2 |2. |
| DEMO COUPON USAGE | ANDERSON/KEVI  |   2 |  2 |1. |
| DEMO COUPON USAGE | ANDERSON/ROB   |   1 |  3 |3. |
| DEMO COUPON USAGE | BJORKLUND/GAY LYNN |   1 |  5 |5. |
| DEMO COUPON USAGE | CLEMENTE/RYAN  |   1 |  1 |1. |
| DEMO COUPON USAGE | DOWNING/ALAN   |   1 |  8 |8. |
| DEMO COUPON USAGE | HALL/WALID |   3 |  7 |2. |
| DEMO COUPON USAGE | LARSON/JUSTINA |   3 |  3 |1. |
| DEMO COUPON USAGE | MCDONOUGH/KAREN AN |   2 | 10 |5. |
| DEMO COUPON USAGE | OSINSKI/RYAN   |   1 |  1 |1. |
| DEMO COUPON USAGE | ROCKOW/AARON   |   1 |  1 |1. |
| DEMO COUPON USAGE | ROCKOW/RICHARD L   |   4 | 22 |5.5000 |
| DEMO COUPON USAGE | SCHAECHER/WENDY|   1 |  5 |5. |
| DEMO COUPON USAGE | SCHREFFLER/BRENDA  |   1 |  1 |1. |
| DEMO COUPON USAGE | SMITH/ROB  |   1 |  5 |5. |
| DEMO COUPON USAGE | TOBOLESKI/CHRISTOP |   1 |  8 |8. |
| DEMO COUPON USAGE | VAUGHN/BRENDA  |   2 |  6 |3. |
+---++-++---+
17 rows in set (0.06 sec)



Case 2

SELECT  [same as above]
GROUP BY Account, Traveler
HAVING   Nights = 2
ORDER BY Traveler


Database Permissions

2001-02-26 Thread Jason Frisvold

Greetings,

I'm having a little trouble understanding how the permissions work
within mySQL.  I have 3 current databases.  The first is the default mysql
database, and the other 2 are ones that I have created.  I want to be able
to grant access to each table individually based on username.  Hostname
isn't really a big deal to me because of the firewalls.  Basically, if they
can get to the database server, then they belong there.  But, I want to
limit what they can get to via username.

So, I tried the following :

insert into user (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'myuser', password('mypass'), 'Y', 'Y', 'Y', 'Y');
insert into db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'database1', 'myuser', 'Y', 'Y', 'Y', 'Y');
insert into db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'mysql', 'myuser', 'N', 'N', 'N', 'N');
flush privileges;

I *thought* this would allow access to database1, and not mysql, but
apparently I was wrong...  I can still access the mysql database, make
changes, etc. without any restrictions.

What am I doing wrong???!!!???

Also..  Is there a way to allow a user to connect to the mySQL server, not
specifying a database (this is via Perl and DBI), and get a list of
databases that they have permissions to?  (What I'd like to do is let them
list all db's except those they have no permissions on...)  I have it
working so that they can list all the databases, but it will list everything
on the server..  (This may be a moot point when I get actual permissions to
work...)

---
Jason H. Frisvold
Senior ATM Engineer
Engineering Dept.
Penteledata
CCNA Certified - CSCO10151622
[EMAIL PROTECTED]
---
"We should take care not to make the intellect our god; it has, of course,
powerful muscles, but no personality." - Albert Einstein (1879-1955)


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

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: Security annoucement mailing-list ?

2001-02-26 Thread Sergei Golubchik

Hi!

On Feb 26, Nicolas GREGOIRE wrote:
 
 
  I'd rather see them sent to the MySQL announcements list. It is
  already VERY low-traffic, and that seems like appropriate content.
  
  No sense creating another list just for the VERY occasional
  announcements when we already have one [mostly] for that purpose.
 
 It seems to be a good idea.
 My main concern is to avoid the numerous messages of the general list,
 not to create a new, dedicated list.
 
 Are the security info sent to the Announcement list ?
 (if it is the case, i will subscribe to it and unsubscribe of the
 general one)
 
 Nicob
 

Yes, security info is to be sent to announcement list.

And, really, it's a good idea for everybody to subscribe to announcement
list whether one is subscribed to general mysql@ list or not.

Announcement list will add to mail box only about one mail
a month - not a big traffic at all, and then one can be sure 
he won't miss anything REALLY important.

Regards,
Sergei

--
MySQL Development Team
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /   Sergei Golubchik [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Osnabrueck, Germany
   ___/

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

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




Re: MySQL, Linux and Hardware config

2001-02-26 Thread William R. Mussatto

Check under ulimit to raise the number of file descriptors.  
ulimit -n # 

Linux has a global limit (4096 in debian' case) which may also be 
raised.   However, as someone else has recommended, look at shortening 
the time you are actually connected.  Connect, get data, disconnect, 
process data...just a thought. 

Check /proc/sys/fs/file-nr

You must be root to chane this.

On Mon, 26 Feb 2001, Joseph Bueno wrote:

 Date: Mon, 26 Feb 2001 13:56:52 +0100
 From: Joseph Bueno [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Cc: mysql [EMAIL PROTECTED]
 Subject: Re: MySQL, Linux and Hardware config
 
 Mohamed Sadok MOUHA a écrit :
  
  We plan to use MySQL in a database of more than 200 000 client.
  Every client has about 1000 bytes of information (stored in 40 fields).
  The number of simultaneos connections could reach 1000.
  With such environment, what di you requires as OS? Does Linux RH 6.2
  is ok? Does MySQL is also OK? What about the hardware config
  (multiprocessor??, RAM??)?
  
  Does Any one can help me?
  
  Thanxs a lot
  


  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 Hi Mohamed,
 
 I am currently running MySQL on RH 6.2 servers:
 
 - It seems that due to some glibc limitations (it has been discussed
 on this mailing list a few weeks ago), MySQL cannot open more than 1024 file
 descriptors. Since each active connection uses one file descriptor for its
 socket and one for each table used in query; it is not possible
 to have 1000 simultaneous connections. My server crashed very often when
 there was more than 400 connections, it is stable now with a maximum of 360.
 
 - Under heavy load, I experienced a lot of index corruptions on a biprocessor
 machine. The problem has disappeared after rebooting in single processor mode.
 It seems that upgrading to a Linux 2.4 kernel with glibc 2.2 should solve the
 problem but I have not tested it yet.
 
 - RAM configuration is crucial for maximum performance. My databases use ~450Mb
 (this a little bit more than what you describe,~200 Mb, but you should also add
 space for indexes), MySQL is running on dedicated servers and ~ 1Gb of RAM is
 used.
 
 Hope this helps 
 --
 Joseph Bueno
 NetClub/Trader.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

Sincerely,

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


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

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




Compatable SQL for indexes

2001-02-26 Thread Eric Frazier

Hi,

I am tring to find the most compatable way to write CREATE TABLE statments
between mySQL and Postgress.

Postgress has a CREATE INDEX as does mySQL, but I would like to be able to
create Primary Keys and Indexes in the CREATE TABLE statment.

The problem I am running into is that Postgress doesn't have a INDEX
[index_name] (index_col_name,...) option, it only has
CONSTRAINT constraint_name ]
{ UNIQUE ( column_name [, ... ] ) |

with the mysql version being below

INDEX [index_name] (index_col_name,...)
orUNIQUE [index_name] (index_col_name,...)


When you use UNIQUE  in postgress it automaticly creates an index as a
result. But it looks to me that this would not happen in mySQL. 
Is that correct?

I am guessing that I am best off creating primary keys as a part of the
table create statement, but making indexes later on with CREATE INDEX
which is mostly the same between the two DBs

Does that make the most sense?


Thanks,

Eric 


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




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

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




Re: mysql.server ignoring my.cnf?

2001-02-26 Thread Kyle Hayes


make sure that you set the sock parameter in both the [client] and [mysqld] 
sections of the configuration file.  This is one of my favorite errors :-/

Best,
Kyle

On Monday 26 February 2001 12:04, Joel Gwynn wrote:
 I tried /etc/my.cnf and got the same results.  As far as $DATADIR or $HOME
 are concerned, I don't see them when I do 'printenv'.  Is there another way
 to find out if those may be set, and by what?

 thanks.

 At 02:33 PM 2/26/01 -0500, Kent Hoover wrote:
 Sorry. Sent the last message before I was done
 
 If you have a stray $DATADIR/my.cnf or a $HOME/.my.cnf, their
 contents will override what you have set in /etc/my.cnf.
 
 Cheers,
 
 Kent
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 -
 Joel GwynnDesigners' CADD Company, Inc.
 A bus station is where a bus stops.
 A train station is where a train stops.
 So now you know why they call this a workstation...

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

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

-- 
Kyle Hayes
Quicknet Technologies  t: +1 415 864 5225
520 Townsend St. Suite D  f: +1 415 864 8388
San Francisco, CA 94103 w: http://www.quicknet.net
USA

***
"HEAR THE DIFFERENCE" with a live MICROTELCO demo at:
Computer Telephony EXPO, Mar 6-8, Los Angeles, CA

MicroTelco is a revolutionary service that brings multiple Internet
Telephony Service Providers (ITSPs) together in a convenient,
simple to use account center for greater reliability and flexibility.
For more information visit: http://www.microtelco.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.server ignoring my.cnf?

2001-02-26 Thread Joel Gwynn

While that is definitely the kind of pinheaded mistake that I'm used to
making, that's not what's happening.  I just looked at the file again and
mysql.server is also ignoring things like the pid file and the log file :(

thanks anyway

At 12:51 PM 2/26/01 -0800, you wrote:

make sure that you set the sock parameter in both the [client] and [mysqld] 
sections of the configuration file.  This is one of my favorite errors :-/

Best,
Kyle

On Monday 26 February 2001 12:04, Joel Gwynn wrote:
 I tried /etc/my.cnf and got the same results.  As far as $DATADIR or $HOME
 are concerned, I don't see them when I do 'printenv'.  Is there another way
 to find out if those may be set, and by what?

 thanks.

 At 02:33 PM 2/26/01 -0500, Kent Hoover wrote:
 Sorry. Sent the last message before I was done
 
 If you have a stray $DATADIR/my.cnf or a $HOME/.my.cnf, their
 contents will override what you have set in /etc/my.cnf.
 
 Cheers,
 
 Kent
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

 -
 Joel Gwynn   Designers' CADD Company, Inc.
 A bus station is where a bus stops.
 A train station is where a train stops.
 So now you know why they call this a workstation...

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

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

-- 
Kyle Hayes
Quicknet Technologies  t: +1 415 864 5225
520 Townsend St. Suite D  f: +1 415 864 8388
San Francisco, CA 94103 w: http://www.quicknet.net
USA

***

"HEAR THE DIFFERENCE" with a live MICROTELCO demo at:
Computer Telephony EXPO, Mar 6-8, Los Angeles, CA

MicroTelco is a revolutionary service that brings multiple Internet
Telephony Service Providers (ITSPs) together in a convenient,
simple to use account center for greater reliability and flexibility.
For more information visit: http://www.microtelco.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

-
Joel Gwynn  Designers' CADD Company, Inc.
A bus station is where a bus stops. 
A train station is where a train stops. 
So now you know why they call this a workstation... 

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

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: Join causing Error?

2001-02-26 Thread Johnny Withers

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Maybe this will help:
Break the query up into a variable so PHP can string it together
better.
Exec. the query, check the result, if good,
check the results for rows, if results, display results,
else, do nothing, if query faield, set err to 1 and set
an error message.



mysql_select_db("centraldb",$db);
$qorder++; 
$query="SELECT q.questid, q.question, q.answer, q.qorder, q.depart,
q.catid, "
."q.active, q.global, q.adate, q.author, q.authoremail, q.askemail,
."c.catid, c.category, c.under, c.corder, c.active "
." FROM central_groupfaqq q, central_groupfaqcat c "
."WHERE q.active = '1' AND q.global = '1' AND c.active = '1' "
."ORDER BY c.under, c.order, q.qorder;"
;
if($result=mysql_query($query)) {
if($num=mysql_num_ros($result)) {
while ($myrow = mysql_fetch_row($result))
//display resutls
}
} else {
//no results
}
} else {
//bad query
$err=1
$errMsg="Failed Query: $querybr".mysql_errno()." :
".mysql_error();
}


---somehwere in html file

if(!$err) {
//display results and info here
} else {
printf("%s\n",$errMsg);
}



- -
Johnny Withers
[EMAIL PROTECTED]
p. 601.853.0211
c. 601.954.9133
 


- -Original Message-
From: Keith Spiller [mailto:[EMAIL PROTECTED]]
Sent: Sunday, February 25, 2001 2:30 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Join causing Error?


Can anyone tell me why this:
  Line 282mysql_select_db("centraldb",$db);
  Line 283$qorder++; 
  Line 284$result = mysql_query("SELECT q.questid, q.question,
q.answer, q.qorder, q.depart, q.catid, 
  q.active, q.global, q.adate, q.author,
q.authoremail, q.askemail, c.catid, c.category, c.under, 
  c.corder, c.active FROM central_groupfaqq q,
central_groupfaqcat c WHERE q.active = '1' AND 
  q.global = '1' AND c.active = '1' ORDER BY c.under,
c.order, q.qorder",$db);
  Line 285while ($myrow = mysql_fetch_row($result))

Would cause this error:
  Warning: Supplied argument is not a valid MySQL result resource in
faqbody.php3 on line 285

When changing the same SELECT statement to:
  Line 284$result = mysql_query("SELECT * FROM central_groupfaqq
WHERE active = '1' ORDER BY
   qorder",$db);

Works perfectly?


Keith Spiller
a.k.a. Larentium


-BEGIN PGP SIGNATURE-
Version: PGPfreeware 6.5.3 for non-commercial use http://www.pgp.com

iQA/AwUBOpppHLFNxPoD98ryEQL95QCffp7UNf0lJdx0lwSUjFdRKRths94AoIsS
4fpFCCXraXVYdkR2Hg5mKd0P
=vlca
-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




load large data files?

2001-02-26 Thread Lisa M. FitzGerald

From: lmfitzg
To: [EMAIL PROTECTED]
Subject: [50 character or so descriptive subject here (for reference)]

Description:
 precise description of the problem (multiple lines)
How-To-Repeat:
 code/input/activities to reproduce the problem (multiple lines)
Fix:
 how to correct or work around the problem, if known (multiple lines)

Submitter-Id: submitter ID
Originator:
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.22.26a (Source distribution)
Server: ./mysqladmin  Ver 7.11 Distrib 3.22.26a, for sun-solaris2.8 on
sparc
TCX Datakonsult AB, by Monty

Server version  3.22.26a
Protocol version 10
Connection  Localhost via UNIX socket
UNIX socket  /tmp/mysql.sock
Uptime:   1 day 20 hours 24 min 25 sec

Threads: 4  Questions: 725  Slow queries: 0  Opens: 677  Flush tables:
1  Open tables: 63
Environment:
 machine, os, target, libraries (multiple lines)
System: SunOS sherwin 5.8 Generic_108528-03 sun4u sparc SUNW,Ultra-60
Architecture: sun4

Some paths:  /usr/bin/perl /usr/ccs/bin/make /usr/local/bin/gmake
/usr/local/bin/gcc /usr/ucb/cc
GCC: Reading specs from
/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''
LDFLAGS=''
Configure command: ./configure  --prefix=/usr/local/mysql
Perl: This is perl, version 5.005_03 built for sun4-solaris


I am trying to load two tables from space-delimited files.
Both are quite large.
Neither ever seems to finish. I have allowed them to run for days.
The file sizes of the table files increase for a while and stop,
but the mysql cursor never returns,  'mysqlamysqladmin processlist'
says the process is still running, top says the process mysql is still
taking up an entire CPU, but nothing is happening.  When this
happens I can't do anything else in the database.

I have tried LOAD DATA INFILE from the mysql prompt,
and mysqlimport from the command line (which launches LOAD
DATA INFILE), both with the same results.

file size
file 1: 342580425 FAILS
file 2: 233952880 FAILS
file 3: 156121911 WORKS

I am running Sun Solaris 8, which allows file sizes over 2gig. Is there
a file size limit for mysql?  Is there some setting I need to
allow import of large files?  Is there some different/better way
to import data than what I have tried?

The only way I have found to stop the process is to kill the server.


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




auto_increment

2001-02-26 Thread John Tsangaris

If I turn on auto increment and let it do it's thing and then later on
delete a few of the entries (let's say 1, 2, 3) and the current high entry
has an id of 45.. why does mysql continue with 46 instead of using up 1, 2,
and 3 first?  Is there a way to bypass this?


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

2001-02-26 Thread Atle Veka



what version of mysql are you using? AFAIK, this behavior is only
supported in 3.23.x


Atle

On Mon, 26 Feb 2001, John Tsangaris wrote:

 If I turn on auto increment and let it do it's thing and then later on
 delete a few of the entries (let's say 1, 2, 3) and the current high entry
 has an id of 45.. why does mysql continue with 46 instead of using up 1, 2,
 and 3 first?  Is there a way to bypass this?
 
 
 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




Re: Patching w/o the compiler was Re: Replication time patch

2001-02-26 Thread William R. Mussatto

Thanks that was the answer I was looking for.  On our Linux side we can 
copile, but I'm doing development work at home on win2k and I don't have 
a current compiler (perl and java don't need C compilers).

On Mon, 26 Feb 2001, Thimble Smith wrote:

 Date: Mon, 26 Feb 2001 12:43:13 -0500
 From: Thimble Smith [EMAIL PROTECTED]
 To: "William R. Mussatto" [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED], [EMAIL PROTECTED]
 Subject: Re: Patching w/o the compiler was Re: Replication time patch
 
 On Fri, Feb 23, 2001 at 03:35:06PM -0800, William R. Mussatto wrote:
  Your reply triggered a question?
  
  If you are on a win32 box and using the binary builds, what is the 
  proceure for getting these patchs?  Last time I checked the site is was 
  still showing 3.23.33 as the current release?  
 
 If you can't compile from source, you must wait for the next
 release.  3.23.34 should be coming out within two weeks.
 
 Tim
 
 -- 
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Tim Smith [EMAIL PROTECTED]
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Development Team
 /_/  /_/\_, /___/\___\_\___/   Boone, NC  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
 

Sincerely,

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


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

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




Re: auto_increment

2001-02-26 Thread Jeremy D. Zawodny

On Mon, Feb 26, 2001 at 04:23:23PM -0800, John Tsangaris wrote:

 If I turn on auto increment and let it do it's thing and then later
 on delete a few of the entries (let's say 1, 2, 3) and the current
 high entry has an id of 45.. why does mysql continue with 46 instead
 of using up 1, 2, and 3 first?  Is there a way to bypass this?

Logically, going from 45 to 1 or 2 or 3 isn't an "increment", it's a
decrement.

If you never want holes in the series, then auto_increment may not be
the best option for you...

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

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

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




Re: auto_increment

2001-02-26 Thread Steve Ruby

John Tsangaris wrote:
 
 If I turn on auto increment and let it do it's thing and then later on
 delete a few of the entries (let's say 1, 2, 3) and the current high entry
 has an id of 45.. why does mysql continue with 46 instead of using up 1, 2,
 and 3 first?  Is there a way to bypass this?
 
 John


To avoid duplication of those keys in many cases.  For example if you
archived 1,2,3 and removed them from the table you may want to add them back
in and you don't want their ID's to be taken.  Or you may have references
to 1,2,3 in other tables, if you delete them it would be wrong
for the references to point to the new 1,2,3. Of course you should probably
delete the references but if you didn't it would be confusing that
you had pointers to the wrong lines.

The point is that auto_increment generates UNIQUE values, and those
values should be unique for the life of the table, not pending deletes.

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

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.server ignoring my.cnf?

2001-02-26 Thread Kent Hoover

Joel:
I'll take another shot.  Do you have spaces in your command?  Remove
them.

Change : socket   =  /var/run/mysqld/mysqld.sock

To:  socket=/var/run/mysqld/mysqld.sock

Cheers,

Kent


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

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

2001-02-26 Thread c cw_1

Hi,

I'm new to MySQL database.
I downloaded MySQL database version 3.23.32 and I create a table
in the database (database name is "test_data" and
the table name is "data").

Then I download the driver MyODBC 2.50.36 for NT(full setup) and
fill out the table.

I wrote a servlet program (run on Tomcat 3.1) and try to access the database 
throught the ODBC, I got the "ClassNotFoundException"
error message.

I set the DriverName = "org.gjt.mm.mysql.Driver"
and URL = "jdbc:mysql:test"

Can someone tells me how can I fix this?
Is my procedure correct?
Can someone give me an example how to connect to the mysql database
from a servlet?

Thanks,
Cathy



Here's is the message:

java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver at 
org.apache.tomcat.loader.AdaptiveClassLoader.loadClass(AdaptiveClassLoader.java:450) 
at java.lang.ClassLoader.loadClass(ClassLoader.java:253) at 
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313) at 
java.lang.Class.forName0(Native Method) at 
java.lang.Class.forName(Class.java:120) at 
Benchmark_sql.query(Benchmark_sql.java:91) at 
Benchmark_sql.doGet(Benchmark_sql.java:47) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) 
at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:597) 
at 
org.apache.tomcat.servlets.InvokerServlet.service(InvokerServlet.java:257) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at 
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503) 
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559) at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
 
at 
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338) 
at java.lang.Thread.run(Thread.java:484)
_
Get your FREE download of MSN Explorer at http://explorer.msn.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




please urgent

2001-02-26 Thread webmaster

I have downloaded the leatest ver of php, php 4.04pl1, I am runing winnt 
4.0, acording to the info for this ver of php this ver has all the odbc 
connetciones incluided, the ver 3.0 has a library called php3_oci80.dll   
wich is used for conections to oracle 8, where can I find all the 
librarys requiered for php4 data base conections?  until now I have not 
had any lucky getting database conections  how do I stablish a dagta 
base conetiion oracle 8i, php4. is tyhere any graphical tool for 
developing forms ? what should I download to have all the files needed 
for data base conectivity? cheers 

On Mon, 26 Feb 2001, Joel Gwynn wrote:

 Date: Mon, 26 Feb 2001 15:04:19 -0500
 From: Joel Gwynn [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Re: mysql.server ignoring my.cnf?
 
 I tried /etc/my.cnf and got the same results.  As far as $DATADIR or $HOME
 are concerned, I don't see them when I do 'printenv'.  Is there another way
 to find out if those may be set, and by what?
 
 thanks.
 
 At 02:33 PM 2/26/01 -0500, Kent Hoover wrote:
 Sorry. Sent the last message before I was done
 
 If you have a stray $DATADIR/my.cnf or a $HOME/.my.cnf, their
 contents will override what you have set in /etc/my.cnf.
 
 Cheers,
 
 Kent
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 -
 Joel GwynnDesigners' CADD Company, Inc.
 A bus station is where a bus stops. 
 A train station is where a train stops. 
 So now you know why they call this a workstation... 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Database Permissions

2001-02-26 Thread Trevor Harris

Jason

There are 5 layers to access control in MySQL that are checked to see if a
query can be executed.  Starting from the most generic these layers are:

User -- Db (and Host) -- Tables_priv -- Columns_priv

The first layer that is found to have adequate privileges will cause the
query to execute.

'User' is the most generic.  It provides access checks for a user to all
Db's on this server.

'Db' allows access to specific Db's.  I can restrict access to Db's based on
'Host' (where the user is accessing the Db from) as well. You might for
example allow general access (both remote  local) to a Db, but might want
to restrict admin type access to only local users.

'Tables_priv' and 'Columns_priv' allow access to sub-sets of tables 
columns respectively.

The above order is significant. If I have 'user' access, for example, the
query is executed, without checking the subsequent layers.  So to restrict a
user to a specific database, I need to add a user with no privileges, then
add specific access to the database.

I'd also recommend using 'GRANT'  'REVOKE' instead of manipulating the
tables directly (if you can, this does require 3.22.11 or better).

So, to do what you want to do, you'd need something like:

GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypass';

This creates a user with no privileges.  If you do a SELECT on mysql.user
you should see 'N' across all the privileges. At this stage there should not
be anything in the mysql.db table specifically for this user.  If there is
it's probably left over from before.  Then...

GRANT SELECT, INSERT, UPDATE, DELETE ON database1.* TO  'myuser'@'%';

This grants specific access to the database1 for this user.  This adds an
entry to the mysql.db table.  Because this user doesn't have privileges
beyond database1, if they try to access mysql they will get an 'access
denied' error.

And don't forget to:

FLUSH PRIVILEGES;

And to

SHOW GRANTS FOR myuser;

To check everything is as you'd expect it.


HTH

Trevor


~~
Trevor Harris   NuSphere Corp.
Instructor/Consultant   14 Oak Park
Bedford, MA 01730   USA
E-mail: [EMAIL PROTECTED]http://www.nusphere.com
Tel 781-280-4243
Fax 781-280-4901
~~

-Original Message-
From: Jason Frisvold [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 3:15 PM
To: [EMAIL PROTECTED]
Subject: Database Permissions

Greetings,

I'm having a little trouble understanding how the permissions work
within mySQL.  I have 3 current databases.  The first is the default mysql
database, and the other 2 are ones that I have created.  I want to be able
to grant access to each table individually based on username.  Hostname
isn't really a big deal to me because of the firewalls.  Basically, if they
can get to the database server, then they belong there.  But, I want to
limit what they can get to via username.

So, I tried the following :

insert into user (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'myuser', password('mypass'), 'Y', 'Y', 'Y', 'Y');
insert into db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'database1', 'myuser', 'Y', 'Y', 'Y', 'Y');
insert into db (host, db, user, select_priv, insert_priv, update_priv,
delete_priv) values ('%', 'mysql', 'myuser', 'N', 'N', 'N', 'N');
flush privileges;

I *thought* this would allow access to database1, and not mysql, but
apparently I was wrong...  I can still access the mysql database, make
changes, etc. without any restrictions.

What am I doing wrong???!!!???

Also..  Is there a way to allow a user to connect to the mySQL server, not
specifying a database (this is via Perl and DBI), and get a list of
databases that they have permissions to?  (What I'd like to do is let them
list all db's except those they have no permissions on...)  I have it
working so that they can list all the databases, but it will list everything
on the server..  (This may be a moot point when I get actual permissions to
work...)

---
Jason H. Frisvold
Senior ATM Engineer
Engineering Dept.
Penteledata
CCNA Certified - CSCO10151622
[EMAIL PROTECTED]
---
"We should take care not to make the intellect our god; it has, of course,
powerful muscles, but no personality." - Albert Einstein (1879-1955)


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

To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
[EMAIL PROTECTED]
Trouble unsubscribing? Try: 

Help with a seg fault

2001-02-26 Thread Boulat Khakimov

bash-2.04# ./mysql.server stop
Killing mysqld with pid 11564
010226 15:59:55  mysqld ended

bash-2.04# ./mysql.server start
bash-2.04# Starting mysqld daemon with databases from
/usr/local/mysql/var
/usr/local/mysql/bin/safe_mysqld: line 254: 11600 Segmentation
fault  $NOHUP_NICENESS $ledir/$MYSQLD $defaults
--basedir=$MY_BASEDIR_VERSION --datadir=$DATADIR $USER_OPTION
--pid-file=$pid_file --skip-locking $err_log 21
010226 15:59:58  mysqld ended

Any ideas what could be causing this???

Im running:
MySQL version: 3.23.32
Linux  version 2.2.18  egcs-1.1.2 release


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

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




RE: auto_increment

2001-02-26 Thread Cal Evans

Just curious, is there a specific business rule that requires you to have a
contiguous list or do you just not like holes in the list?

Cal
http://www.calevans.com


-Original Message-
From: John Tsangaris [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 7:12 PM
To: Atle Veka; John Tsangaris
Cc: [EMAIL PROTECTED]
Subject: RE: auto_increment


I'm using 3.22.23 :/

I think I may have to implement my own auto_increment to capture deleted
id's.

Thanx.


John

-Original Message-
From: Atle Veka [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 1:53 PM
To: John Tsangaris
Cc: [EMAIL PROTECTED]
Subject: Re: auto_increment




what version of mysql are you using? AFAIK, this behavior is only
supported in 3.23.x


Atle

On Mon, 26 Feb 2001, John Tsangaris wrote:

 If I turn on auto increment and let it do it's thing and then later on
 delete a few of the entries (let's say 1, 2, 3) and the current high entry
 has an id of 45.. why does mysql continue with 46 instead of using up 1,
2,
 and 3 first?  Is there a way to bypass this?


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

2001-02-26 Thread John Tsangaris

I'm converting a product over to mysql from flat file.  The guru of the
perl/flat file asked about it (he's my senior) so I had to check into it
because the flat-file system reused deleted numbers.  If it's not worth the
work to change it then I tell him it's not worth the work to change it. :)
Just checking my options.


John

-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 2:35 PM
To: John Tsangaris; Atle Veka
Cc: [EMAIL PROTECTED]
Subject: RE: auto_increment


Just curious, is there a specific business rule that requires you to have a
contiguous list or do you just not like holes in the list?

Cal
http://www.calevans.com


-Original Message-
From: John Tsangaris [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 7:12 PM
To: Atle Veka; John Tsangaris
Cc: [EMAIL PROTECTED]
Subject: RE: auto_increment


I'm using 3.22.23 :/

I think I may have to implement my own auto_increment to capture deleted
id's.

Thanx.


John

-Original Message-
From: Atle Veka [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 1:53 PM
To: John Tsangaris
Cc: [EMAIL PROTECTED]
Subject: Re: auto_increment




what version of mysql are you using? AFAIK, this behavior is only
supported in 3.23.x


Atle

On Mon, 26 Feb 2001, John Tsangaris wrote:

 If I turn on auto increment and let it do it's thing and then later on
 delete a few of the entries (let's say 1, 2, 3) and the current high entry
 has an id of 45.. why does mysql continue with 46 instead of using up 1,
2,
 and 3 first?  Is there a way to bypass this?


 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




  1   2   >