Re: Questions about HEAP tables

2003-03-07 Thread KH Chiu
As you write your code in somewhat pseduo code format, I can't comment on the 
exact syntax. You may use PERL-DBI-DBD:MySQL to implement your code. However, 
it may some problems with your logic. First of all, if the quote_for_family 
table already exist, the create table sql do nothing and it definitely not 
something you wanted. You may use INSERT instead of CREATE in this case. You 
may experiment with other logic. If you want further help, you may email me 
your actual code.

For temporary and heap, they are two different table attributes but often use 
together. Temporary means the table will automatically drop after the 
connection close and will not appear in other connections. Heap means to 
create table in server's memory. So, they may use together to make high 
access speed temporary table.

Of course, heap table will eat your server RAM.

Best regards,


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.com


 Hi All,
 
 After googling around and checking out the archives I still haven't found
 the exact answer to my following question:
 
 First off the goal is to give a family multiple quotes from different
 companies for insurance based on several factors: age, length of coverage
 and coverage limits. All the different rates for different companies 
 will be in a rate table that I will have to query to get the correct 
 premium per person and then group the resulting recordset by company 
 and sum the premium. So I figure I have to do something like:
 
 for each member in $number_of_family_members
 
 CREATE TABLE IF NOT EXISTS quote_for_family TYPE=HEAP
 SELECT * FROM rates WHERE
 age =minimum_age AND
 age =maximum_age AND
 limit =minimum_limit AND
 limit =maximum_limit AND
 length_days  maximum_days
 
 next member
 
 SELECT company_name, sum(rate), plan_name FROM quote_for_family 
 GROUP BY company_name
 
 DROP TABLE quote_for_family
 
 And if all is well I have a list of all the different companies' 
 plans with a the premium totaled for all family members.
 
 What makes this a little more interesting is that I want to do it 
 from a Perl script - from want I've seen this looks possible. What 
 I'm wondering is:
 
 Does this look like the right way to tackle the problem?
 
 Should I use a HEAP table or TEMPORARY table to do this? Its going 
 to be on a webserver with hopefully some steady traffic so 
 performance is a concern.
 
 Any help is greatly appreciated,
 
 Justin
 
 -
 Before posting, please check:
http://www.mysql.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-
[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: Using ssh tunnel and mysql

2003-03-07 Thread KH Chiu
What does it really matter is whether you have create mySQL user that allow 
access the database from the SSH server.

Please note that localhost, 127.0.0.1 or the machine ip address will be 
treated as different entries by mySQL.

--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.com


 On Fri, Mar 07, 2003 at 05:37:38PM -0800, LZ Orders wrote:
  Hi. I wanted to connect from a client machine to a MySQL server using 
  ssh. I execute the following on the local machine (the server is 
  foo.bar.com):
  
  % ssh -n -N -L 3307:foo.bar.com:3306 foo.bar.com
  
  I then try to connect from the local machine with:
  
  % mysql -h localhost -p 3307 --user=me --password
  
  But after prompting me for my password, MySQL denies me access.
 
 What if you use 127.0.0.1 instead of localhost?
 
 Jeremy
 -- 
 Jeremy D. Zawodny |  Perl, Web, MySQL, Linux Magazine, Yahoo!
 [EMAIL PROTECTED]  |  http://jeremy.zawodny.com/
 
 MySQL 4.0.8: up 32 days, processed 1,006,604,456 queries (357/sec. 
 avg)
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[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: Temporary Tables

2003-03-04 Thread KH Chiu
Paul is right. I would like to add a small remark, it should better to drop 
the temp. tables before closing your script. This can free up resources. I 
had a painful experience that I had created hash temp. tables without 
dropping them. This lead to memory leak.

Regards,


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.com

 At 23:19 + 3/4/03, Mamatha Balasubramanian wrote:
 Thank you once again.
 
 I have a web-interface that does search on a given text and I would 
 have a script that creates a temporary table. So according to you, 
 in my script, I just to need
 create a temporary table and not have to worry about another client 
 using the same web interface (and thereby using the same program). 
 Can you please elaborate a little more on this?
 
 Sure.
 
 You are incorrect. :-)
 
 That is, you're making an assumption that cannot necessarily be made.
 If you can guarantee that the web script will establish a new 
 connection, and the connection will terminate when the script ends,
  you can indeed do what you describe above.
 
 But you *cannot* do that if you're running your script in an environment
 that uses persistent connections that may be used by successive instances
 of the script.  PHP persistent connections fall into this class, for
 example.  Several requests might be served by the same instance of 
 the web server process, and you don't know that one request won't be 
 getting the connection used by a previous request.  In that case,
  the connection won't have closed, and the TEMPORARY table won't 
 have disappeared.
 
 You can guard against this by issuing this query before creating the
 TEMPORARY table:
 
 DROP TABLE IF EXISTS tbl_name
 
 
 Thanks,
 Mamatha
 
 
 
 
 
 From: Paul DuBois [EMAIL PROTECTED]
 To: Mamatha Balasubramanian 
 [EMAIL PROTECTED],[EMAIL PROTECTED]
 Subject: Re: Temporary Tables
 Date: Tue, 4 Mar 2003 17:06:30 -0600
 
 At 23:00 + 3/4/03, Mamatha Balasubramanian wrote:
 Hi,
 I would like to know how MySQL handles multiple temporary tables?
 
 1. Can multiple temporary tables be created at the same time?
 2. If so, how does MySQL differentiate them - do we need to 
 explicitly give them different names inorder to identify them or 
 does MySQL provide a timestamp (or use some other means) to 
 identify the tables?
 
 You can create multiple temporary tables, but they must have different
 names.
 
 A TEMPORARY table can have the same name as a non-TEMPORARY table.
 The non-TEMPORARY table is hidden to the client that creates the
 TEMPORARY table as long as the TEMPORARY table exists.
 A second TEMPORARY table with the same name cannot be created.
 
 This is on a connection-specific basis.  Two clients each can create
 a TEMPORARY table with the same name.  Only the table created by a given
 client is visible to that client.
 
 
 I use MySQL 4.0.7 on Red Hat.
 
 Thanks,
 Mamatha
 
 -
 Before posting, please check:
http://www.mysql.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-
[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 encripted password from perl

2003-02-28 Thread KH Chiu
change 

$sql .=  VALUES(?, ?);

into

$sql .=  VALUES(?, password(?));

Please note that password is a mySQL function and not a PERL function. So, 
you need to use the password function again in verify the password.

Regards,

KH

 I have perl code like
my $username = $query-param(username);
my $password1 = $query-param(password1);
my $sql= INSERT INTO apidbusers ;
   $sql .=  VALUES(?, ?);
 
 $sth-execute($username, $password1);
In this way, password1 will be in mysql table as plain text. 
 how can i let it appear in mysql table as encripted?
 
 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 mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

$sql .=  VALUES(?, ?);


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

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



Re: phpMyadmin

2003-02-26 Thread KH Chiu
Are you using a RedHat system. In RedHat system does not install php mysql 
support by default.

You may install php-mysql rpm from redhat distribution disks.

Regards,


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.com



 I have downloaded phpmyadmin, and installed, well not really, I placed
 it under /var/www/html, and decompressed therr, it generated its own
 directory, and so, well I am getting an error msg:
 
 cannot load MySQL extension,
 please check PHP Configuration.
 
 when I check the docs I get this solution
 
 To connect to a MySQL server, PHP needs a set of MySQL functions called
 MySQL extension. This extension may be part of the PHP server
 
 (compiled-in), otherwise it needs to be loaded dynamically. Its name 
 is probably mysql.so or mysql.dll. phpMyAdmin tried to load the extension
 but failed.
 
 Usually, the problem is solved by installing a software package 
 called PHP-MySQL or something similar.
 
 so from where can I download this PHP-MySQL? or where can I get
 mysql.so? and how do I tell php to load it? thanks in advance.
 
 another qquestin and please for give me in advance, but this is
 something I .. well which is mysql adminniistrative uuser? is it mysql?
 I am running linnux rethat 8, and installed mysql from the disctibution
 cd rom. I ask this because in thee installation instructions for
 phpmyadmin says that I have to type the root myslq user name and 
 mysql host is mysql host localhost? thanks in advance.



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

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



re: phpMyadmin

2003-02-25 Thread KH Chiu
phpMyAdmin can admin. database that is not on the same machine. The only 
requirement is that machine can access the MySQL database to be admin. Which 
usually means that a user name and a ip address on the MySQL user table.

However, I don't think that it is appropiate to have a notebook to install a 
phpMyAdmin and admin. a remote database. First of all, the notebook should 
have a web server installed. Secondly, there may be a security loop holes to 
have a remote user for a MySQL database. Esp., if the notebook used for the 
programmer on the move.

He may just access the phpMyAdmin on the host by IE. If further security is 
required (esp. on the move), you may consider to have SSL installed. You may 
also consider some secure shell such as ssh which can also provide secure 
connection.

Regards,

--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.com
 
 Using PhpMyAdmin for administering MySQL, can this product be 
 installed on a remote system?  We currently have it installed on the 
 same server as MySQL, but now the programmer wants it on his Laptop. 
 Or is there another product that can manage a MySQL database from 
 either a Windows or Linux laptop/desktop.
 
 Thanks
 
 Jon L. Miller, MCNE, CNS
 Director/Sr Systems Consultant
 MMT Networks Pty Ltd
 http://www.mmtnetworks.com.au
 
 I don't know the key to success, but the key to failure
  is trying to please everybody. -Bill Cosby
 
 -
 Before posting, please check:
http://www.mysql.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-
[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: Strange BUG? with a working table

2003-02-24 Thread KH Chiu
It seems that you have reached the 2G file limit with many Linux system. I 
am not familiar with SuSe. As I know, you may try to use raid option. You 
may refer to MySQL doc. on 'create' for details.

KH 

 Dear Ladies and Sirs,
 
 I have a problem to create a tables duplicate with:
 
 CREATE TABLE new_1 SELECT * FROM output_1;
 
 The table output_1 has this structure:
 Field TypeNullKey
 af_1  int(11) YES MUL 
 af_3  varchar(255)YES 
 af_2  varchar(255)YES 
 af_23 varchar(255)YES 
 af_10 varchar(255)YES 
 af_11 varchar(255)YES 
 af_10001  varchar(255)YES 
 af_16 varchar(255)YES 
 af_9  varchar(255)YES 
 af_8  varchar(255)YES 
 af_30 varchar(255)YES 
 af_24 varchar(255)YES 
 af_52 varchar(255)YES 
 af_300varchar(255)YES 
 af_53 varchar(255)YES 
 af_54 varchar(255)YES 
 af_18 varchar(255)YES 
 af_5  varchar(255)YES 
 af_25 varchar(255)YES 
 af_26 varchar(255)YES 
 af_27 varchar(255)YES 
 af_28 varchar(255)YES 
 af_55 varchar(255)YES 
 af_56 varchar(255)YES 
 af_57 varchar(255)YES 
 af_58 varchar(255)YES 
 dub_flag  int(11) YES MUL 
 dub_kopf  int(11) YES 
 dub_purge int(11) YES
 
 Type = myisam
 MySQL = 3.23-41-log
 OS = SUSE 7.3 Kernel 2.4.10
 FS = Reiser   
 
 This table has about 2,5 million rows and it's file-size 530543 K.
 When i tried the above statement i got error 27 when the new table 
 reached a size of more then 200 K !
 I exported the file to csv and everything seemed fine.
 I imported again into a new table via LOAD DATA INFILE ... and the 
 same error occured.
 
 Is there anyone that has a clue, why this table is changing size 
 with this. Could it be that there is a 'forbidden' character inside 
 the data ?
 
 I now try to manage with dump-file but I'd like to know how I can 
 fix the problem itself, because if I join this table with another, 
 the same strange behaviour occurs. CHECK TABLE (extended) said the 
 output_1-Table is OK.
 
 please help
 
 Klaus 
 
 Topaktuelle Consumer-Adressen anmieten www.consumeradressen.de 
 
 Diese Mail ist von:
 Deutsche Post Direkt GmbH
 Beleglese Center Mannheim
 
 Klaus Franz   
 Manager Abgleichsysteme   
 
 Willy-Brandt-Platz 13 Tel. 06 21.129 56 436
 68161 Mannheim
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Strange BUG? with a working table

2003-02-24 Thread KH Chiu
Compare tables with :
=show create table t1;
=show create table t2; Check table type.

Or use dump command from shell:
shellmysqldump -pPassword --user=username db_name t1  t1.sql
mysqlrename table t1 to t2;
shellmysql -pPassword --user=username t1.sql  db_name

Or try to set MIN_ROWS = 2,5 million.



 Dear Ladies and Sirs,
 
 I have a problem to create a tables duplicate with:
 
 CREATE TABLE new_1 SELECT * FROM output_1;
 
 The table output_1 has this structure:
 Field TypeNullKey
 af_1  int(11) YES MUL 
 af_3  varchar(255)YES 
 af_2  varchar(255)YES 
 af_23 varchar(255)YES 
 af_10 varchar(255)YES 
 af_11 varchar(255)YES 
 af_10001  varchar(255)YES 
 af_16 varchar(255)YES 
 af_9  varchar(255)YES 
 af_8  varchar(255)YES 
 af_30 varchar(255)YES 
 af_24 varchar(255)YES 
 af_52 varchar(255)YES 
 af_300varchar(255)YES 
 af_53 varchar(255)YES 
 af_54 varchar(255)YES 
 af_18 varchar(255)YES 
 af_5  varchar(255)YES 
 af_25 varchar(255)YES 
 af_26 varchar(255)YES 
 af_27 varchar(255)YES 
 af_28 varchar(255)YES 
 af_55 varchar(255)YES 
 af_56 varchar(255)YES 
 af_57 varchar(255)YES 
 af_58 varchar(255)YES 
 dub_flag  int(11) YES MUL 
 dub_kopf  int(11) YES 
 dub_purge int(11) YES
 
 Type = myisam
 MySQL = 3.23-41-log
 OS = SUSE 7.3 Kernel 2.4.10
 FS = Reiser   
 
 This table has about 2,5 million rows and it's file-size 530543 K.
 When i tried the above statement i got error 27 when the new table 
 reached a size of more then 200 K !
 I exported the file to csv and everything seemed fine.
 I imported again into a new table via LOAD DATA INFILE ... and the 
 same error occured.
 
 Is there anyone that has a clue, why this table is changing size 
 with this. Could it be that there is a 'forbidden' character inside 
 the data ?
 
 I now try to manage with dump-file but I'd like to know how I can 
 fix the problem itself, because if I join this table with another, 
 the same strange behaviour occurs. CHECK TABLE (extended) said the 
 output_1-Table is OK.
 
 please help
 
 Klaus 
 
 Topaktuelle Consumer-Adressen anmieten www.consumeradressen.de 
 
 Diese Mail ist von:
 Deutsche Post Direkt GmbH
 Beleglese Center Mannheim
 
 Klaus Franz   
 Manager Abgleichsysteme   
 
 Willy-Brandt-Platz 13 Tel. 06 21.129 56 436
 68161 Mannheim
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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 on windows

2003-02-24 Thread KH Chiu
In my experience, Perl + DBD-mysql will be the most easy tool for UNIXer 
(Linuxer). Especially, if you plan to write some non-GUI based system service 
program.

Best regards,

KH
 Depends on what you are experienced with on win platform I would of thought.
 
 Something like vB or Delphi is very quick and easy to use.
 
 Jerry
 
 - Original Message -
 From: Simon Windsor [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, February 24, 2003 12:28 PM
 Subject: MySQL on windows
 
  -BEGIN PGP SIGNED MESSAGE-
  Hash: SHA1
 
  Hi
 
  I am used to using/accessing MySQL on Unix, but I have to write a small
 client
  application on Windows, to record and log activity to a remote MySQL
  database.
 
  The options that I have appear to be
 
  - - Perl + DBI+DBD-ODBC
  - - Perl + DBI+DBD-mysql
  - - Visual C++ + ODBC
  - - Visual C++ + MySQL++
 
  can anyone advice me on the best to use, for stability, and no memory
 leaks
  etc.
 
  Many thanks
 
  Simon
  - --
  Simon Windsor
  Email: [EMAIL PROTECTED]
  Tel: 01454 617689
  Mob: 07720 447385
  -BEGIN PGP SIGNATURE-
  Version: GnuPG v1.0.7 (GNU/Linux)
 
  iD8DBQE+Wg/bSJvgVrMNWjYRAkNvAJ0VKk1D0t7EOEigG3FssqK1ahEz3wCdEvXd
  H7oZniZ/Ay5Yyk/jPMbAhUE=
  =rOZS
  -END PGP SIGNATURE-
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: inquiry

2003-02-23 Thread KH Chiu
Your problems are really very common when switching from MS to Linux. Don't 
worry, as your experience with Linux grow all these problem will gone.

First of all, MySQL database work in a Client/Server fashion. It means that 
you need to get the server up and running. To doing that, you can type the 
following command 

/etc/init.d/mysqld restart

Don't panic if you see 'fail' for stopping the mysql service. It just tell 
you that mysqld not already started.

You may also use the command 'setup' - Services to make mysqld auto. start 
when linux start.


After that you can use the 'mysql' command to connect to the database. For a 
new setup you may use

mysql -u root

You may refer to the manual after these steps.

Best regards,

KH

 I have installed mysql form the rpm files that are on rpm finder,
  acording to the installation it is working, and if I check with 
 redhat-config-services it is running, how do I get mysql on the path 
 so I can call mysql from any where? btw after checking my pc well I 
 am too new to linux so sorry if the question is not relevant but 
 where is mysql executable file? I know the server is running but 
 just beause I see it running on redhat-config-services but I do not 
 know where are the files.. acording to mysql manual there is a test 
 database.. where? cheers
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Speed improvement with packet proceeding!?

2003-02-23 Thread KH Chiu
I know very LITTLE about the internal working of MySQL. So, I am not the 
right people to comment it. However, from my experience MySQL is quite 
optimized for some operation but not for all.

I think Julian actual suggested a very good idea on the searching 
optimization for single user. At present, I don't have time to have a 
serious examination on all their implications (esp. on multi-user cases 
which is the actual working environment of MySQL).

May Julian tell me more about your suggestions' implications on multi-user 
environment? For example, 2 or more processes updating the same table at the 
same time.

Best regards,

KH

 On 23-Feb-2003 Julian wrote:
  Speed improvement with packet proceeding!?
  
  1. Packet proceeding:
  
   I'm not quite sure is it possible with Mysql but it could be easy to 
  be implemented.
  For example:
  
  select * from table where id=52 and name='some'
  select * from table where id=23 and email='[EMAIL PROTECTED]'
  
  these two queries select row(s) from table 'table' which means that 
  these two queries could be tested simultaneously, so database file will 
  be proceed only once. 
 
 What about the case where one (or both) selects fail?
 
 And how would the application tell that there were multiple 
 rows where id=23 and email='[EMAIL PROTECTED]' ?
 
 If you *know* that these two rows exist and unique then:
 
 SELECT a.*,b.* from table as a, table as b
   WHERE a.id=52 and a.name='some' AND
   b.id=23 and b.email='[EMAIL PROTECTED]'
 
 would do the same thing.
 
 snipage
 
  
  In fact I'm not talking only about 'select'-s but any tables 
  examination/traverse (i.e where clauses etc..), so queries like these 
  could be also speed up:
  
  update table set data='test' where name='some'
  select * from table where id=10
  
 
 What would be the sensible error message if your update failed 
 but your select succeeds ?
 
 What would be the expected value of mysql_numrows() ?
 
 And what if there are multiple rows where id=10 ?
 
 snipage
 
  2. Bulk update/delete etc..
  
  Take a look at this update query (not implemented.. yet!)
  update table1 set column=value,... where clause limit #, update table2 
  set 
  (or delete from table1 where clause limit rows, delete from table2 where 
  clause...)
  
 
 The same question: How would a program tell which statement failed?
 
 snip again
 
  Have I a good point here? Any ideas and discussion about these 
  suggestions?
 
 You'll need to rethink the failure modes.
 What you're suggesting might be useful in certain special case(s)
 but badly fails the general case.
 
 Regards,
 -- 
 Don Read   [EMAIL PROTECTED]
 -- It's always darkest before the dawn. So if you are going to 
steal the neighbor's newspaper, that's the time to do it.
 (53kr33t w0rdz: sql table query)
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Is SQL right for me?

2003-02-20 Thread KH Chiu
It is really a good question. I don't think MySQL alone will suit your need. 
As far as I know, most people (including me) will use programming languages 
like PHP, C, Perl, VB etc. to access MySQL database. If you are not planning 
to learn a programming language, you cannot do much with MySQL.

The good news is you can use some other tools to work with MySQL. I am using 
phpMyAdmin as my frontend tools. There is a lot of other tools available.

In a more general sense, SQL is designed for computer novice to manipulate 
database. Unluckily, this objective is never achieved. So, SQL is some what 
restricted to programmer or at least tech. people.

Regards,

KH

 So what is the actual question ?
 
 If you don't have the software, surely you should get it and read 
 the manual if that is the best way you learn !
 
 Jerry
 
 - Original Message -
 From: Marijka Walker [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, February 20, 2003 6:01 AM
 Subject: Is SQL right for me?
 
  I'm need to create a database for the first time in 10 years and the
 wizard
  aspect of Access 2002 doesn't work for me - it's too much help and 
slows
  me down! I'm used to creating databases and reports almost from scratch
 with
  dBase IV and Paradox, and easily learn software by reading manuals, so is
  SQL the answer? Please note that I am strictly pc-based and have never
  programmed beyond batch files in DOS.
 
  Since I don't have the software, I didn't join the list, so please mail
  answers to [EMAIL PROTECTED] Thanks in advance for your advice!
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Web interface

2003-02-20 Thread KH Chiu
I am using phpMyAdmin. But it is written in php.

Regards,

KH

 Hi all!
 
 I started using MySQL about two months ago (and I already love it!)
  and I'm new to this list...
 
 I would like to know if there's some web interface for MySQL 
 management that has been released as open source. Preferably this 
 should be in ASP 3.0 or ASP .NET languages, but I'll appreciate to 
 know any other language available.
 
 Thank to everyone who'll spent time to send me a fee-back.
 
 Regards,
 Michele
 http://www.devspy.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 mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: What is needed for ODBC?

2003-02-20 Thread KH Chiu
All you need to do is set up a MySQL user that allow the Windows box to 
access the MySQL database. 

Regards,

KH

 Hello,
 
 I hope it is okay to ask this here. I have a MySQL server running on
 Slackware 8, and I would like to access it from a Windows box using Excel
 (for now). I'm downloading the ODBC driver for windows, but is there
 anything I need to do on the MySQL server side? I'm a bit confused about
 that.
 
 Thanks in advance!
 
   Bryan
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Is this a bug?

2003-02-20 Thread KH Chiu
This is really not a bug. It is only a feature. Besides trimming of trailing 
spaces, MySQL also perform case-insensitive match. ie. SELECT 'abc' = 'ABC'; 
will return true.

In order to turn off this feature, you should add the keyword 'binary'. 

Examples:

SELECT binary 'abc' = 'ABC'; will return false.
SELECT binary 'abc' = 'abc '; will also return false.

Best regards,

KH
 

 In the last episode (Feb 21), Zhestkov Victor said:
  I have a table with varchar column and when I execute SELECT query like 
that:
  SELECT * FROM sometable WHERE somecolumn='abc   '; it returns records 
which 
  contain records with bo 'abc  ' value, and which are only 'abc'.
  Thry this SELECT 'abc' = 'abc   '; it returns true. I think it rather 
strange.
  I have mysql installed from Debian 3.0 r0.
 
 From the docs:
 
* All string columns, except `BLOB' and `TEXT' columns, automatically
  have all trailing spaces removed when retrieved. For `CHAR' 
 types this is okay, and may be regarded as a feature according 
 to ANSI SQL92. The bug is that in MySQL Server, `VARCHAR' 
 columns are treated the same way.
 
 It's mentioned in 3 other places as well.
 
 -- 
   Dan Nelson
   [EMAIL PROTECTED]
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Archive on remote Machine.

2003-02-19 Thread KH Chiu
It will then be a networking problem. As far as I know, you may need a 
networking file system like NFS or Samba. You should mount your remote 
machine as a network drive. Then you can use mysqldump to make a backup but 
redirect the output to the network drive.

There may be other methods. In fact, I have a project that has more complex 
remote backup requirement. I am working on it using C right now but not yet 
completed.

Regards,

 Thanx for the suggestion.
 Is there any way i can Archive data to remote machine where MySQL is
 not installed.
  
 Anis
  
 
  KH Chiu [EMAIL PROTECTED] Wednesday, February 19, 2003
 8:46:46 AM 
 You may try the following command
 
 mysqldump -u your user name -p password samp_db | mysql -h your
 remote 
 host name or address samp_db -u your user name -p your password
 
 Please also note that samp_db must be exist on your remote machine. Of
 
 course, you should sub. samp_db with your to be achieve database name.
 
 Regards,
 
  Hi,
  I use  Select * into outfile  filepath  from table  to archive the
  database.
  Is there any way to archive this into a different machine. (Not
 current
  machine)
  
  Yes Mapping to new machine and then giving path is an option. Any
 other
  opton.?
  Anis 
  
 
 -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
  
  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 mysql-unsubscribe-
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try:
 http://lists.mysql.com/php/unsubscribe.php 
 
 --
 Yours,
 KH Chiu
 CA Computer Consultants Ltd.
 Tel: 3104 2070 Fax: 3010 0896
 Email: [EMAIL PROTECTED] 
 Website: www.caconsultant.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


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Question about auto-increment columns

2003-02-19 Thread KH Chiu
I think you have no need to worry overflow if you use int type. You may have 
added assurance if you also define it as unsigned. I just listed the max. of 
different unsigned integer type for your reference 

tinyint 255
smallint 65535
mediumint 16777215
int 4294967295
bigint 18446744073709551615

Clearly int type will be sufficient for most practical use.

Regards,

 Hello.
   
   I'm very new to MySQL (and SQL databases at large), so please 
 apologize if I'm just missing an obvious point, or if it has already 
 been discussed before.
 
   As I understand, auto-incremental columns (quite useful for primary
 indexes) are always incremented. Even if rows are deleted, those counters
 always keep growing.
 
   But a frightening thing is this snippet of the documentation :
   
 The behavior of the auto-increment mechanism is not defined if a 
 user gives a negative value to the column or if the value becomes 
 bigger than the maximum integer that can be stored in the specified 
 integer type. 
  
   The former part is obvious, but the later is not.
   
   Does it mean that MySQL databases will definitely stop working at 
 a random date (when an auto-incremental column will overflow) ?
 
   How to cope with this ? Or to detect when an overflow will occur 
 (do we need to always BEGIN; SELECT MAX(id) ... ; then only INSERT 
 and COMMIT if the result is lower than the max value the type can 
 handle) ?
 
   Or is there a way to recompute all primary keys (and sync foreign 
 keys) by filling unused gaps ?
 
   Best regards,
   
 -Frank.
   
 -- 
  __  /*-  Frank DENIS (Jedi/Sector One) [EMAIL PROTECTED] -
 *\  __ \ '/a href=http://www.PureFTPd.Org/; Secure FTP Server 
 /a\' /  \/  a href=http://www.Jedi.Claranet.Fr/; Misc. free 
 software /a  \/
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Sequential read on a file

2003-02-19 Thread KH Chiu
You are right. read previous simply not exist. I think this is due to both 
historical reason and 'client/server model'.

In fact, 'read next' is available by reading next row in a query. However, 
the record cursor is one direction only and cannot be read back.

In my experience, I will store the row id of the previous record and perform 
another sql query if a back operation is required.

Regards, 

 Hi,
 Newbie here so please bear with me.
 I am running  MySQL 3.23.22 with PHP4.01 on WinNT client / Linux 
 host, everything is working okay and I'm just getting to grips with 
 some basic database handling. Although I can use mysql_query to get 
 a list of records using Select * from `mydata` - for what we are 
 looknig at, we also need a basic Next/Prev stepping capability on a 
 record per record basis. I realise this can be done just grabbing 
 all records and then moving through the rows, but we are also 
 looknig at picking up each record individually. I have had some 
 success using count(*) to get the last record, then stepping 
 through with limit $x,1 in the select, where $x is decremented / 
 incremented based on which button is pressed. I cannot seem to find 
 any simply read next or read previous type command though. Is 
 the way I am going about it right or is there a more 
 simple/logical method? My main concern is that, with the key being 
 auto-increment, as records are added and removed from the database,
  as simple +1/-1 may fall over. -Colin
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: License question

2003-02-19 Thread KH Chiu
As far as I know, if you only require MySQL as an option or just an added 
features, your company do not need to purchase a license.

KH

  Otherwise, you may ask whether MySQL is an option or
  not. It means that if 
  your logs and related information can go to other
  mean such as a text file 
  then you are no need to buy license.
 
 In theory we can find option for any db appliance,
 let say, we can store data in regular files. 
 
  
  However, if your program can't run without MySQL
  database, I think license 
  will be required.
 
 I can for example, use PostgreSQL, but main key for me
 is to have multiplatform database. 
 
 __
 Do You Yahoo!?
 Everything you'll ever need on one web page
 from News and Sport to Email and Music Charts
 http://uk.my.yahoo.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.com


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

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




Re: sql join help?

2003-02-19 Thread KH Chiu
Multiple table update is only supported from 4.04 or above. If you are using 
3.x, I think you should put the result into another table, delete MSI_List 
and rename the table to MSI_List.

I would also very interested to know whether there exist a more elegant 
solution for 3.x.

Best regards,

 sql
 
 I have a zip code db named MSI_Zipcodes that contains
 
 city
 state
 zipcode (index)
 
 I also have a db named MSI_List that contains
 
 ID (index)
 email
 city(empty)
 state(empty)
 zip
 
 My problem is:
 
 How can i bring the proper info from MSI_Zipcodes(city and state)
 and enter it (city and state) into the empty fields of MSI_List in 
 accordance with the zip code in MSI_List?
 
 Thanks in advance!
 
 Todd Clemmer
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Lost connection to MySQL server during query

2003-02-19 Thread KH Chiu
Assume the ip address of your remote machine is 192.168.0.88

You should perform a

nslookup 192.168.0.88

on your LOCAL machine that hold the mysqld

If it cannot resolve into a symbolic name then you will get into trouble.

Add an entry to /etc/hosts or your DNS will solve the problem.

Regards,

 Hi All
 I just installed a RedHat Linux 8.0 box with
 mysql-server-3.23.52-3
 mysql-3.23.52-3
 mysql-devel-3.23.52-3
 
 Changed the password for root using mysqladmin
 logged in using a mysql client (locally)
 and
 mysql GRANT ALL ON *.* TO araheja@'%' IDENTIFIED BY 'amanraheja';
 
 I DID THE SAME STEPS ON ANOTHER BOX WITH Linux Slackware box with mysql
 3.23.39
 
 When I try to login using a remote client in both the servers, 
 Slackware box allows me but RedHat BOX gives me the following error
 
 Lost connection to MySQL server during query
 
 I also downloaded and installed
 mysql-server-3.23.54a-1
 mysql-3.23.54a-1
 mysql-devel-3.23.54a-1
 
 Still the same problem.
 Any suggestions?
 
 Thank you in advance
 Regards
 
 --
 Aman Raheja
 AGF Inc.
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Joining multiple tables results not complete

2003-02-19 Thread KH Chiu
You should use LEFT JOIN.

Regards,

 I am perplexed trying to retrieve all the rows I need in the query 
 I'm doing.
 
 I have a table with keeping track of people using ID numbers as the primary
 key and another table with coupon numbers and a reference to the 
 first table.  But not all the second table is going to have 
 correlating matches to the first table.  So, in other words not all 
 people have a coupon number entered into the database.
 
 I run the query:
 
 SELECT table1.id, table2.coupon FROM table1, table2 WHERE
 table1.id=table2.person_id;
 
 I expect back a report of the 213 rows in table1 and their matching 
 coupon # if they have one.  Instead, I get 174 rows and THEIR 
 matching coupons but no results from the others.  I want to write a 
 query that will return the id's from table1 and the table2 coupon 
 regardless of whether the table2.person_id matches table1.id.
 
 How do I do this?
 
 Thanks,
 Dean
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Is this query possible...

2003-02-19 Thread KH Chiu
Yes. You can use INSERT INTO table select from ..

Regards,

 All, 
 
 Is this query possible to do:
 
 I am going to select an id from a table
 
 SELECT order_id FROM orders WHERE order_start = 1324
 
 I will then use the order_id from this query and insert it as well as
 some others values I have into another table.
 
 So in summary, I want to perform a SELECT and INSERT in the same
 database query.
 
 Can I do it?
 
 If this matters, I will be doing this in 2 different applications. 1
 database is MySQL, and the other is MS Access.
 
 -jonathan
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: How to determine foreign keys? Meta data?

2003-02-19 Thread KH Chiu
Dear Jeff,

There are many ways to lookup MySQL metadata. I was used to familiar with 
them. Unluckily, I am 'spoiled' by phpMyAdmin recently.

I strongly recommend you to have a try with phpMyAdmin.

Regards, 

 Hello all.  
 
 I've only been using MySQL for a few days, but I'm experienced with
 Oracle.  So consider this a sort-of-newbie question.
 
 Is there any way to determine what foreign keys exist on a table?  I
 have tried myisamchk, describe, show index, show create 
 table, all to no avail.
 
 Is there complete access to the meta-data?
 
 (I'm using version 3.23.55, by the way.)
 
 Thanks!  :'  )
 
 =
 :'  )
 Jeff Epstein
 [EMAIL PROTECTED]
 http://www.jeffyjeffy.com
 
 ..
 
 __
 Do you Yahoo!?
 Yahoo! Shopping - Send Flowers for Valentine's Day
 http://shopping.yahoo.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: varchar and java string in sql query ?

2003-02-19 Thread KH Chiu
Hi,

I am not fimilar with jdbc. But as a general prinple, you should quote your 
string expl. and it is nearly a must for all language to handle SQL query. 
May be you should try str='id' instead of str=id. In some language, you 
must use str = \'id\'. 

Please check jdbc docs.

Regards,

 I and using mysql-jdbc to do some program.
 
 I can insert record to my db by following code:
 
 -
 stmt.executeUpdate(insert into apidbusers values('id',
 'jp','zhu','em1','jian180'));
 ---
 but
 if i use 
 --
 String str=id;
 stmt.executeUpdate(insert into apidbusers values(str, 'jp',
 'zhu','em1','jtan180'));
 -
 it fails.
 why? how can i use java java string to insert a record?
 
 Thanks 
 
 
 Jianping Zhu
 Department of Computer Science
 Univerity of Georgia 
 Athens, GA 30602
 Tel 706 5423900
 
 
 -
 Before posting, please check:
http://www.mysql.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-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Oh GAWD somone HELP :)

2003-02-18 Thread KH Chiu
Sorry! I have made a mistake. Are you sure the host you connected from can 
be reservely lookup on 192.168.0.2? This is really important and have 
brother me for a period of time.

Regards,

 Well thats the thing,
 
 I did an more than one user that was allowed to connect TO 
 192.168.0.2 from various hosts on my network and all hosts can 
 reverse lookup from my dns server.
 
 no good
 - Original Message -
 From: KH Chiu [EMAIL PROTECTED]
 To: Poodle [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, February 18, 2003 2:53 AM
 Subject: Re: Oh GAWD somone HELP :)
 
  You should add a user who allow to connect from 192.168.0.2 before you 
can
  connect to MySQL remotely.
 
  Further more, make sure that your host can reverse lookup 192.168.0.2.
 This
  can be done by add an entry in the /etc/hosts or create a DNS entry.
 
  Regards,
 
   Just installed mysql nice one i though
  
   set it all up read the nessasary docs nice one i thought
  
   tried to connect remotly
  
   [root@tasha root]# mysqladmin -h 192.168.0.2 version -uroot -
   ppassword mysqladmin: connect to server at '192.168.0.2' failed
   error: 'Lost connection to MySQL server during query'
  
   oh bugger
  
   played around with the configs for a few hours
  
   tried everything i could think of
  
   read some more docs
  
   tried everything i could think of again
  
   still the same
  
   any ideas?
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   To request this thread, e-mail [EMAIL PROTECTED]
   To unsubscribe, e-mail mysql-unsubscribe-
  [EMAIL PROTECTED]
   Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
  --
  Yours,
  KH Chiu
  CA Computer Consultants Ltd.
  Tel: 3104 2070 Fax: 3010 0896
  Email: [EMAIL PROTECTED]
  Website: www.caconsultant.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
 
 


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Limit the database size

2003-02-18 Thread KH Chiu
Thank you very much for your information. Can you tell me more how to limit 
size of directory in Linux? I can only set quota for users or groups but not 
for directory.

Thank you very much.

 On Tuesday 18 February 2003 04:26, KH Chiu wrote:
 
  I am planning to offer a free service that allow users to use my server to
  learn php and MySQL. I am a bit worry about if one of users (either
  intentionally or unintentionally) get into infinite loop with insert
  statement. It will quickly eat up the disk space and make my server
  unfunctional. So is there any way to limit the size of individual 
database?
 
 With MySQL - nope.
 You can limit size of the database directory.
 
 -- 
 For technical support contracts, goto https://order.mysql.com/?ref=ensita
 This email is sponsored by Ensita.net http://www.ensita.net/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
 /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
___/   www.mysql.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Limit the database size

2003-02-18 Thread KH Chiu
Thank you very much for your information. I have encountered another problem 
if I use this approach. The problem is I can change the database directory to 
another group which has quota. However, whatever mysql create new table, it 
will use its configrated group (namely 'mysql' in Redhat default rpm).

I think I can perform chgrp by a cron job at a regular interval. However, I 
will come back to my original problem that I can't limit disk usage at real 
time and a single program fault will make my server unfunctional.

Thank you again for your valuable information and can you give me more help.

Best regards,

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hello KH,
 
 Tuesday, February 18, 2003, 2:15:47 PM, you wrote:
 
  Thank you very much for your information. Can you tell me more how to 
limit
  size of directory in Linux? I can only set quota for users or groups but 
not
  for directory.
 
 very simple
 chown or chgrp the dir and set the quota for that group/user
 example:
 chgrp -Rv quota100MB /home/slpl/
 
 quota100MB meaning a group which will assign a quota of 100MB
 if the group don't exist create one
 
 P.S.
 This was done by reading the man
 
  Thank you very much.
 
  On Tuesday 18 February 2003 04:26, KH Chiu wrote:
 
   I am planning to offer a free service that allow users to use my 
server to
   learn php and MySQL. I am a bit worry about if one of users (either
   intentionally or unintentionally) get into infinite loop with insert
   statement. It will quickly eat up the disk space and make my server
   unfunctional. So is there any way to limit the size of individual
  database?
 
  With MySQL - nope.
  You can limit size of the database directory.
 
  --
  For technical support contracts, goto https://order.mysql.com/?ref=ensita
  This email is sponsored by Ensita.net http://www.ensita.net/
 __  ___ ___   __
/  |/  /_ __/ __/ __ \/ /Victoria Reznichenko
   / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
  /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
 ___/   www.mysql.com
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail mysql-unsubscribe-
  [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
  --
  Yours,
  KH Chiu
  CA Computer Consultants Ltd.
  Tel: 3104 2070 Fax: 3010 0896
  Email: [EMAIL PROTECTED]
  Website: www.caconsultant.com
 
 - --
 Best regards,
  Solid  mailto:[EMAIL PROTECTED]
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.2.1 (MingW32)
 
 iD8DBQE+Ukgq2PEgI0nAJngRApOdAJwKaXPMfZB2DVsdDTXp1mp/BxDCqQCcD3Y6
 AkLZAP16pGRHRb+t+O07ZhA=
 =maAp
 -END PGP SIGNATURE-


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Archive on remote Machine.

2003-02-18 Thread KH Chiu
You may try the following command

mysqldump -u your user name -p password samp_db | mysql -h your remote 
host name or address samp_db -u your user name -p your password

Please also note that samp_db must be exist on your remote machine. Of 
course, you should sub. samp_db with your to be achieve database name.

Regards,

 Hi,
 I use  Select * into outfile  filepath  from table  to archive the
 database.
 Is there any way to archive this into a different machine. (Not current
 machine)
 
 Yes Mapping to new machine and then giving path is an option. Any other
 opton.?
 Anis 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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 mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: License question

2003-02-18 Thread KH Chiu
First of all, I am not mysql person and I would like to share my personal 
understanding only.

If your program is under GNU's GPL (ie. free open source software) you can 
use MySQL right away. There is no need to buy license.

Otherwise, you may ask whether MySQL is an option or not. It means that if 
your logs and related information can go to other mean such as a text file 
then you are no need to buy license.

However, if your program can't run without MySQL database, I think license 
will be required.

Regards,


 My company develops commercial project which is close
 to well know ICQ but has slightly different appliance.
 
 Can I use MYSQL for storing list of users, collecting
 some statistics, logs and other related information or
 
 I have to buy license? 
 
 __
 Do You Yahoo!?
 Everything you'll ever need on one web page
 from News and Sport to Email and Music Charts
 http://uk.my.yahoo.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: problem in connecting to DB

2003-02-18 Thread KH Chiu
Yes, it is one of the security feature of MySQL that cause problem. Instead 
of using IP address, MySQL always perform a reverse DNS lookup and use host 
name instead.

One of my past painful experience is I add a user with host for 
192.168.0.33. However, no matter how hard I tried, I can't connect to MySQL 
from 192.168.0.33. Finally, I add an entry in the reverse DNS that allow 
192.168.0.33 to lookup a host name and the problem solved.

Best regards,

 one more thing i would like to ask u gurus when i have given my host
 with an IP address... why is it giving the message  
 username@localhost  wherein it should give me as  
 username@IPaddress 
 
 Thanks
 Ganesh Rajan
 - Original Message -
 From: Ganesh Rajan [EMAIL PROTECTED]
 To: Diana Soares [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Wednesday, February 19, 2003 10:26 AM
 Subject: Re: problem in connecting to DB
 
  Thanks for the response but as the document states to RUN mysqladmin
  flush-privileges and mysqladmin reload  i tried bothways... but in
 vain
  ... i still get the same error message Error 1045: Access Denied for
  user:(username@localhost) (user password :YES)
 
  Ganesh Rajan
  - Original Message -
  From: Diana Soares [EMAIL PROTECTED]
  To: Ganesh Rajan [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Tuesday, February 18, 2003 8:59 PM
  Subject: Re: problem in connecting to DB
 
 
   Everytime you use UPDATE, INSERT, DELETE to update user privileges you
   must do a FLUSH PRIVILEGES for changes to take effect.
   Check the manual:
   http://www.mysql.com/doc/en/Privilege_changes.html
  
  
   On Tue, 2003-02-18 at 11:57, Ganesh Rajan wrote:
hello all,
   
i would like to put a problem as what iam facing... i created a new
  database
 new user, but i didn't give the password...
   
then i logged in to mysql
ie
c:\mysql\bin mysql
then
mysql use mysql
then
mysqlupdate user set password=password('pswd') where user=
 'username';
then i got the result as 1row updated.
   
then i quit from mysql using mysql\q
now when i want to connect
i.e.
c:\mysql\bin mysql -u username -ppswd dbname;
   
iam getting error stating Error 1405:Access denied for user:
'username@localhost '  (user password :YES)'
   
IAM WORKING ON COMMANDLINE @ MYSQL SERVER ITSELF
   
can someone throw light onthis... it will be of grate help
   
Thanks in advance
Ganesh Rajan
   
   
-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
   
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
  [EMAIL PROTECTED]
Trouble unsubscribing? Try: 
http://lists.mysql.com/php/unsubscribe.php
   
   --
   Diana Soares
  
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   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 mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Limits and order bys

2003-02-18 Thread KH Chiu
For the best I know, it is not possible to do your task with single sql with 
MySQL. I have done similar task before but I need to put them into temp 
table and sort or create an index on the temp table.

As you can create temp table in memory (server), speed is really not a 
problem.

You may find the 'CREATE TEMPORARY ... TYPE=HEAP SELECT  FROM'

syntax very useful.

If you are in some mean using presistant connection (like using PHP), be 
careful to DROP the temporary table after use.

Regards,

 I was hoping to do it in sql, since it would be faster.  Any other ideas?
 
 ---
 Rob
 
 **
 Rob Cherry
 mailto:[EMAIL PROTECTED]
 +27 21 447 7440
 Jam Warehouse RSA
 Smart Business Innovation
 http://www.jamwarehouse.com
 **
 
 -Original Message-
 From: gerald_clark [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 18, 2003 11:36 PM
 To: Rob
 Cc: [EMAIL PROTECTED]
 Subject: Re: Limits and order bys
 
 Sort them yourself after retrieving them.
 
 Rob wrote:
 
 I have a question regarding the use of LIMIT with ORDER BY.  My problem is
 as follows:
 
 I want my users to be able to pageanate through result sets, so I've
 written
 some code
 that will display the results of a query 15 rows at a time in a HTML 
table.
 The next set of results
 can be accessed by pressing the next button and ditto for the previous 
set.
 The query is
 
 SELECT name FROM documents LIMIT 10, 15
 
 I want to further extend this functionality by allowing the users to click
 on the column
 name (in the table header) and then sort the current  set of results from
 by
 the chosen
 column.  So lets say I had the following
 
 mysql SELECT name FROM documents LIMIT 2, 4;
 
 +---+
 | name  |
 +---+
 | Visual Patterns Intellectual Property.doc |
 | footer.jpg|
 | getHWSerialNumber.txt |
 | env.php.txt   |
 +---+
 
 Now, I want to order by name.  So I should get
 
 +---+
 | name  |
 +---+
 | env.php.txt   |
 | footer.jpg|
 | getHWSerialNumber.txt |
 | Visual Patterns Intellectual Property.doc |
 +---+
 
 But, when I apply the following query
 
 mysql SELECT name FROM documents ORDER BY name ASC LIMIT 2, 4;
 
 I get
 
 +---+
 | name  |
 +---+
 | env.php.txt   |
 | footer.jpg|
 | getHWSerialNumber.txt |
 | Ideas.doc |
 +---+
 
 I can only assume that MySql is ordering by name before limiting the 
result
 set.  Obviously
 I want the reverse.  Any ideas?
 
 Thanks
 
 ---
 Rob
 
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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 mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Database Backup Question

2003-02-17 Thread KH Chiu
Sorry I am in a bit hurry and just post some hints on your question. It is 
more than one way to do your job. One of the trival way is to use php 
function 'exec'. This function can execute shell programs. It means that you 
can execute mysqldump etc. and create dump file.

From my experience, you should exp. with exec for a while to get thru. all 
the tricks like trustee and getting output back.

You should also zip or bzip the file using similar technique.

File download is trival.

If you need further help, you may let you know.

Regards,

 This is actually more a PHP question but since it refers to a MySQL
 database I thought I would ask here.
 I may not be looking in the right places but, I can't seem to find a 
 way to do a database backup through PHP (other than BACKUP TABLE,
  which I don't want to use if possible)
 
 What I mean is this:  I want to create a page that will allow me to
 click one button to initiate a backup process.  That action will then
 start a dump of a specified database to a text file that could then 
 be shown on a succeeding (success) page as a link for download (If there's
 a way to zip prior to downloading, which would be even better).  I
 intend on using this as a manual backup process, so I want it to work
 like the mysqldump.exe or mysqlhotcopy.exe.  (All the tables are 
 MyISAM)
 
 The only way I see this working would be to write in PHP a long 
 script that will manually create that dump file itself by using 
 SELECT and so forth.  This seems a bit redundant and extravagant a 
 way to go. 
 
 Any help would be appreciated.
 
 -- 
 Loren McDonald
 [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 mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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: Oh GAWD somone HELP :)

2003-02-17 Thread KH Chiu
You should add a user who allow to connect from 192.168.0.2 before you can 
connect to MySQL remotely.

Further more, make sure that your host can reverse lookup 192.168.0.2. This 
can be done by add an entry in the /etc/hosts or create a DNS entry.

Regards,

 Just installed mysql nice one i though
 
 set it all up read the nessasary docs nice one i thought
 
 tried to connect remotly
 
 [root@tasha root]# mysqladmin -h 192.168.0.2 version -uroot -
 ppassword mysqladmin: connect to server at '192.168.0.2' failed 
 error: 'Lost connection to MySQL server during query'
 
 oh bugger
 
 played around with the configs for a few hours
 
 tried everything i could think of
 
 read some more docs
 
 tried everything i could think of again
 
 still the same
 
 any ideas?
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail mysql-unsubscribe-
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


--
Yours,
KH Chiu
CA Computer Consultants Ltd.
Tel: 3104 2070 Fax: 3010 0896
Email: [EMAIL PROTECTED]
Website: www.caconsultant.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