Re: Inserting binary data into a BLOB field

2001-06-16 Thread Lucian Daniel Kafka

At 08:00 AM 6/16/01 +, you wrote:
Your message cannot be posted because it appears to be either spam or
simply off topic to our filter. To bypass the filter you must include
one of the following words in your message:

database,sql,query,table

If you just reply to this message, and include the entire text of it in the
reply, your reply will go through. However, you should
first review the text of the message to make sure it has something to do
with MySQL. You have written the following:


Can anyone tell me if the storage size for a blob is the actual raw binary
data storage space available (ie. not escaped), or the escaped (ie.
including escape chars) size of the variable submitted in INSERT ?

Please reply to: [EMAIL PROTECTED]

Thanks,

Luci


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

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 does tmp_table_size *really* do?

2001-06-16 Thread Jeremy Zawodny

On Fri, Jun 15, 2001 at 10:03:57PM -0500, Dan Nelson wrote:
 
 30 seconds of cscope browsing on the mysql source shows the follwing
 comments right before calls to create_tmp_table():
 
 /* Create a tmp table if distinct or if the sort is too complicated */
 /* group data to new table */
 
 So I'd say Mysql will use temp tables on GROUP BY, DISTINCT, and
 probably ORDER BY queries that mysql cannot satisfy with the same
 index the optimizer picked.
 
 The need_tmp flag is passed to the describe function, so any query
 that requires a temp table should also have Using temporary in its
 explain plan.

Ah, thanks. The funny thing is that I *did* think to check the source
code for a different problem I ran into severl minutes later.

I'll have to poke at this some more. I just restarted with a 64MB
maximum and one of my more common queries is still Using
temporary. I find it difficult to believe that I'm pulling enough
data to fill a 64MB table. The entire dataset is about 6 times that
size, and I know I'm not pulling even close to 1/6th of the data.

Hmm... More playing required...

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

MySQL 3.23.29: up 0 days, processed 2,435 queries (13/sec. avg)

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

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




Re[2]: Multiple CPU's in Freebsd

2001-06-16 Thread Strange Alex

Hello Matthew,

Thursday, June 14, 2001, 12:18:08 AM, you wrote:

MR Try this: update your ports, then build the mysql port with
MR WITH_LINUXTHREADS=1. This should result in a FreeBSD native binary
MR linked against linuxthreads instead of libc_r, so it should use multiple
MR processors.

Hm.. I have dual PIII platform with FreeBSD 4.3-R
And want to mysqld have worked on both cpu's.

I recompile mysql-server port with WITH_LINUXTHREADS=1, and notice every
thread in its own process. All was fine...
But next morning I've noticed all PHP applications using MySQL
roaming some about 'too many connections'

mysqladmin processlist shown a great number of working threads with
great live time.

Starting the 'top' I've noticed that all mysqld processes was swapped
out from memory !!! Nothing worked. 8-E

So, I've return to the latest binary... ;(

Is there any solve for this problem ?


* Ìîé àäðåñ - íå äîì è íå yëèöà, ìîé àäðåñ [EMAIL PROTECTED]
--
Best Regards
Strange Alex



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

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




COUNT(DISTINCT) -- is this correct behaviour?

2001-06-16 Thread tommie

count() gives 0 but count(distinct) gives 1. is this correct or 
a bug or is there something wrong with my SELECT?

mysql create table t1 (f1 int);
mysql insert into t1 values (1);
mysql create table t2 (f1 int,f2 int);
mysql select t1.f1,count(t2.f2) from t1
 - left join t2 on t1.f1=t2.f1 group by t1.f1;
+--+--+
| f1   | count(t2.f2) |
+--+--+
|1 |0 |
+--+--+
1 row in set (0.00 sec)

mysql select t1.f1,count(distinct t2.f2) from t1
 - left join t2 on t1.f1=t2.f1 group by t1.f1;
+--+---+
| f1   | count(distinct t2.f2) |
+--+---+
|1 | 1 |
+--+---+
1 row in set (0.01 sec)

regards,
tommie


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

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 Compiling MySQL++ examples (HELP PLEASE)

2001-06-16 Thread Sinisa Milivojevic

Tim Williams writes:
 
 I've downloaded the mysql++ api and I'm trying to compile the examples
 but I keep getting these warnings I don't understand.  When I compile ,
 using  the Makefile provided I get the following warnings:
 custom1.cc:8:1 : warning: pasting ~ and stock does not give a
 valid preprocessing token
 custom1.cc:8:1 : warning: pasting , and stock does not give a
 valid preprocessing token
 custom1.cc:8:1 : warning: pasting , and stock does not give a
 valid preprocessing token
 custom1.cc:8:1 : warning: pasting , and stock does not give a
 valid preprocessing token
 and so on
 
 Do I have something setup wrong or are these warnings normal?
 
 Thanks
 Tim Williams
 


HI!

What compiler version and release are you using ??


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com

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

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




Re: MySQLGUI problems

2001-06-16 Thread Sinisa Milivojevic

Pablo Prado writes:
 Hi all,
 
 I downloaded the both 
 mysql-3.23.39-sun-solaris2.7-sparc.tar.gz
 mysqlgui-solaris-2.7-sparc-static-1.6 
 a few days ago.
 
 While the sql server is running fine, I cannot get the gui to work.
 I gunziped it and made it executable using chmod u+x filename. After
 that when I try to run it in a Sun ultra10 with solaris the first screen
 with the logo appears and a few seconds laters dissapears with the
 message  Segmentation fault (core dumped).
 
 Could you please help me.
 
 Thanks,
 
 Pablo Prado
 Gemini Observatory


Hi!

The above binary is a contributed one , built on Solaris 2.7.

What is your version of Solaris ??

Please check with ldd the symbols and see which libstdc++ is linked. 

It should be version ...2.10...


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   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




Just a quick question about data conversions?

2001-06-16 Thread David Ayliffe

In order to add data to mysql, using LOAD INTO, am I right in thinking
that this file has to be local to the machine.  Therefore I have to ftp
the file I want inserted to the machine running the MySQL server;
Correct?

Thanks lots
David Ayliffe ([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




Help me....

2001-06-16 Thread sunil gc

sir,
   i have a problem.can u please tell me the
process how i can transfer my database from MSSQL to
MYSQL.Is there any Wizard like import,export im MSSQL.
Please send me the details.

__
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/

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

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




Re: Character set insensitive terms?

2001-06-16 Thread Sinisa Milivojevic

Mark W. de Raad writes:
 Good afternoon,
 
 We have an not-so-unusual problem where people are accessing a database from
 different countries (in this example, Germany and the UK). One of the search
 terms commonly used is: gehäuse (housing), which the UK types in as gehause
 and Germany (rightly of course) insists the word is not valid without the
 umlaut :)
 
 I realise that I can use the german1 character set to ensure that the SORT
 order is not thrown out by the character with the umlaut - but I wish to
 have a character set insensitive SELECT so that a=ä=ae and u=ü=ue (the ue
 may be a pushing things a bit).
 
 Is there a way to do this using a character set so that a query
 automatically equates the characters as equal? Or does there need to be a
 pre-query parser implemented with a rather large [aaeä...]?
 
 Thanks for any assistance.
 
 Regards,
 
 Mark
 --- 
 Mark W. de Raad 
 System Administrator
 I-Nex Corporation Pty. Ltd. 
 [EMAIL PROTECTED]


Hi!

At present moment a single  MySQL server supoprts one character set.

Current German set has few flaws, but a corrected version is on the
way.


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com

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

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




Re: COUNT(DISTINCT) -- is this correct behaviour?

2001-06-16 Thread Sinisa Milivojevic

[EMAIL PROTECTED] writes:
 count() gives 0 but count(distinct) gives 1. is this correct or 
 a bug or is there something wrong with my SELECT?
 
 mysql create table t1 (f1 int);
 mysql insert into t1 values (1);
 mysql create table t2 (f1 int,f2 int);
 mysql select t1.f1,count(t2.f2) from t1
  - left join t2 on t1.f1=t2.f1 group by t1.f1;
 +--+--+
 | f1   | count(t2.f2) |
 +--+--+
 |1 |0 |
 +--+--+
 1 row in set (0.00 sec)
 
 mysql select t1.f1,count(distinct t2.f2) from t1
  - left join t2 on t1.f1=t2.f1 group by t1.f1;
 +--+---+
 | f1   | count(distinct t2.f2) |
 +--+---+
 |1 | 1 |
 +--+---+
 1 row in set (0.01 sec)
 
 regards,
 tommie
 


Hi!

Thanks for the bug report. 

We shall investigate it.


-- 
Regards,
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Mr. Sinisa Milivojevic [EMAIL PROTECTED]
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, FullTime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
   ___/   www.mysql.com

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

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




Re: What does tmp_table_size *really* do?

2001-06-16 Thread jaab

On Fri, 15 Jun 2001, Dan Nelson wrote:
 30 seconds of cscope browsing on the mysql source shows the follwing
^^

What is cscope? Where can I get it? =)

Sincerely,
Jan

--
Mr. Jan-Aage Bruvoll IT Project Manager
20 Min Holding, Thurgauerstrasse 40, CH-8050 Zurich
Office/fax: +44 2072408283   Mobile: +44 7740291600


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

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 does tmp_table_size *really* do?

2001-06-16 Thread Kevin Whitney


A better tool is Source Navigator,
available at Red Hat site.

It's Cscope on steroids!

Kevin
[EMAIL PROTECTED] wrote:
 
 On Fri, 15 Jun 2001, Dan Nelson wrote:
  30 seconds of cscope browsing on the mysql source shows the follwing
 ^^
 
 What is cscope? Where can I get it? =)
 
 Sincerely,
 Jan
 
 --
 Mr. Jan-Aage Bruvoll IT Project Manager
 20 Min Holding, Thurgauerstrasse 40, CH-8050 Zurich
 Office/fax: +44 2072408283   Mobile: +44 7740291600
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: What does tmp_table_size *really* do?

2001-06-16 Thread Sander Pilon

The answer to ALL your 'where can I get it' questions is -

1) Freshmeat. www.freshmeat.net (Search for 'cscope'.)
2) Google. www.google.com (Repeat search)

Seaarch 1 results in this url: http://freshmeat.net/projects/cscope/

-Sander

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
 Sent: 16 June 2001 15:33
 To: Dan Nelson
 Cc: [EMAIL PROTECTED]
 Subject: Re: What does tmp_table_size *really* do?
 
 
 On Fri, 15 Jun 2001, Dan Nelson wrote:
  30 seconds of cscope browsing on the mysql source shows the follwing
 ^^
 
 What is cscope? Where can I get it? =)
 
 Sincerely,
 Jan
 
 --
 Mr. Jan-Aage Bruvoll IT Project Manager
 20 Min Holding, Thurgauerstrasse 40, CH-8050 Zurich
 Office/fax: +44 2072408283   Mobile: +44 7740291600
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Possible Bug in mysql 3.23.38

2001-06-16 Thread William M. Quarles

I would like to note that bug reports should only be sent out if you are 
using the latest version, which now is 3.23.39.

--On Friday, June 15, 2001 17:37 -0600 Chris Bolt [EMAIL PROTECTED] 
wrote:

 After creating a new database, I ran:

 update user set password = 'SomeJunk' where user = 'root';

 This inserts the string 'SomeJunk' literally into the database,
 unencrypted.  This is SQL expected but the result is a database
 lockout (not to mention the security breach of having the clear
 password stored in a file.

 I got the smart idea to assign a root password like this from the
 Bugzilla-Guide.txt file that comes with Bugzilla.

 I just opened Bugzilla-Guide.txt and it says:

 mysql UPDATE user SET Password=PASSWORD ('new_password') WHERE
 user='root'; mysql FLUSH PRIVILEGES;

 note the PASSWORD('new_password') instead of just 'new_password'

 If there is a better way to assign passwords, please let me know.

 I tried

 grant all on mysql.* to foo identified by bar;

 Seems to work for creating new accounts.

 Try
 GRANT ALL PRIVILEGES ON table.* TO user@localhost IDENTIFIED BY
 'password';

 Since in most cases (web server and mysql on same box) you don't need to
 allow users to connect from anywhere. If you want to include a hostname or
 wildcard, put it in '' (like '%.host.com' or just '%')

 Also, the user table looks like:

 mysql select host, user, password from user;
 +---+-+--+
  | host   | user | password |
 +---+-+--+
 | localhost | root| 7d30d6e5796d165e |
 | nomis | root| 7d30d6e5796d165e |
 | localhost | |  |
 | nomis | |  |
 | localhost | ShimonR | 7d30d6e5796d165e |
 +---+-+--+
 5 rows in set (0.00 sec)

 Does this mean that any user from localhost or from nomis can connect?

 Don't know, but unless they have corresponding rows in another table to
 actually give them privileges, they can't do anything.

 I don't have rows like that in my user table so they should be safe to
 delete.


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

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




-- 
William M. Quarles

Vice Pres, Society of Physics Students
Jr. Warden, Canterbury Episcopal Campus Ministry
James Madison University

[EMAIL PROTECTED]

* This e-mail was sent using Mulberry, JMU's new official e-mail client.


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

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




Re: mysqldump on large database..

2001-06-16 Thread SDiZ Cheng

- Original Message -
 In the last episode (Jun 15), SDiZ Cheng said:
  When i use mysqldump,
  seems that MySQL will open all the tables in the database.
  But, what i have is: a database will over 10,000 tables ..
  I get a Too much opened file error on this..
  I think increasing open_file_limit is not possible,
  because of the limit of the OS itself..

 Which OS are you running?  You should be able to open 2 files
 (index+data) on most Unixes with a little tuning.

I am using linux. yes, i can do they by a simple
  echo 4294967295  /proc/sys/fs/file-max 
But i don't want to see my system out of memory.
as the kernel doc said, it won't free the memory once
it use as a filehandle.. although those filehandle may
be reuse, but, the problem is: i won't do that twice .

 It may be slow, but  it should work.  Alternatively, you can temporarily
move tables 1000 at
 a time into another directory, mysqldump them, and move them back.

thanks for your suggest.. i will try it =)


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

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




mysql and php - Can't Connect To MySQL Server warning

2001-06-16 Thread Larbes, James (GEAE, CDI Corp)

 I have installed mysql-3.23.38-hp-hpux10.20-hppa1.1 on an hpux10.20 Unix
 machine.  I also have PHP 4.0.5 installed.  When I run mysql through PHP
 on my web server, I get a Can't connect to MySQL server warning error
 once every ten times I try to access a database.  Is there something I
 need to configure to make mysql and php become more stable? 
 
I have mysql on one machine and php on another...could that be that
cause of my problem?  I am stumped as to why the error occurs once every ten
times mysql is accessed through php.  To me, it should either work all the
time, or not work at all.

Please help!  (Reply to my email address please, as I am unable to
subscribe to this mailing list.)

Sincerely,

Jay Larbes
[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




Shortest route between 2 cities

2001-06-16 Thread Vahan Yerkanian

Greetings All!

I'm looking for a code which will find the shortest route between 2 cities, with
data
being stored in SQL tables listed below. Anyone has coded such a task ever?

I'm including the structure of tables used.

CREATE TABLE Cities (
  cityID int(4) unsigned NOT NULL auto_increment,
  cityName varchar(20) NOT NULL,
  PRIMARY KEY (cityID),
  UNIQUE cityID (cityID, cityName)
);

INSERT INTO Cities VALUES ( '1', 'A');
INSERT INTO Cities VALUES ( '2', 'B');
INSERT INTO Cities VALUES ( '3', 'C');
INSERT INTO Cities VALUES ( '4', 'D');
INSERT INTO Cities VALUES ( '5', 'E');
INSERT INTO Cities VALUES ( '6', 'F');
INSERT INTO Cities VALUES ( '7', 'G');
INSERT INTO Cities VALUES ( '8', 'H');
INSERT INTO Cities VALUES ( '9', 'I');

CREATE TABLE CityMatrix (
  matrixID int(4) unsigned NOT NULL auto_increment,
  SourceCityID int(4) unsigned DEFAULT '0' NOT NULL,
  DestinationCityID int(4) unsigned DEFAULT '0' NOT NULL,
  Distance int(5) unsigned DEFAULT '0' NOT NULL,
  Fare int(4) unsigned DEFAULT '0' NOT NULL,
  PRIMARY KEY (matrixID),
  UNIQUE matrixID (matrixID)
);

# Dumping data for table 'CityMatrix'
INSERT INTO CityMatrix VALUES ( '1', '1', '4', '5', '10');
INSERT INTO CityMatrix VALUES ( '2', '3', '4', '50', '5');
INSERT INTO CityMatrix VALUES ( '4', '5', '7', '85', '8');
INSERT INTO CityMatrix VALUES ( '5', '1', '3', '70', '4');
INSERT INTO CityMatrix VALUES ( '6', '9', '6', '39', '6');
INSERT INTO CityMatrix VALUES ( '7', '8', '4', '10', '1');
-- 
Vahan Yerkanian[EMAIL PROTECTED]
Vice President, Design  Development  Website @ http://www.abideweb.com/
AbideWeb Technologies, LLC  Phone +3741 238650 | Mobile +3749 416358

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

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 does tmp_table_size *really* do?

2001-06-16 Thread Dan Nelson

In the last episode (Jun 16), Jeremy Zawodny said:
 Ah, thanks. The funny thing is that I *did* think to check the source
 code for a different problem I ran into severl minutes later.
 
 I'll have to poke at this some more. I just restarted with a 64MB
 maximum and one of my more common queries is still Using
 temporary. I find it difficult to believe that I'm pulling enough
 data to fill a 64MB table. The entire dataset is about 6 times that
 size, and I know I'm not pulling even close to 1/6th of the data.

I think all Using temporary means is that mysql has to modify the
result set (i.e. sort or group it) before passing it to the client. 
The temp table will stay in RAM unless it gets larger than the
tmp_table_size value, so to tell whether a particular query needed an
on-disk temp table, you'll probably have to compare the
created_tmp_disk_tables stat value before and after the query.

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




Re: Shortest route between 2 cities

2001-06-16 Thread Gary Huntress

Here is the text of an email that I googled (eeek!  its a verb!)

The algorithm you need is called single-source, shortest path, also
known as Dijkstra's algorithm.  Here's one way to implement it, in
pseudo-code.

  Shortest route on graph of locations in Inform
  --

  For each location, we keep two properties: V (the visited flag) and C
  (initial step).  We are given the values SOURCE (i.e., parent(NPC))
  and DEST, the destination.  N is a global variable.  S and T are
  queues or stacks.

  1. (Initialise) Let SOURCE.V = 1 and SOURCE.C = 0.  Let N = 0 and S
 and T be empty.  Push SOURCE onto S.

  2. (Take one step) For each location I in S consider each possible
 location J which is reachable in one step from I and has J.V = 0
 (i.e., hasn't been visited yet).  Let J.V = 1.  If N = 0, let J.C =
 J; otherwise J.C = I.C.  If J = DEST, go to step 4.  Otherwise,
 push J onto T.

  3. (Repeat) If T is non-empty, let S = T, T be empty, N = N + 1 and go
 back to step 2.  Otherwise, go to step 4.

  4. (Done) If DEST.V = 0, then destination cannot be reached.
 Otherwise DEST.C is the initial step on the shortest path from
 SOURCE to DEST.  N is the distance from SOURCE to DEST.


Regards,
Gary SuperID Huntress
===
FreeSQL.org offering free database hosting to developers
Visit http://www.freesql.org

- Original Message -
From: Vahan Yerkanian [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 16, 2001 1:30 PM
Subject: Shortest route between 2 cities


 Greetings All!

 I'm looking for a code which will find the shortest route between 2
cities, with
 data
 being stored in SQL tables listed below. Anyone has coded such a task
ever?

 I'm including the structure of tables used.

 CREATE TABLE Cities (
   cityID int(4) unsigned NOT NULL auto_increment,
   cityName varchar(20) NOT NULL,
   PRIMARY KEY (cityID),
   UNIQUE cityID (cityID, cityName)
 );

 INSERT INTO Cities VALUES ( '1', 'A');
 INSERT INTO Cities VALUES ( '2', 'B');
 INSERT INTO Cities VALUES ( '3', 'C');
 INSERT INTO Cities VALUES ( '4', 'D');
 INSERT INTO Cities VALUES ( '5', 'E');
 INSERT INTO Cities VALUES ( '6', 'F');
 INSERT INTO Cities VALUES ( '7', 'G');
 INSERT INTO Cities VALUES ( '8', 'H');
 INSERT INTO Cities VALUES ( '9', 'I');

 CREATE TABLE CityMatrix (
   matrixID int(4) unsigned NOT NULL auto_increment,
   SourceCityID int(4) unsigned DEFAULT '0' NOT NULL,
   DestinationCityID int(4) unsigned DEFAULT '0' NOT NULL,
   Distance int(5) unsigned DEFAULT '0' NOT NULL,
   Fare int(4) unsigned DEFAULT '0' NOT NULL,
   PRIMARY KEY (matrixID),
   UNIQUE matrixID (matrixID)
 );

 # Dumping data for table 'CityMatrix'
 INSERT INTO CityMatrix VALUES ( '1', '1', '4', '5', '10');
 INSERT INTO CityMatrix VALUES ( '2', '3', '4', '50', '5');
 INSERT INTO CityMatrix VALUES ( '4', '5', '7', '85', '8');
 INSERT INTO CityMatrix VALUES ( '5', '1', '3', '70', '4');
 INSERT INTO CityMatrix VALUES ( '6', '9', '6', '39', '6');
 INSERT INTO CityMatrix VALUES ( '7', '8', '4', '10', '1');
 --
 Vahan Yerkanian
[EMAIL PROTECTED]
 Vice President, Design  Development  Website @
http://www.abideweb.com/
 AbideWeb Technologies, LLC  Phone +3741 238650 | Mobile +3749
416358

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

 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: Just a quick question about data conversions?

2001-06-16 Thread ryc

Yes the server must be able to open the file. I dont know how you would
write a file path that accesses another machine heh.

ryan


 In order to add data to mysql, using LOAD INTO, am I right in thinking
 that this file has to be local to the machine.  Therefore I have to ftp
 the file I want inserted to the machine running the MySQL server;
 Correct?




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

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: Shortest route between 2 cities

2001-06-16 Thread Vahan Yerkanian

Yeah I know, I'm googling and yahooing and etc for the last 3 days
but my math knowledge is still insufficient to write a PHP code for
this. Any kind soul who can stop my pain? 

Vahan

Gary Huntress wrote:
 
 Here is the text of an email that I googled (eeek!  its a verb!)
 
 The algorithm you need is called single-source, shortest path, also
 known as Dijkstra's algorithm.  Here's one way to implement it, in
 pseudo-code.
 
   Shortest route on graph of locations in Inform
   --
 
   For each location, we keep two properties: V (the visited flag) and C
   (initial step).  We are given the values SOURCE (i.e., parent(NPC))
   and DEST, the destination.  N is a global variable.  S and T are
   queues or stacks.
 
   1. (Initialise) Let SOURCE.V = 1 and SOURCE.C = 0.  Let N = 0 and S
  and T be empty.  Push SOURCE onto S.
 
   2. (Take one step) For each location I in S consider each possible
  location J which is reachable in one step from I and has J.V = 0
  (i.e., hasn't been visited yet).  Let J.V = 1.  If N = 0, let J.C =
  J; otherwise J.C = I.C.  If J = DEST, go to step 4.  Otherwise,
  push J onto T.
 
   3. (Repeat) If T is non-empty, let S = T, T be empty, N = N + 1 and go
  back to step 2.  Otherwise, go to step 4.
 
   4. (Done) If DEST.V = 0, then destination cannot be reached.
  Otherwise DEST.C is the initial step on the shortest path from
  SOURCE to DEST.  N is the distance from SOURCE to DEST.
 
 Regards,
 Gary SuperID Huntress
 ===
 FreeSQL.org offering free database hosting to developers
 Visit http://www.freesql.org
 
 - Original Message -
 From: Vahan Yerkanian [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Saturday, June 16, 2001 1:30 PM
 Subject: Shortest route between 2 cities
 
  Greetings All!
 
  I'm looking for a code which will find the shortest route between 2
 cities, with
  data
  being stored in SQL tables listed below. Anyone has coded such a task
 ever?
 
  I'm including the structure of tables used.
 
  CREATE TABLE Cities (
cityID int(4) unsigned NOT NULL auto_increment,
cityName varchar(20) NOT NULL,
PRIMARY KEY (cityID),
UNIQUE cityID (cityID, cityName)
  );
 
  INSERT INTO Cities VALUES ( '1', 'A');
  INSERT INTO Cities VALUES ( '2', 'B');
  INSERT INTO Cities VALUES ( '3', 'C');
  INSERT INTO Cities VALUES ( '4', 'D');
  INSERT INTO Cities VALUES ( '5', 'E');
  INSERT INTO Cities VALUES ( '6', 'F');
  INSERT INTO Cities VALUES ( '7', 'G');
  INSERT INTO Cities VALUES ( '8', 'H');
  INSERT INTO Cities VALUES ( '9', 'I');
 
  CREATE TABLE CityMatrix (
matrixID int(4) unsigned NOT NULL auto_increment,
SourceCityID int(4) unsigned DEFAULT '0' NOT NULL,
DestinationCityID int(4) unsigned DEFAULT '0' NOT NULL,
Distance int(5) unsigned DEFAULT '0' NOT NULL,
Fare int(4) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (matrixID),
UNIQUE matrixID (matrixID)
  );
 
  # Dumping data for table 'CityMatrix'
  INSERT INTO CityMatrix VALUES ( '1', '1', '4', '5', '10');
  INSERT INTO CityMatrix VALUES ( '2', '3', '4', '50', '5');
  INSERT INTO CityMatrix VALUES ( '4', '5', '7', '85', '8');
  INSERT INTO CityMatrix VALUES ( '5', '1', '3', '70', '4');
  INSERT INTO CityMatrix VALUES ( '6', '9', '6', '39', '6');
  INSERT INTO CityMatrix VALUES ( '7', '8', '4', '10', '1');

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

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




Re: mysql and php - Can't Connect To MySQL Server warning

2001-06-16 Thread Steve Brazill

Is it 'exactly' once every 10 times ??

You should check to make sure it's not an 'external' issue.
- Do you have a 'series' of DNS servers (like 10) that you use to lookup
system names (and 1 of them isn't working properly ?)

Try some other service (like 'pinging' the MySQL server from the PHP system
10 times) to see if you get the same error.

P.S.  You didn't mention what type of system the PHP machine is...

- Original Message -
From: Larbes, James (GEAE, CDI Corp) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, June 16, 2001 10:20 AM
Subject: mysql and php - Can't Connect To MySQL Server warning


  I have installed mysql-3.23.38-hp-hpux10.20-hppa1.1 on an hpux10.20 Unix
  machine.  I also have PHP 4.0.5 installed.  When I run mysql through PHP
  on my web server, I get a Can't connect to MySQL server warning error
  once every ten times I try to access a database.  Is there something I
  need to configure to make mysql and php become more stable?
 
 I have mysql on one machine and php on another...could that be that
 cause of my problem?  I am stumped as to why the error occurs once every
ten
 times mysql is accessed through php.  To me, it should either work all the
 time, or not work at all.

 Please help!  (Reply to my email address please, as I am unable to
 subscribe to this mailing list.)

 Sincerely,

 Jay Larbes
 [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




Display error but continue script

2001-06-16 Thread Dawn H

How do I make an error display, but still continue the script? The error
subroutine does not exit, but the original subroutine that calls it doesn't
continue
after the error message, it just quits.

=Dawn H

http://www.rdcss.com/ - RD Computer Solutions
http://wow.cooncheese.com/ - WOW.CoonCheese.com
http://dpenguin.rdcss.com/ - Cornucopia

 Filter fixer: database,sql,query

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

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




RE: Display error but continue script

2001-06-16 Thread Dawn H

I'm using Perl

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
MikemickaloBlezien
Sent: Saturday, June 16, 2001 2:06 PM
To: Dawn H
Cc: [EMAIL PROTECTED]
Subject: Re: Display error but continue script


On Sat, 16 Jun 2001 13:47:29 -0500, Dawn H [EMAIL PROTECTED]
wrote:

What scripting are you using, PHP, Perl, etc??

How do I make an error display, but still continue the script? The error
subroutine does not exit, but the original subroutine that calls it
doesn't
continue
after the error message, it just quits.

=Dawn H

Mike(mickalo)Blezien

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















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

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




RE: Display error but continue script

2001-06-16 Thread Don Read


On 16-Jun-01 Dawn H wrote:
 How do I make an error display, but still continue the script? The error
 subroutine does not exit, but the original subroutine that calls it doesn't
 continue
 after the error message, it just quits.
 

A look at the code that does that would help ...

but:

$debug=1;

$qry=some SQL that fails ;

$res=mysql_query($qry);
if ($res) {
  .. do your stuff
} else {
   zissboombaa(__FILE__,__LINE__, $qry .mysql_error());
}

 .. and continue on ...


function zissboombaa($fl, $ln, $msg='') {
global $debug;

if ($debug)
printf('DIV ALIGN=LEFTExploding Sheep near %s %s:BR%s/DIV',
  $fl , $ln ,$msg);
} 


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.

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

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




access denied problem

2001-06-16 Thread chao cheng

Hi,

I just installed Mysql from source for Linux. When I type the following command:

mysqladmin -u root password mysql

I got this error:

mysqladmin:connect to server@localhost' failed
error:'access denied for user:'root@localhost'(using password:NO)'

Can some tell me how to correct this problem? Thanks!





RE: Display error but continue script

2001-06-16 Thread Dawn H

Ah. The subroutine bail_out() that I'm using is using die. Aha! :-)

Thanks,
=Dawn

-Original Message-
From: Don Read [mailto:[EMAIL PROTECTED]]
Sent: Saturday, June 16, 2001 2:39 PM
To: Dawn H
Cc: MySQL Email List
Subject: RE: Display error but continue script



On 16-Jun-01 Dawn H wrote:
 I'm using Perl


are you displaying your message with warn() or with die() ?

  Filter fixer: database,sql,query

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

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

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: Display error but continue script

2001-06-16 Thread MikemickaloBlezien

On Sat, 16 Jun 2001 14:33:44 -0500 (CDT), Don Read [EMAIL PROTECTED]   wrote:

A heck of alot easier with Perl!(Just my opinion) :) Just disable RaiseError and
enable PrintError when using DBI



On 16-Jun-01 Dawn H wrote:
 How do I make an error display, but still continue the script? The error
 subroutine does not exit, but the original subroutine that calls it doesn't
 continue
 after the error message, it just quits.
 

A look at the code that does that would help ...

but:

$debug=1;

$qry=some SQL that fails ;

$res=mysql_query($qry);
if ($res) {
  .. do your stuff
} else {
   zissboombaa(__FILE__,__LINE__, $qry .mysql_error());
}

 .. and continue on ...


function zissboombaa($fl, $ln, $msg='') {
global $debug;

if ($debug)
printf('DIV ALIGN=LEFTExploding Sheep near %s %s:BR%s/DIV',
  $fl , $ln ,$msg);
} 


Regards,

Mike(mickalo)Blezien

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
















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

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




Re: What does tmp_table_size *really* do?

2001-06-16 Thread Jeremy Zawodny

On Sat, Jun 16, 2001 at 12:35:52PM -0500, Dan Nelson wrote:
 In the last episode (Jun 16), Jeremy Zawodny said:
  Ah, thanks. The funny thing is that I *did* think to check the source
  code for a different problem I ran into severl minutes later.
  
  I'll have to poke at this some more. I just restarted with a 64MB
  maximum and one of my more common queries is still Using
  temporary. I find it difficult to believe that I'm pulling enough
  data to fill a 64MB table. The entire dataset is about 6 times that
  size, and I know I'm not pulling even close to 1/6th of the data.
 
 I think all Using temporary means is that mysql has to modify the
 result set (i.e. sort or group it) before passing it to the client.
 The temp table will stay in RAM unless it gets larger than the
 tmp_table_size value, so to tell whether a particular query needed
 an on-disk temp table, you'll probably have to compare the
 created_tmp_disk_tables stat value before and after the query.

Err, I forgot to mention that there's a Using filesort in the output
as well. That makes me believe it wants to write to disk (even if
there may be sufficient RAM).

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

MySQL 3.23.29: up 0 days, processed 3,104,493 queries (72/sec. avg)

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

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




MySQL 4 and WINDOWS

2001-06-16 Thread technical Support

Hello,

Has anyone managed to compile the BETA version of MySQL 4 for Windows?

I have downloaded the source however, it appears to be for LINUX or UNIX.

*
* Visit http://www.computerstaff.net - Computer Jobs at all LEVELS *
*

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

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




innodb admin questions

2001-06-16 Thread ryc

My application needs to insert between 200-500k rows about once a day...
When using MyISAM tables I determined the best way to get this done (while
still allowing users to perform select statements from the table) was to use
mysqlimport with --low-priority. This way all the inserts get bundled up
into large groups, and the low-proriorty allows select statements to
continue. However I switched the table type to Innodb now and I am not sure
what the best way to insert these rows would be. There is:

a) continue using mysqlimport (without low-priority??)... the question about
this is will mysqlimport group the inserts into one large begin/commit
block, or will each insert have its own block?
b) create the begin/insert/commit statements myself

What way would be the fastest and least abrasive on the server?

Another question I have is reguarding memory usage... Will innobase use any
of the key-buffer memory Mysql is using for MyISAM tables or is the only
memory innobase uses defined with innodb_buffer_pool_size?

Thanks!!

ryan


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

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: Replacing source with binary

2001-06-16 Thread Tobias Tobiasen

Tobias Kjær Tobiasen wrote:

 Hello
 I have installed 2.23.32 from source - and I want to upgrade to the  
 latest *rpm* (redhat 6.2@intel). How to do this? The database is in  
 production so downtime should be avoided.. Can I do this:
 1) Install the rpm on top of the source installation  (I seems to me 
 that they are using different folders).
 2) Stop the database.
 3) Move the files /usr/local/mysql/var to /var/lib/mysql.
 4) Start the rpm version of MySql
 5) Remove the old version - how do I uninstall the source dist?
 
Hi!
I tried it - it worked perfectly :-) I only had 15 seconds downtime - 
nobody noticed!

T2


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

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




Need help with mysql

2001-06-16 Thread Malkhaz Mangoshvili

Hello. I installed on my computer Red Hat Linux 7.0. After that I started configuring  
mysql. I upgraded  mysql, added all necessary packages and I wanted to run mysql 
server.  
Whenever I type mysql it gives me such an error message: ERROR 2002: Can't connect to 
MYSQL server through socket /var/lib/mysql/mysql.sock . I found out from the internet 
that I needed to change permission for the mysql.socket by typing chmod 777 
mysql.socket. For the first time this file didn't even exist, then it was created when 
I typed mysql_install_db, but it is empty. Version of this mysql is: 3.23.22-beta.
  I am very sorry about that, but I really need to get mysql running from the Linux 
platform, in order to use it in my C/C++ programs. Please if anybody could help me I 
would appreciate that. I'll wait for the answer. Thank you.


Mike 



Re: Need help with mysql

2001-06-16 Thread Trond Eivind Glomsrød

Malkhaz Mangoshvili [EMAIL PROTECTED] writes:

 Hello. I installed on my computer Red Hat Linux 7.0. After that I started 
configuring  
 mysql. I upgraded  mysql, added all necessary packages and I wanted to run mysql 
server.  
 Whenever I type mysql it gives me such an error message: ERROR
 2002: Can't connect to MYSQL server through socket
 /var/lib/mysql/mysql.sock . I found out from the internet that I
 needed to change permission for the mysql.socket by typing chmod 777
 mysql.socket. For the first time this file didn't even exist, then
 it was created when I typed mysql_install_db, but it is
 empty. Version of this mysql is: 3.23.22-beta.

1) Remove /var/lib/mysql (shouldn't be necesarry, but just to be safe
2) Get the updated rpms (you can get them with up2date). The version
   of these are mysql-3.23.32-1.7
3) Start mysql with service mysqld start - don't do safe_mysqld,
   mysql_install_db:  The database is initialized automatically the
   first time it's run 

-- 
Trond Eivind Glomsrød
Red Hat, 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 [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Database Corruption

2001-06-16 Thread Craig G Meyers

I'm new to mysql.

I developed a unix korn shell script that performs three queries on our
database. Our DBA found corruption problems coincidental to my script
development. Is it possible that I could have corrupted the data with three
SELECT queries?

We are pretty fast-and-loose with security and I put the password on the
mysql command line for convenience. Could that also be a problem?

Thanks.
Craig Meyers
Senior Engineer
Invensys Dynamic Simulation



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

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




Re: Need help with mysql

2001-06-16 Thread Paul DuBois

At 6:23 PM -0400 6/16/01, Malkhaz Mangoshvili wrote:
Hello. I installed on my computer Red Hat Linux 7.0. After that I 
started configuring 
mysql. I upgraded  mysql, added all necessary packages and I wanted 
to run mysql server.

Are you using RedHat's MySQL RPMs?  If so, you should uninstall them and
start over with the RPMs from the MySQL site.

Whenever I type mysql it gives me such an error message: ERROR 
2002: Can't connect to MYSQL server through socket 
/var/lib/mysql/mysql.sock . I found out from the internet that I 
needed to change permission for the mysql.socket by typing chmod 777 
mysql.socket. For the first time this file didn't even exist, then 
it was created when I typed mysql_install_db, but it is empty. 
Version of this mysql is: 3.23.22-beta.
   I am very sorry about that, but I really need to get mysql running 
from the Linux platform, in order to use it in my C/C++ programs. 
Please if anybody could help me I would appreciate that. I'll wait 
for the answer. Thank you.

 
Mike


-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




Strange Mysql behaviour

2001-06-16 Thread William Wong

Hi there,

For some reason, this query doesn't work:

PHP4 mysql_query(select * from user where username='myname' and passwd =
password('mypass'));

WHILE this one does work:

PHP4 mysql_query(select * from user where username='myname' and
password('mypass'));

Notice the lack of passwd =  in the second version.

Anyone know why this is happening?

Regards,
- Will

OS: FreeBSD 4.3R
PHP: 4.05
MySQL: 3.23.38

mysql describe user;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| username | varchar(12) |  | PRI | |   |
| passwd   | varchar(12) |  | | |   |
| email| varchar(30) |  | | |   |
+--+-+--+-+-+---+


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

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 does tmp_table_size *really* do?

2001-06-16 Thread Dan Nelson

In the last episode (Jun 16), Jeremy Zawodny said:
 Err, I forgot to mention that there's a Using filesort in the
 output as well. That makes me believe it wants to write to disk (even
 if there may be sufficient RAM).

I'm not sure Using filesort actually means it is going to create a
file.  The code seems to print filesort whenever an ORDER BY is
requested (sql_select.cc:536).  Even the manual simply says extra
pass.  Maybe it required a file-based table in an earlier version, but
not anymore?

-- 
Dan Nelson
[EMAIL PROTECTED]

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

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




Re: Strange Mysql behaviour

2001-06-16 Thread Paul DuBois

At 8:49 PM -0400 6/16/01, William Wong wrote:
Hi there,

For some reason, this query doesn't work:

PHP4 mysql_query(select * from user where username='myname' and passwd =
password('mypass'));

Define doesn't work.  Fails to return rows?  PHP generates an error message?


WHILE this one does work:

PHP4 mysql_query(select * from user where username='myname' and
password('mypass'));

Notice the lack of passwd =  in the second version.

password('mypass') is a legal expression.  It returns a non-empty string,
which probably evaluates to true.  The statement is therefore equivalent
to:

select * from user where username='myname'




Anyone know why this is happening?

Regards,
- Will

OS: FreeBSD 4.3R
PHP: 4.05
MySQL: 3.23.38

mysql describe user;
+--+-+--+-+-+---+
| Field| Type| Null | Key | Default | Extra |
+--+-+--+-+-+---+
| username | varchar(12) |  | PRI | |   |
| passwd   | varchar(12) |  | | |   |
| email| varchar(30) |  | | |   |
+--+-+--+-+-+---+


-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




Re: Strange Mysql behaviour

2001-06-16 Thread William Wong

 PHP4 mysql_query(select * from user where username='myname' and passwd
=
 password('mypass'));

 Define doesn't work.  Fails to return rows?  PHP generates an error
message?

Hi Paul,

Sorry bout that.  Yes it doesn't return any rows despite the fact that the
correct username and password are entered.

The user/pass was entered with the following query:

PHP4 $result = mysql_query(insert into user values ('$username',
password('$password'), '$email'));

 The statement is therefore equivalent to:
 select * from user where username='myname'

Oh.  I'm trying to implement authentication.  So I guess this is quite bad
:)

I'm still not sure why my original query (with passwd = ) isn't returning
any rows.  Is there something wrong with the syntax?

Regards,
- Will


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

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: java driver

2001-06-16 Thread Paul DuBois

At 12:29 PM +0100 6/15/01, Michael Garthwaite wrote:
I'm new to mysql and relatively new to java. I've downloaded a type 
4 driver from mm.mysql. I've put the folder containing the driver in 
my classpath and included the driver in my code as per the 
instructions as follows:

try{
 Class.forName(org.gjt.mm.mysql.Driver);
}

Try changing the call to:

Class.forName (org.gjt.mm.mysql.Driver).newInstance ();


The problem is that though the code compiles it throws a 
ClassNotFoundException when I try to run it. For some reason the 
driver is not found. I'm probably missing something really obvious 
but can anyone help me with this.

Michael


-- 
Paul DuBois, [EMAIL PROTECTED]

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

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




Re: Strange Mysql behaviour

2001-06-16 Thread SDiZ Cheng

I think the problem goes here:

 PHP4 $result = mysql_query(insert into user values ('$username',
 password('$password'), '$email'));

Please ensure $password is correct, and with no problem..
( eg. space/CRLF at the enter of the string ... etc.. )


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

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

2001-06-16 Thread William Wong

 Looks correct to me.  Try running this query from the mysql program
 to verify that you're really matching the password of some entry:

 mysql SELECT *, password('mypass') FROM user;

Hi guys,

I've solved the problem, but it was something related to the password
function.

In my user table, my passwd field was only set to 12 characters.  It appears
that password(blah), generates a password that is 16 characters long.
Since I was saving only the first 12 characters of the 16 char password, my
queury's passwd = password('blah') did not match.

What a bugger :)

Regards,
- Will


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

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




.dump files

2001-06-16 Thread trogers

hello,

i have some files from a Cd that are .dump files, how do i get these 
db into mysql? (is it possible using phpMyAdmin).

again, these are .dump files, not .sql files.

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




RE: .dump files

2001-06-16 Thread Chris Bolt

What format are they in? Please paste a few sample lines.

 hello,
 
 i have some files from a Cd that are .dump files, how do i get these 
 db into mysql? (is it possible using phpMyAdmin).
 
 again, these are .dump files, not .sql files.


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

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