BLOB - JPG

2002-05-20 Thread Sameer Maggon

Hi,
  If i have a JPG file, how can i put it into the database
  / table in MYsql with one field defined as BLOB..

  Please help
  Sameer





--
http://www.dypatil.edu For Better tomorrow

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

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: store JPG in MySQL DB

2002-05-20 Thread Sherzod B. Ruzmetov


For real-life example, check out http://cdbaza.ultracgis.com, and check 
out the filename 
of the thumbnails images. I'm SELECTing those images from the MySQL 
database.

That's how it's done:

1_ Create a table to store your JPGs, and the column that holds JPG data
   should be declared as BLOB

CREATE TABLE images (
image_id INT UNSIGNED NOT NULL AUT_INCREMENT PRIMARY KEY,
image BLOB NOT NULL
);

 
 2_ Now you are ready to load the JPG data into the image column.
I use Perl to open the JPG file and dump the contents into the table,
and the resulting query looks something like:

INSERT INTO images SET image=here goes contents of the JPG file;

Perl code that does this job would look like:

local ($/);
sysopen (JPG, test.jpg, O_RDONLY) or die $!;
$dbh-do(qq|INSERT INTO images SET image=?|, undef, JPG);
close (JPG);

Sorry if you don't know Perl, but you should be able to do similar
thing in any other language you might be using



Good luck!

--  
Sherzod
  



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

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 Crash in my machine

2002-05-20 Thread apples

below is a resolve stack . 
I use tis620 charset (thai) all query of my program with php is normaly command 
such as 'select' 'select count(*)' 'insert' 'update' 'delete' I didn't know why mysqld 
crash help meplease 

root@academic:/tmp# resolve_stack_dump -s /tmp/mysqld.sym -n 
mysqld.stack
0x806b7c4 handle_segfault__Fi + 428
0x8114138 pthread_sighandler + 184
0x810f907 thai2sortable + 407
0x810f9a1 my_strnncoll_tis620 + 41
0x80e010d _mi_key_cmp + 397
0x80e26b9 _mi_seq_search + 209
0x80ef1f9 _mi_search_pos + 121
0x80ef49e _mi_record_pos + 126
0x80ef383 mi_records_in_range + 131
0x80b3045 records_in_range__9ha_myisamiPCcUi16ha_rkey_functionT2UiT4 + 
41
0x80ab284 check_quick_keys__FP13st_qsel_paramUiP7SEL_ARGPcUiT3Ui + 
1204
0x80ac687 check_quick_select__FP13st_qsel_paramUiP7SEL_ARG + 87
0x80a8274 test_quick_select__10SQL_SELECTUlUlUlb + 1140
0x8089ea6 
make_join_statistics__FP4JOINP13st_table_listP4ItemP16st_dynamic_array + 
2594
0x8088585 
mysql_select__FP3THDP13st_table_listRt4List1Z4ItemP4ItemP8st_orderT4T3T4
UiP13select_result + 1845
0x80721dd mysql_execute_command__Fv + 793
0x80760e0 mysql_parse__FP3THDPcUi + 216
0x8071401 do_command__FP3THD + 1477
0x80707e7 handle_one_connection__FPv + 647

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

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




Performances with BLOB fields in mySql

2002-05-20 Thread marco_ratto

My application (C++, mySql++, WINNT) is very time-critical and space-critical and use 
blob field.
How can I improve performances? 
Which parameters can I set? 
There's literature about this question?
 
Thak's, I'm sorry for my English.
Bye, Marco


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

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 message....somewhat lost

2002-05-20 Thread Gelu Gogancea

Hi,
After mysql installation you MUST run the mysql_install_db script which is
located (usualy) in /usr/bin... so, go to in this directory and type :
./mysql_install_db.

Regards,
Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Simon K. Chan [EMAIL PROTECTED]
To: Mysql Help [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 8:14 AM
Subject: error messagesomewhat lost



  Hi All,

  The other day, I tried connecting to mysql
  via the good old

 mysql -u me -p

  but I got a message saying that my mysql.sock is missing
  from the tmp folder.  After checking the mailing list
  archive, I decided (well, guessed is the more appropriate word)
  that I could try to re-start the daemon:

  bin/safe_mysqld --log 

  But i get this error message:
  The file /usr/local/mysql/libexec/mysqld doesn't exist or
  is not executable
  Please do a cd to the mysql installation directory and restart
  this script from there as follows:
  ./bin/safe_mysqld.

  Now I'm really confused!!  I tried entering a) ./bin/safe_mysqld and b)
./bin/safe_mysqld.
  (thinking that the period is part of the command...) but that didn't
work.
  a) just gets me the same error message and b) isn't even a command! :-(

  Comments?

  Many thanks!

 simon

  __
  Do You Yahoo!?
  LAUNCH - Your Yahoo! Music Experience
  http://launch.yahoo.com



 =
 #

 Warmest Regards,
 Simon K. Chan - [EMAIL PROTECTED]

 Great spirits have always encountered violent opposition from mediocre
minds.  - Albert Einstein

 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.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-##L=##[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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: INSERTING BLOB Fields in a Table

2002-05-20 Thread Neville Lewis


How would u insert thru the SQL prompt an Image file and once inserted what
is the process 
of accessing it.
I have a free server space with mysql db  as such I cant create subfolders
with access privileges. So if I jus store the path in the DB  display the
path later, any one can just type that path and access all those pictures.

Does anyone know how to load an image or doc file into a Mysql DB directly
from the SQL prompt? 

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

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




Re: please help a newbie!

2002-05-20 Thread Victoria Reznichenko

Mohamadally,
Monday, May 20, 2002, 4:53:05 AM, you wrote:

M I believe this question is very simple and hope u ppl can
M help me out. Well i'm trying to develop a site using
M chinese characters where my users
M can login. I'm suppose to store their username which will
M be in chinese character in mysql . I tried looking for info
M abt it but in vain. Does mysql support chinese char ? if
M not wht shd i do... i can only use
M mysql. 
M Mr Son nguyen can you please tell me how u did the magic of
M using viet char?

Take a look at such character sets as gbk, gb2312, big5. 
How to set up new character set read at:
  http://www.mysql.com/doc/C/h/Character_sets.html
  http://www.mysql.com/doc/M/u/Multi-byte_characters.html

Currently you can run mysqld only with one charset. so, if you 
want to use another charset you should restart MySQL server or 
start another instance of mysqld.

M thank you very much for your help and comprehension.
M regards,
M ally




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




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

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




Re: error message....somewhat lost!

2002-05-20 Thread Egor Egorov

Simon,
Monday, May 20, 2002, 8:08:50 AM, you wrote:

SKC The other day, I tried connecting to mysql
SKC via the good old

SKC mysql -u me -p

SKC but I got a message saying that my mysql.sock is missing
SKC from the tmp folder.  After checking the mailing list
SKC archive, I decided (well, guessed is the more appropriate word)
SKC that I could try to re-start the daemon:

SKC bin/safe_mysqld --log 

SKC But i get this error message:
SKC The file /usr/local/mysql/libexec/mysqld doesn't exist or
SKC is not executable
SKC Please do a cd to the mysql installation directory and restart
SKC this script from there as follows:
SKC ./bin/safe_mysqld.

SKC Now I'm really confused!!  I tried entering a) ./bin/safe_mysqld and b) 
./bin/safe_mysqld.
SKC (thinking that the period is part of the command...) but that didn't work.
SKC a) just gets me the same error message and b) isn't even a command! :-( 

SKC Comments? 

Simon, what OS do you use? What is your MySQL distribution? Are you
sure that MySQL server is installed? Check where your mysqld is
located and run mysqld from this dir. Also check your permissions.
There are a lot of things that can cause that kind of errors... 

SKC Many thanks!





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



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

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




Re: Re: store JPG in MySQL DB

2002-05-20 Thread Victoria Reznichenko

Sameer,
Monday, May 20, 2002, 11:17:48 AM, you wrote:

SM   Can you please put some light on it.. How i can do it, or is
SM   it described in manual

You can insert file into BLOB field using INSERT statement and
retrieve file using SELECT.
To insert file you can use LOAD_FILE() function:
  http://www.mysql.com/doc/S/t/String_functions.html

In other cases don't forget to escape chars:
  http://www.mysql.com/doc/S/t/String_syntax.html

SM   Sameer




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




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

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




reusing auto-increment values

2002-05-20 Thread Martin Skjöldebrand

Hi,

It's kind of embarrasing this, but ...
How do I resuse autoincremented values after a delete? Do I specify it
in the table somehow?

Like _not_ having

table
1   cat
2   dog
4   zebra
9   elephant

after a few deleted animals. Preferably

1   cat
2   dog
3   zebra
4   elephant
5   snake
etc

As I said it's embarrasing ... and I didn't even had a bad fall or
anything, and I can't find it on www.mysql.com.

/M.



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

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




Re: reusing auto-increment values

2002-05-20 Thread Peter Hicks

Hi Martin

What about using a REPLACE or UPDATE rather than a DELETE/INSERT?


Peter.


On 20 May 2002, Martin Skjöldebrand wrote:

 Hi,

 It's kind of embarrasing this, but ...
 How do I resuse autoincremented values after a delete? Do I specify it
 in the table somehow?

 Like _not_ having

 table
 1   cat
 2   dog
 4   zebra
 9   elephant

 after a few deleted animals. Preferably

 1   cat
 2   dog
 3   zebra
 4   elephant
 5   snake
 etc

 As I said it's embarrasing ... and I didn't even had a bad fall or
 anything, and I can't find it on www.mysql.com.

 /M.



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

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



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

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




MyISAM internal algorithms

2002-05-20 Thread Jan Peuker

Hi MySQL-Team,

my question is about MySQL(which means MyISAM) internal sorting/storeing
algorithms. I found some hints in the manual (How MySQL  ... e.g. store
tables), but not exactly what I want. I don't need any exact information or
code fragments (I fell down my chair when I took a first look to the
source), it's just a point of my interest how MySQL manages datasets. One of
my professionals told me that it would have something to do with
B-(2-3-4)-Trees that are the best solution for reading blocks from disks,
and that indexes would be stored in Binary-sorted-Trees or Tries. Do you
have any short description of this for me?
Thanks a lot,

Jan Peuker


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

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 message....somewhat lost

2002-05-20 Thread Gelu Gogancea

...sorry ... idon't read carefully your message...
check with :
whereis mysqld
... if is in /usr/libexec then check if is executable.
If is in other directory whereis tell you and you can move mysqld from
whereis to /usr/libexec.


- Original Message -
From: Simon K. Chan [EMAIL PROTECTED]
To: Mysql Help [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 8:14 AM
Subject: error messagesomewhat lost



  Hi All,

  The other day, I tried connecting to mysql
  via the good old

 mysql -u me -p

  but I got a message saying that my mysql.sock is missing
  from the tmp folder.  After checking the mailing list
  archive, I decided (well, guessed is the more appropriate word)
  that I could try to re-start the daemon:

  bin/safe_mysqld --log 

  But i get this error message:
  The file /usr/local/mysql/libexec/mysqld doesn't exist or
  is not executable
  Please do a cd to the mysql installation directory and restart
  this script from there as follows:
  ./bin/safe_mysqld.

  Now I'm really confused!!  I tried entering a) ./bin/safe_mysqld and b)
./bin/safe_mysqld.
  (thinking that the period is part of the command...) but that didn't
work.
  a) just gets me the same error message and b) isn't even a command! :-(

  Comments?

  Many thanks!

 simon

  __
  Do You Yahoo!?
  LAUNCH - Your Yahoo! Music Experience
  http://launch.yahoo.com



 =
 #

 Warmest Regards,
 Simon K. Chan - [EMAIL PROTECTED]

 Great spirits have always encountered violent opposition from mediocre
minds.  - Albert Einstein

 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.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-##L=##[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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Join takes way too long. How to optimize this smal query?

2002-05-20 Thread andy

Hi there,

after reading a nice articel on normalisation, I did split my tables and now
I am suffering performance lost.

this query (finding out the amount of user which have posted an article on
germany) takes 4.5 s:

SELECT count(DISTINCT user_recommending)
FROM recommendations t
INNER JOIN geo.cities AS c ON t.city_id = c.ID AND c.country_code = 'gm'

Is there a way to optimize it? The recommendationstable has a city and city
table has the corresponding country_code.
So the city table has 2.5 million entries and the recommendations table
32733..

Explain results in:

| table | type   | possible_keys| key  |
key_len | ref   | rows  | Extra   |
+---++--+--+
-+---+---+-+
| t | index  | idx_search_engine_cityid | idx_search_for_same_spot |
6 | NULL  | 32733 | Using index |
| c | eq_ref | PRIMARY,idx_cp   | PRIMARY  |
3 | t.city_id | 1 | where used  |

Has anybody a good trick to solve boost it to a 0. time?

Thanx, Andy


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

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




Re: Join takes way too long. How to optimize this smal query?

2002-05-20 Thread Gelu Gogancea

Hi,
Read  5.4.3 How MySQL Uses Indexes from documentation.

Regards,
Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: andy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 1:48 PM
Subject: Join takes way too long. How to optimize this smal query?


 Hi there,

 after reading a nice articel on normalisation, I did split my tables and
now
 I am suffering performance lost.

 this query (finding out the amount of user which have posted an article on
 germany) takes 4.5 s:

 SELECT count(DISTINCT user_recommending)
 FROM recommendations t
 INNER JOIN geo.cities AS c ON t.city_id = c.ID AND c.country_code = 'gm'

 Is there a way to optimize it? The recommendationstable has a city and
city
 table has the corresponding country_code.
 So the city table has 2.5 million entries and the recommendations table
 32733..

 Explain results in:

 | table | type   | possible_keys| key  |
 key_len | ref   | rows  | Extra   |

+---++--+--+
 -+---+---+-+
 | t | index  | idx_search_engine_cityid | idx_search_for_same_spot |
 6 | NULL  | 32733 | Using index |
 | c | eq_ref | PRIMARY,idx_cp   | PRIMARY  |
 3 | t.city_id | 1 | where used  |

 Has anybody a good trick to solve boost it to a 0. time?

 Thanx, Andy


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

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




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

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




optimisation trouble

2002-05-20 Thread Fabien Penso


Hi!

I got a problem I'm trying to fix with no luck. I got 2 tables :

CREATE TABLE news (
  id int(6) NOT NULL auto_increment,
  topic_id int(3) NOT NULL,
  section_id int(3) NOT NULL,
  author_id int(6) NOT NULL,
  lang_id int(2) NOT NULL,
  user_id int(6) DEFAULT '0' NOT NULL,
  state int(1) DEFAULT '0' NOT NULL,
  main_page int(1) DEFAULT '0' NOT NULL,
  timestamp timestamp(14),
  title varchar(150) DEFAULT '' NOT NULL,
  departement tinytext,
  ip varchar(9) NOT NULL,
  KEY id (id,topic_id,section_id,author_id)
);
CREATE TABLE news_body (
  id int(6) NOT NULL auto_increment,
  body blob NOT NULL,
  content_type varchar(16) DEFAULT 'text/plain' NOT NULL,
  KEY id (id)
);

(and few more but it doesn't matter). A select gives me :

desc SELECT 
news.id,news.timestamp,news.title,news.departement,news.author_id,news_body.body,news_body.content_type,topics.topic,sections.section,news_author.name,news_author.contact
 FROM news_body,news,topics,sections,news_author WHERE news.id=news_body.id AND 
news.author_id=news_author.id AND news.topic_id=topics.id AND 
news.section_id=sections.id AND news.state='1' AND news.main_page='1' order by 
news.timestamp desc LIMIT 10;
+-++---+-+-+-+--+-+
| table   | type   | possible_keys | key | key_len | ref | rows | 
|Extra   |
+-++---+-+-+-+--+-+
| news_body   | ALL| PRIMARY   | NULL|NULL | NULL| 7853 | 
|Using temporary; Using filesort |
| news| eq_ref | PRIMARY   | PRIMARY |   4 | news_body.id|1 | 
|where used  |
| topics  | eq_ref | PRIMARY   | PRIMARY |   4 | news.topic_id   |1 |  
|   |
| sections| eq_ref | PRIMARY   | PRIMARY |   4 | news.section_id |1 |  
|   |
| news_author | eq_ref | PRIMARY   | PRIMARY |   4 | news.author_id  |1 |  
|   |
+-++---+-+-+-+--+-+

and it takes about 1.5sec to run. If I try without the order by
news.timestamp desc then it takes 0.08sec. I tried things like :

alter table news add index timestamp(timestamp) but it doesn't make
things faster. I did read the mysql documentation, but I don't see how
to fix that. Would it be better to put the body into the news table ? 

If anyone has an idea, feel free to say so :-) (except to have 2
selects, one for the news, and another for the news_body table).

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/


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

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




Re: Re: store JPG in MySQL DB

2002-05-20 Thread Sameer Maggon

Hi,
  That explains me a problem but i could not see strmov()
  function any where, while linking with -lmysqlclient also
  it gives unreferenced function..

  I am using Mysql 3.23

  Please help 
  Sameer

--
you wrote:

Sameer,
Monday, May 20, 2002, 11:17:48 AM, you wrote:

SM   Can you please put some light on it.. How i can do it, or is
SM   it described in manual

You can insert file into BLOB field using INSERT statement and
retrieve file using SELECT.
To insert file you can use LOAD_FILE() function:
  http://www.mysql.com/doc/S/t/String_functions.html

In other cases don't forget to escape chars:
  http://www.mysql.com/doc/S/t/String_syntax.html

SM   Sameer




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







--
http://www.dypatil.edu For Better tomorrow

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

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: Storing UTF-8 text with MM.MySQL 2.0.13 driver.

2002-05-20 Thread Ronald Muller

This code works fine, which shows you can use the useUnicode and
characterEncoding properties with simple Statement's:

Properties prop = new Properties();
Class.forName(org.gjt.mm.mysql.Driver);
// true as String and not: Boolean.valueOf(true)!
prop.put(useUnicode, true);
prop.put(characterEncoding, UTF-8);
con = DriverManager.getConnection(dbUrl, prop);
String s = \u20AC (euro) \u2126 (ohm);
Statement stm = con.createStatement();
stm.executeUpdate(DROP TABLE IF EXISTS TestUnicode);
stm.executeUpdate(CREATE TABLE TestUnicode (code VARCHAR(128)));
stm.executeUpdate(INSERT INTO TestUnicode (code) VALUES (\'+s+\'));
ResultSet rs = stm.executeQuery(SELECT code FROM TestUnicode);
if (!rs.next()) {
 System.err.println(No row?!);
} else {
 System.out.println(s.equals(rs.getString(code)) ? OK : FAILED);
}
...

The downside is that the stored String does NOT appear correct in the
SQL tools (for instance MySqlManager). I *think* the problem is that
MySQL is not using UNICODE. 
Is there a workaround for this issue??

Ronald


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

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




Binary Data mysql_real_escape_

2002-05-20 Thread Sameer Maggon

Hi,
  Please see the code given below::
  
  // 
  
  strcpy(query,INSERT INTO blobtest VALUES('abc',');
  qptr = query;
  len = strlen(query);
  qptr += len;
  qptr += mysql_real_escape_string(mysql, qptr, data, iBytesRead);
  *qptr += '\'';
  *qptr += ')';

  mysql_real_query(mysql,query, (unsigned int)( qptr - query));
  printf(error = %s, mysql_error(mysql));

  //

  It gives the error


 error = You have an error in your SQL syntax 
near ''ÿØÿà\0^PJFIF\0^A^A\0\0^
A\0^A\0\0ÿÛ\0C\0^H^F^F^G^F^E^H^G^G^G  
^H\n^L^T\r^L^K^K^L^Y^R^S^O^T^]\Z^_^^^]\Z^\^\ $.\' \'
 at line 1

  HWhat might be the problem
  Please help
  Sameer





--
http://www.dypatil.edu For Better tomorrow

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

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




SELECT would take a very long time

2002-05-20 Thread Jari Mäkelä

Hi,

Got this problem and setting the SQL_BIG_SELECTS=1 is not an option. Is 
there a way to change the WHERE so the query would work?

Error

SQL-query :

SELECT distinct(fincodedesc),
 industry.code,
 industry.level1,
 industry.level2,
 industry.level3,
 industry.level4,
 industry.level5
 FROM industry,branchinfo WHERE
 branchinfo.code1=industry.code OR
 branchinfo.code2=industry.code OR
 branchinfo.code3=industry.code OR
 branchinfo.code4=industry.code OR
 branchinfo.code5=industry.code
 ORDER by industry.code ASC LIMIT 0, 30


MySQL said:

The SELECT would examine too many records and probably take a very long 
time. Check your WHERE and use SET OPTION SQL_BIG_SELECTS=1 if the SELECT is ok

TABLE SCHEMA's

CREATE TABLE industry (
   kid int(11) NOT NULL auto_increment,
   code varchar(8) NOT NULL default '',
   svecodedesc text NOT NULL,
   fincodedesc text NOT NULL,
   level1 varchar(8) NOT NULL default '',
   level2 varchar(8) NOT NULL default '',
   level3 varchar(8) NOT NULL default '',
   level4 varchar(8) NOT NULL default '',
   level5 varchar(8) NOT NULL default '',
   industry_modified timestamp(14) NOT NULL,
   PRIMARY KEY  (kid),
   UNIQUE KEY kid (kid),
   KEY kid_2 (kid,code,level1,level2,level3,level4,level5),
   FULLTEXT KEY svecodedesc (svecodedesc,fincodedesc)
) TYPE=MyISAM;

CREATE TABLE branchinfo (
   did int(10) unsigned NOT NULL auto_increment,
   aid int(10) unsigned default NULL,
   svebranch text,
   finbranch text,
   engbranch text,
   gerbranch text,
   code1 varchar(8) default '0',
   code2 varchar(8) default '0',
   code3 varchar(8) default '0',
   code4 varchar(8) default '0',
   code5 varchar(8) default '0',
   branchinfo_modified timestamp(14) NOT NULL,
   PRIMARY KEY  (did),
   UNIQUE KEY did (did,aid),
   KEY did_2 (did,code1,code2,code3,code4,code5,aid),
   FULLTEXT KEY branchinfo_search (svebranch,finbranch,engbranch,gerbranch)
) TYPE=MyISAM;

jari Mäkelä


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

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 Connection from Webserver

2002-05-20 Thread Sameer Maggon

Hi,
  I am using ASP and using IIS webserver..

  I have a Mysql server installed on a linux box.

  what is the connectstring that i have to use to connect and
  gather data from my Mysql server

  Sameer





--
http://www.dypatil.edu For Better tomorrow

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

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




AW: Mysql Connection from Webserver

2002-05-20 Thread Stefan Siefert

hi,

not sure about this .. but I think you need an ODBC Driver for ASP/MySQL
(like myODBC) .. Connectstring? no clue :)

Stefan Siefert

-Ursprüngliche Nachricht-
Von: Sameer Maggon [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 20. Mai 2002 16:04
An: [EMAIL PROTECTED]
Betreff: Mysql Connection from Webserver


Hi,
  I am using ASP and using IIS webserver..

  I have a Mysql server installed on a linux box.

  what is the connectstring that i have to use to connect and
  gather data from my Mysql server

  Sameer





--
http://www.dypatil.edu For Better tomorrow

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

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




password for databases

2002-05-20 Thread naveed abdul

Dear sir,
Iam created different databases using mysql.
I want to put different passwords and users  for
different databses.Is it possible.
If possible how?


Waiting for your replay

=

naveed abdul
Software Engineer
IndiaCompuMaster Ltd.,


__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.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: ISAMCHK utility - MySQL server - 3.21.33b

2002-05-20 Thread Sheni R. Meledath

Hi,

Many Thanks. I couldn't find out the isamchk utility on our server. I tried 
Telnet'ing to the server and typing the command. Its showing command not 
found. Could you please send me more details of this utility.

Regards


At 06:47 PM 5/16/02 +0200, you wrote:
Hi.

Well, what's the problem with using isamchk in detail?

Shut down the mysql daemon, run isamchk on all tables to find out
which are corrupted and run isamchk -r on those. Then restart
mysqld. Do not forget to make backup copies of the tables in question
beforehand, in case anything unexpected happens.

You can get more information about your version of isamchk with
isamchk --help.

If you still have some problem, please describe in detail what you
have tried and where you got stuck.

Bye,

 Benjamin.

On Thu, May 16, 2002 at 10:56:27AM +0400, [EMAIL PROTECTED] wrote:
  Hello:
 
  Can anybody help me out to repair my database  tables using ISAMCHK
  utility. The MySQL server version is 3.21.33b installed on BSD server.
 
  Many thanks
  Sheni
 
  Details of the problem that we are facing now:
 
  We are facing a serious problem with the MySQL server installed on our web
  server (BSD/OS). The server was working fine till last week. Since then it
  started crashing. It crashes 2-3 times a day. Every time we have to kill
  the process and restart the server (UNIX). Not only the MySQL server the
  entire server crashes because of the load on the CPU.
 
  ###CPU STATE###
  load averages: 1.00, 1.00, 0.92 02:47:57
  278 processes: 13 running, 265 sleeping
  CPU states: 0.0% user, 98.4% nice, 1.6% system, 0.0% interrupt, 0.0% idle
  Memory: Real: 40M/94M Virt: 217M/1481M Free: 342M
  PID PRI NICE SIZE  RESSTATE  TIME  WCPU   CPUCOMMAND
  270 94  44420K 2024K  run43:48 97.17% 97.17% mysqld
  ##
 
  The MySQL version is 3.21.33b . Since its an old version I couldn't find
  out any information regarding the issue from the MySQL web site.
 
  We have got 4-5 MySQL databases on this server.
[...]

--
[EMAIL PROTECTED]

Sheni R Meledath
[EMAIL PROTECTED]


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

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




RE: password for databases

2002-05-20 Thread Jay Blanchard

[snip]
Iam created different databases using mysql.
I want to put different passwords and users  for
different databses.Is it possible.
If possible how?
[/snip]

http://www.mysql.com/doc/A/d/Adding_users.html

http://www.mysql.com/doc/G/R/GRANT.html

http://www.mysql.com/doc/A/c/Access_denied.html

http://www.mysql.com/doc/S/e/Security.html

HTH!

Jay

We are all apparently 'net' literate, why don't we use it to get the
information we need? After all, isn't that what a Google search is all
about?



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

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




UPDATE question, SQL syntax, etc.

2002-05-20 Thread .ben

hi.  i'm new to the list and have only been playing with mySQL for a few
weeks now, i have a question regrading the syntax of an UPDATE statement - i
hope nobody minds me asking.

i want to uopdate a table with the data from another, i've written the
following:

update trackinfo SET trackinfo.postcode = newtrackinfo.postcode FROM
trackinfo, newtrackinfo WHERE trackinfo.telephone = newtrackinfo.telephone;

it should update trackinfo with the postcodes from newtrackinfo, as long as
the telephone numbers match - but i get an errror - it complains about the
'FROM...' onwards.

am i missign something simple?

cheers,

 .ben


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

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 --failed to install service

2002-05-20 Thread Neville Lewis

I am trying to start up mysql on win2000 machine using the following

 mysqld-nt --install

I get an error saying failed to install service

how do I get round this  the docs say to use the folowing:

 mysqld-max-nt --install

this turns out to be not recognized as a command 

how do I start mysql as a service so that the daemon runs everytime
I boot the machine

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

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: UPDATE question, SQL syntax, etc.

2002-05-20 Thread Jay Blanchard

[snip]
update trackinfo SET trackinfo.postcode = newtrackinfo.postcode FROM
trackinfo, newtrackinfo WHERE trackinfo.telephone = newtrackinfo.telephone;
[/snip]

http://www.mysql.com/doc/U/P/UPDATE.html
MySQL does not support sub-queries, such as the one you are attempting here.
(the FROM on..) You could try INSERT...SELECT
http://www.mysql.com/doc/I/N/INSERT_SELECT.html
or REPLACE...SELECT
http://www.mysql.com/doc/R/E/REPLACE.html

The REPLACE is probably what you're looking for, but be careful, REPLACE
works exactly like INSERT, except that if an old record in the table has the
same value as a new record on a unique index, the old record is deleted
before the new record is inserted. 

HTH!

Jay

We are all apparently 'net' literate, why don't we use it to get the
information we need? After all, isn't that what a Google search is all
about?



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

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: optimisation trouble

2002-05-20 Thread Fabien Penso


Hi!

Mon, 20 May 2002 21:30:52 +0900, tu as dit : 

  Hi, You are look like very tired...

  I have a good idea!!!

  See fellowing line.  alter table TABLE_NAME add index (timestamp
  desc);

  import point is index(timestamp desc).  you did not set index of
  timestamp, so your query has been slow

  You can your query fast by adding index timestamp and you must add
  'desc' after 'timestamp' 

  The reason to add 'desc' is that index of timestamp is ordered
  automatically and rebuilded index structure when table is inserted some
  data...

  So... Complete script is alter table TABLE_NAME add index (timestamp
  desc); ;

I have just tried this, but it still takes 1.5sec to run the
select... :-(

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/


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

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




SQL join help

2002-05-20 Thread Ray Zimmerman

Dear list,

I've done basic SQL for a number of years, but I recently came up 
against a query I can't quite seem to figure out the join syntax for.

Suppose I have rows in an Object table which are linked in a 
hierarchy by the entries in a Link table and I want to find all 
Objects which have given set of Objects as children.

For example, given the following data ...

   CREATE TABLE Object (
 id int(11) NOT NULL auto_increment,
 PRIMARY KEY  (id)
   );

   INSERT INTO Object (id) VALUES (1);
   INSERT INTO Object (id) VALUES (2);
   INSERT INTO Object (id) VALUES (3);
   INSERT INTO Object (id) VALUES (4);
   INSERT INTO Object (id) VALUES (5);
   INSERT INTO Object (id) VALUES (6);

   CREATE TABLE Link (
 parent int(11) NOT NULL,
 child  int(11) NOT NULL,
   );

   INSERT INTO Link (parent, child) VALUES (1, 4);
   INSERT INTO Link (parent, child) VALUES (1, 5);
   INSERT INTO Link (parent, child) VALUES (2, 4);
   INSERT INTO Link (parent, child) VALUES (2, 5);
   INSERT INTO Link (parent, child) VALUES (2, 6);
   INSERT INTO Link (parent, child) VALUES (3, 4);

... I want to find all Objects that have exactly 2 children with ids 
4 and 5  (i.e. should match 1, but not 2 or 3) ... what's the query 
syntax?

How about if I want to find all Objects which have no children (i.e. 
should match 4, 5 and 6, but not 1, 2 or 3).

TIA,

-- 
  Ray Zimmerman  / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall
   Sr Research  /   phone: (607) 255-9645  /  Cornell University
Associate  /  FAX: (815) 377-3932 /   Ithaca, NY  14853

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

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 --failed to install service

2002-05-20 Thread Alec . Cawley



You said:

 I am trying to start up mysql on win2000 machine using the following

  mysqld-nt --install

 I get an error saying failed to install service

 how do I get round this  the docs say to use the folowing:

  mysqld-max-nt --install

 this turns out to be not recognized as a command

 how do I start mysql as a service so that the daemon runs everytime
 I boot the machine

Are you sure yout typed *exactly* as given? I got problems when I
typed
 c:\mysql\bin\mysqld-nt --install

but not when I typed
 cd c:\mysql\bin
 mysqld-nt --install

Alec



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

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




Is this a Bug?: Query returns an unexpected result.

2002-05-20 Thread Ichinichi Ichizen
Description:

Query returns an unexpected result.

How-To-Repeat:

run the script below:
-
create table member
(
 userid int(11) primary key auto_increment,
 mailaddress char(40) not null
);

insert into member values (null,'[EMAIL PROTECTED]');
insert into member values (null,'[EMAIL PROTECTED]');

create table orders
(
 orderid int(11) primary key auto_increment,
 userid int(11) not null,
 placedate datetime,
 status enum('WORKING','ACCEPTED','CANCELED','SHIPPED'),
 comments char(255)
);

insert into orders values (null,1,sysdate(),'ACCEPTED',null);
insert into orders values (null,2,sysdate(),'ACCEPTED',null);

alter table orders add
(
 contact_date datetime,
 payment_date datetime,
 shipping_date datetime,
 followup_date datetime,
 cancel_date datetime
);

update orders set shipping_date=sysdate();
update orders set cancel_date=sysdate() where orderid=1;

select
o.orderid,
o.shipping_date,
o.cancel_date
from orders o, member u
where o.userid = u.userid;

select
o.orderid,
o.shipping_date,
o.cancel_date
from orders o, member u
where o.userid = u.userid
and o.orderid = 1;
-
the results of the last two queries are:

orderid shipping_date   cancel_date
1   2002-05-20 21:50:24 NULL
2   2002-05-20 21:50:24 NULL
orderid shipping_date   cancel_date
1   2002-05-20 21:50:24 2002-05-20 21:50:24

in the first query, cancel_date should not be null for orderid=1.



MySQL support:  none
Severity:   serious
Priority:   high
Category:   mysqld
Class:  support
Release:mysql-3.23.38

Exectutable:   mysqld-nt
System:Win200


__
Do You Yahoo!?
Yahoo! BB is Broadband by Yahoo!
http://bb.yahoo.co.jp/


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

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: optimisation trouble

2002-05-20 Thread Jay Blanchard

[snip]
I have just tried this, but it still takes 1.5sec to run the
select... :-(
[/snip]

Fabien,

How many records do you have in each table? And just how fast do you want
this query to be? 1.5 seconds may be optimal for a query this large. Perhaps
the only thing you could do at this point is beef up your server.

Jay

We are all apparently 'net' literate, why don't we use it to get the
information we need? After all, isn't that what a Google search is all
about?



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

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

2002-05-20 Thread Suresh Pun

Hi
 I have installed mysql server and client version using command.

# rpm -i MySQL-3.23.49a-1.i386.rpm MySQL-client-3.23.49a-1.i386.rpm

I am trying to change root password but i am not able to change it.
 
# /usr/bin/mysqladmin -u root -p password new-password
Enter password:   (   I just pressed Enter here )
mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password:NO)'
 
# 
The above error come's wether I press Enter or type anything.
Pls help me .

Suresh.


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

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: UPDATE question, SQL syntax, etc.

2002-05-20 Thread Nick Stuart

There is no from clause in the update syntax. However, I'm not sure how
you would update a tablethe way you are trying to. I'm sure it can be done, and your 
SQL looks
correct besides the fromclause. Just take that out and see if what it says.

-Nick

 hi.  i'm new to the list and

have only been playing with mySQL for a
 few weeks now, i have a question regrading the

syntax of an UPDATE
 statement - i hope nobody minds me asking.

 i want to uopdate a

table with the data from another, i've written the
 following:

 update trackinfo

SET trackinfo.postcode = newtrackinfo.postcode FROM
 trackinfo, newtrackinfo
WHERE
trackinfo.telephone =
 newtrackinfo.telephone;

 it should update
trackinfo
with the postcodes from newtrackinfo, as
 long as the telephone numbers
match - but i get an
errror - it
 complains about the 'FROM...' onwards.

 am i missign
something
simple?

 cheers,

 .ben


 -
 Before posting, please
check:

http://www.mysql.com/manual.php   (the manual)

http://lists.mysql.com/   (the list
archive)

 To request this thread, e-mail mysql-
[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




synopsis of the problem (one line)

2002-05-20 Thread sfsanchez

Description:

How-To-Repeat:

Fix:


Submitter-Id:  submitter ID
Originator:Sebastian F. Sanchez
Organization:
 
MySQL support: [none | licence | email support | extended email support ]
Synopsis:  
Severity:  
Priority:  
Category:  mysql
Class: 
Release:   mysql-3.23.49a (Official MySQL Binary)

Environment:

System: Linux localhost 2.4.2-2 #1 Sun Apr 8 20:41:30 EDT 2001 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 2731 (Red Hat Linux 7.1 2.96-81)
Compilation info: CC='gcc'  CFLAGS='-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro 
-O3 -fno-omit-frame-pointer'  CXX='gcc'  CXXFLAGS='-Wimplicit -Wreturn-type 
-Wid-clash-51 -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat 
-Wimplicit-function-dec -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings 
-Woverloaded-virtual -Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy 
-Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpro -O3 
-fno-omit-frame-pointer'  LDFLAGS=''
LIBC: 
lrwxrwxrwx1 root root   13 feb 28 15:46 /lib/libc.so.6 - libc-2.2.2.so
-rwxr-xr-x2 root root  1236396 abr  6  2001 /lib/libc-2.2.2.so
-rw-r--r--1 root root 26350254 abr  6  2001 /usr/lib/libc.a
-rw-r--r--1 root root  178 abr  6  2001 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler 
--with-extra-charsets=complex --enable-thread-safe-client 
--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static 
--with-other-libc=/usr/local/mysql-glibc '--with-comment=Official MySQL Binary' 
--prefix=/usr/local/mysql --with-extra-charset=complex --enable-thread-safe-client 
--enable-local-infile 'CFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro 
-O3 -fno-omit-frame-pointer' 'CXXFLAGS=-Wimplicit -Wreturn-type -Wid-clash-51 -Wswitch 
-Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-function-dec 
-Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual 
-Wextern-inline -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor 
-felide-constructors -fno-exceptions -fno-rtti -mcpu=pentiumpr!
o -O3 -fno-omit-frame-pointer' CXX=gcc


I have the following problem:
 When I rung the safe_mysqld script I got:

 Starting mysqld daemon with databases from 
/home/sanchez/mysql-3.23.49a-pc-linux-gnu-i686/data
020520 14:46:44  mysqld ended

And crashes!

Thanks all!

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

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: UPDATE question, SQL syntax, etc.

2002-05-20 Thread .ben

cheers for the responses.  i'll have to find another way, but thanks.

 .b

 -Original Message-
 From: Nick Stuart [mailto:[EMAIL PROTECTED]]
 Sent: 20 May 2002 13:46
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: UPDATE question, SQL syntax, etc.
 
 
 There is no from clause in the update syntax. However, I'm not sure how
 you would update a tablethe way you are trying to. I'm sure it 
 can be done, and your SQL looks
 correct besides the fromclause. Just take that out and see if 
 what it says.
 
 -Nick
 
  hi.  i'm new to the list and
 
 have only been playing with mySQL for a
  few weeks now, i have a question regrading the
 
 syntax of an UPDATE
  statement - i hope nobody minds me asking.
 
  i want to uopdate a
 
 table with the data from another, i've written the
  following:
 
  update trackinfo
 
 SET trackinfo.postcode = newtrackinfo.postcode FROM
  trackinfo, newtrackinfo
 WHERE
 trackinfo.telephone =
  newtrackinfo.telephone;
 
  it should update
 trackinfo
 with the postcodes from newtrackinfo, as
  long as the telephone numbers
 match - but i get an
 errror - it
  complains about the 'FROM...' onwards.
 
  am i missign
 something
 simple?
 
  cheers,
 
  .ben
 
 
  -
  Before posting, please
 check:
 
 http://www.mysql.com/manual.php   (the manual)
 
 http://lists.mysql.com/   (the list
 archive)
 
  To request this thread, e-mail mysql-
 [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
 

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

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: password for databases

2002-05-20 Thread Peter Lovatt

Hi

look into GRANT on MySql

Peter

---
Excellence in internet and open source software
---
Sunmaia
www.sunmaia.net
[EMAIL PROTECTED]
tel. 0121-242-1473
--- 

 -Original Message-
 From: naveed abdul [mailto:[EMAIL PROTECTED]]
 Sent: 20 May 2002 13:06
 To: [EMAIL PROTECTED]
 Subject: password for databases
 
 
 Dear sir,
 Iam created different databases using mysql.
 I want to put different passwords and users  for
 different databses.Is it possible.
 If possible how?
 
 
 Waiting for your replay
 
 =
 
 naveed abdul
 Software Engineer
 IndiaCompuMaster Ltd.,
 
 
 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.yahoo.com
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

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

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




Re: Join takes way too long. Query optimizing, or denormalizing?

2002-05-20 Thread andy

I guess this is not an issue on the index. Explain select says it is using
the index. So I assume, that I did just write down the join syntax wrong.
MySQL is joining all 32000 records with the city table and then looks for
the country code. So this looks ok to me. Maybe I should denormalize my data
and include the country code in the other table as well?

Andy
- Original Message -
From: Gelu Gogancea [EMAIL PROTECTED]
To: andy [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 1:00 PM
Subject: Re: Join takes way too long. How to optimize this smal query?


 Hi,
 Read  5.4.3 How MySQL Uses Indexes from documentation.

 Regards,
 Gelu
 _
 G.NET SOFTWARE COMPANY

 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: andy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 20, 2002 1:48 PM
 Subject: Join takes way too long. How to optimize this smal query?


  Hi there,
 
  after reading a nice articel on normalisation, I did split my tables and
 now
  I am suffering performance lost.
 
  this query (finding out the amount of user which have posted an article
on
  germany) takes 4.5 s:
 
  SELECT count(DISTINCT user_recommending)
  FROM recommendations t
  INNER JOIN geo.cities AS c ON t.city_id = c.ID AND c.country_code = 'gm'
 
  Is there a way to optimize it? The recommendationstable has a city and
 city
  table has the corresponding country_code.
  So the city table has 2.5 million entries and the recommendations table
  32733..
 
  Explain results in:
 
  | table | type   | possible_keys| key  |
  key_len | ref   | rows  | Extra   |
 

+---++--+--+
  -+---+---+-+
  | t | index  | idx_search_engine_cityid | idx_search_for_same_spot |
  6 | NULL  | 32733 | Using index |
  | c | eq_ref | PRIMARY,idx_cp   | PRIMARY  |
  3 | t.city_id | 1 | where used  |
 
  Has anybody a good trick to solve boost it to a 0. time?
 
  Thanx, Andy
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 


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

 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: optimisation trouble

2002-05-20 Thread Fabien Penso

Hi Jay!

Mon, 20 May 2002 07:45:00 -0500, tu as dit : 

  [snip]
  I have just tried this, but it still takes 1.5sec to run the
  select... :-(
  [/snip]

  Fabien,

  How many records do you have in each table? And just how fast do you want
  this query to be? 1.5 seconds may be optimal for a query this large. Perhaps
  the only thing you could do at this point is beef up your server.

Not that large, I got about 8.000 records in each table. I did put the
body out from the news table, so the news table could be small, and
news_body which I don't request all the time would be the bigger one.

If I do 2 selects, one to fetch info from the news table, and then
another one to fetch bodies, it takes much less time, like 0.05 for each
request. Did I miss something ?

I could still use thoses 2 requests, but I'd prefer to merge them into
one, so I don't have to use temporarly variables.

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/


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

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: optimisation trouble

2002-05-20 Thread Jay Blanchard

[snip]
  How many records do you have in each table? And just how fast do you want
  this query to be? 1.5 seconds may be optimal for a query this large.
Perhaps
  the only thing you could do at this point is beef up your server.

Not that large, I got about 8.000 records in each table. I did put the
body out from the news table, so the news table could be small, and
news_body which I don't request all the time would be the bigger one.

If I do 2 selects, one to fetch info from the news table, and then
another one to fetch bodies, it takes much less time, like 0.05 for each
request. Did I miss something ?
[/snip]

You don't say anything about your hardware, which could be a portion of the
problem. If you combine the two queries you have a total return time of 1.0
secs, right? The other 0.5 secs (return time varies with time of day,
traffic etc.) is probably processing overhead. Why is getting below 1.5 secs
so important? Just curious...

Jay

We are all apparently 'net' literate, why don't we use it to get the
information we need? After all, isn't that what a Google search is all
about?



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

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




ERROR 1030: Got error 127 from table handler

2002-05-20 Thread Carter, Robert L (MN65)

Can anyone shed some light on this? Have found that others have
run into this (via Google) but no resolution and no hits at
www.mysql.com. 

A count(*) query returns fine but trying to select the rows 
fails (see log snippet below).

Regards,

Bob

mysql select count(*) from event where sid=9 and cid  694725;
+--+ 
| count(*) | 
+--+ 
| 4925 | 
+--+ 
1 row in set (0.01 sec)  
mysql select * from event where sid=9 and cid  694725 LIMIT 0, 10; 
ERROR 1030: Got error 127 from table handler 
mysql select * from event where sid=9 and cid  694725 LIMIT 0, 10; 
ERROR 1030: Got error 127 from table handler 
mysql select * from event where sid=9 and cid  694725; 
ERROR 1030: Got error 127 from table handler 



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

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




Replication OpenBSD - Linux is failing

2002-05-20 Thread Michal Ludvig

Hi all,
I have a master MySQL server running 3.23.49 on RedHat Linux 7.2 and want 
to setup a slave on OpenBSD 3.0 (both are i386 archs). So I took the 
source (3,23,49 as well), compiled natively and configured as a slave. The 
problem is, that I can't connect to the master: it always fails with:
Access denied for user: 'repl@slave' (Using password: YES)

My /etc/my.cnf on slave is:
[mysqld]
master-host=master
master-user=repl
master-password=ahoj
master-port=3306
server-id=3
datadir=/space/mysql
default-character-set=latin2
log-slave-updates
log=mysql.log

There are two strange things:
1) I can connect from slave to master with the command line mysql:
slave% mysql -h master -u repl -p 
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3463 to server version: 3.23.49-log
[...]
mysql ^D
2) I can connect from different machine (say slave2) running SuSE Linux 
8.0 with exactly the same my.cnf (except different server-id) and 
successfully replicate the database.

Have anyone met the same problems? Can someone try it?

Michal Ludvig


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

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 1030: Got error 127 from table handler

2002-05-20 Thread Weaver, Walt

According to perror, error 127 = Record-file is crashed. This is a symptom
of a corrupted table.

Check out the MySQL manual, 4.4.6.9, How to Repair Tables. Specifically, try
running myisamchk on the table.

--Walt Weaver
  Bozeman, Montana

-Original Message-
From: Carter, Robert L (MN65) [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 20, 2002 7:31 AM
To: '[EMAIL PROTECTED]'
Subject: ERROR 1030: Got error 127 from table handler


Can anyone shed some light on this? Have found that others have
run into this (via Google) but no resolution and no hits at
www.mysql.com. 

A count(*) query returns fine but trying to select the rows 
fails (see log snippet below).

Regards,

Bob

mysql select count(*) from event where sid=9 and cid  694725;
+--+ 
| count(*) | 
+--+ 
| 4925 | 
+--+ 
1 row in set (0.01 sec)  
mysql select * from event where sid=9 and cid  694725 LIMIT 0, 10; 
ERROR 1030: Got error 127 from table handler 
mysql select * from event where sid=9 and cid  694725 LIMIT 0, 10; 
ERROR 1030: Got error 127 from table handler 
mysql select * from event where sid=9 and cid  694725; 
ERROR 1030: Got error 127 from table handler 



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

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

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

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




Re: Problem with join syntax

2002-05-20 Thread Roger Baklund

* andy [EMAIL PROTECTED]
 thank you roger for your reply.

 I am wondering how to form the stmt if I do already know the user_id

 I tryed this, but it does not work though. Anyhow there has to be a from
 field. But on which table?

 SELECT w.website, c.comment
LEFT JOIN user_websites AS w ON w.user_id =  '10'
LEFT JOIN user_comments AS c ON c.user_id =  '10'

That is correct, when you use LEFT JOIN (or any join, actually) you must
select FROM one table, and then JOIN with the other table(s).

Try this:

SELECT w.website, c.comment
FROM user_websites AS w
LEFT JOIN user_comments AS c ON c.user_id = w.user_id
WHERE w.user_id = '10'

Note that the ON expression contains one field from each of the two tables.
This expression is also known as the 'join condition'. It is perfectly legal
to use a constant, like you did, but that will not be possible in most
cases, like if you want to list more than one user.

The above statement will list the website for the user with id '10', even if
he does not have an associated comment, because of the LEFT JOIN. The
following statement would only find website-rows _with_ comments, ie, if
user_id '10' does not have a comment, you will get 0 rows:

SELECT w.website, c.comment
FROM
  user_websites AS w,
  user_comments AS c
WHERE
  c.user_id = w.user_id AND
  w.user_id = '10'

This statement does not contain the word JOIN, but it is still a joined
select. The comma between the tables in the FROM caluse means 'INNER JOIN'.
This is the _excact_ same statement:

SELECT w.website, c.comment
FROM
  user_websites AS w
INNER JOIN
  user_comments AS c
WHERE
  c.user_id = w.user_id AND
  w.user_id = '10'

...and this is also legal (in versions 3.23.16 and later):

SELECT w.website, c.comment
FROM
  user_websites AS w
INNER JOIN
  user_comments AS c ON c.user_id = w.user_id
WHERE
  w.user_id = '10'

The join condition can be in the WHERE clause, but it is still a join
condition.

I hope this makes things clearer. :)

--
Roger
sql


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

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




Re: license question on libmysql.dll and C/C++ API

2002-05-20 Thread Victoria Reznichenko

babylonian,
Sunday, May 19, 2002, 10:04:00 PM, you wrote:

bgn I have a question on license of MySQL C API or MySQL++ API, and
bgn libmysql.

[hardly skipped]

bgn Is there any good way, or any misconception in my understanding of
bgn libmysql license? Any idea is welcome, but please don't suggest
bgn embracing entire GPL... if it's not possible, then I'll quit touching
bgn MySQL and will start to look PostgreSQL.

If you use 3.23 libmysql, you need no licences.
For 4.0, you should write to [EMAIL PROTECTED] and ask for authorization.

bgn -- Linsey KISANJANI




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




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

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




Re: indexing text fields possible?

2002-05-20 Thread Egor Egorov

andy,
Sunday, May 19, 2002, 7:06:00 PM, you wrote:

a I am wondering if it would be anyhow possible to make a search on a mysql
a textfield faster. Right now the table contains 294000 entries and takes
a about 40 MB of space. Is there a way to apply a index with a resonable
a amount of disk space?

For TEXT column you can index only prefix of the column.

a I am also not so sure if I should use text or
a smalltext columns as the info may vary between 1 and 1000 chars. A query for
a LIKE 'test%' takes about 20 s right now.

There is no SMALLTEXT column type in MySQL :) There are TINYTEXT,
TEXT, MEDIUMTEXT and LONGTEXT.

TINYTEXT allows to store L+1 bytes, where L  256 bytes. So
it's not quite enough for you ...

Take a look at:
 http://www.mysql.com/doc/n/o/node_369.html
You can find info about storage requirements there.

a Thanx for any help on that,
a Andy





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



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

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




Re: synopsis of the problem (one line)

2002-05-20 Thread Egor Egorov

sfsanchez,
Monday, May 20, 2002, 3:49:45 PM, you wrote:

s I have the following problem:
s  When I rung the safe_mysqld script I got:

s  Starting mysqld daemon with databases from 
/home/sanchez/mysql-3.23.49a-pc-linux-gnu-i686/data
s 020520 14:46:44  mysqld ended

Take a look into host_name.err file in the MySQL datadir. Are there
any causes of error?

s And crashes!
s Thanks all!






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



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

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




RE: Join takes way too long. Query optimizing, or denormalizing?

2002-05-20 Thread Roger Baklund

* andy

   SELECT count(DISTINCT user_recommending)
   FROM recommendations t
   INNER JOIN geo.cities AS c ON t.city_id = c.ID AND
   c.country_code = 'gm'

 I guess this is not an issue on the index. Explain select says it is using
 the index. So I assume, that I did just write down the join syntax wrong.
 MySQL is joining all 32000 records with the city table and then looks for
 the country code. So this looks ok to me. Maybe I should
 denormalize my data
 and include the country code in the other table as well?

Try selecting FROM the cities table and JOIN with the recommendations table.

--
Roger
sql


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

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




RE: optimisation trouble

2002-05-20 Thread Roger Baklund

* Fabien Penso
[...]
 Not that large, I got about 8.000 records in each table. I did put the
 body out from the news table, so the news table could be small, and
 news_body which I don't request all the time would be the bigger one.

from your original post:

 FROM news_body,news,

Try ... FROM news, news_body,

-- 
Roger
sql

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

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




Re: SQL join help

2002-05-20 Thread ds

On Mon, 2002-05-20 at 13:34, Ray Zimmerman wrote:
...
 For example, given the following data ...
 
CREATE TABLE Object (
  id int(11) NOT NULL auto_increment,
  PRIMARY KEY  (id)
);
 
INSERT INTO Object (id) VALUES (1);
INSERT INTO Object (id) VALUES (2);
INSERT INTO Object (id) VALUES (3);
INSERT INTO Object (id) VALUES (4);
INSERT INTO Object (id) VALUES (5);
INSERT INTO Object (id) VALUES (6);
 
CREATE TABLE Link (
  parent int(11) NOT NULL,
  child  int(11) NOT NULL,
);
 
INSERT INTO Link (parent, child) VALUES (1, 4);
INSERT INTO Link (parent, child) VALUES (1, 5);
INSERT INTO Link (parent, child) VALUES (2, 4);
INSERT INTO Link (parent, child) VALUES (2, 5);
INSERT INTO Link (parent, child) VALUES (2, 6);
INSERT INTO Link (parent, child) VALUES (3, 4);
 
 ... I want to find all Objects that have exactly 2 children with ids 
 4 and 5  (i.e. should match 1, but not 2 or 3) ... what's the query 
 syntax?

SELECT parent FROM Link WHERE child=4 OR child=5 
GROUP BY child HAVING count(*)=2;

 How about if I want to find all Objects which have no children (i.e. 
 should match 4, 5 and 6, but not 1, 2 or 3).

SELECT id FROM Object LEFT JOIN Link ON (Object.id=Link.parent) 
WHERE Link.parent IS NULL;

Hope this simple queries solves your problem.

-- 
dsoares
(sql)

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

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




Re: indexing text fields possible?

2002-05-20 Thread andy

Thank you Egor for you reply.

I did read about indexing text column on the mysql site. So I tryed to index
my column like described. After 1 hour, I had to reboot my machine because
there was no other way. All the cpu was bussy and it seemed to me to be an
endless loop. After rebooting I had to repair the file system (suse72) and
tables. There was also a 130 MB tmp file I deleted.

So what did I do wrong, or does it just take that long? The table contains
about 40 MB of space.

Andy


- Original Message -
From: Egor Egorov [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 3:59 PM
Subject: Re: indexing text fields possible?


 andy,
 Sunday, May 19, 2002, 7:06:00 PM, you wrote:

 a I am wondering if it would be anyhow possible to make a search on a
mysql
 a textfield faster. Right now the table contains 294000 entries and takes
 a about 40 MB of space. Is there a way to apply a index with a resonable
 a amount of disk space?

 For TEXT column you can index only prefix of the column.

 a I am also not so sure if I should use text or
 a smalltext columns as the info may vary between 1 and 1000 chars. A
query for
 a LIKE 'test%' takes about 20 s right now.

 There is no SMALLTEXT column type in MySQL :) There are TINYTEXT,
 TEXT, MEDIUMTEXT and LONGTEXT.

 TINYTEXT allows to store L+1 bytes, where L  256 bytes. So
 it's not quite enough for you ...

 Take a look at:
  http://www.mysql.com/doc/n/o/node_369.html
 You can find info about storage requirements there.

 a Thanx for any help on that,
 a Andy





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



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

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



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

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: optimisation trouble

2002-05-20 Thread Fabien Penso


Mon, 20 May 2002 08:26:31 -0500, tu as dit : 

  [snip]
  How many records do you have in each table? And just how fast do you want
  this query to be? 1.5 seconds may be optimal for a query this large.
  Perhaps
  the only thing you could do at this point is beef up your server.

  Not that large, I got about 8.000 records in each table. I did put the
  body out from the news table, so the news table could be small, and
  news_body which I don't request all the time would be the bigger one.

  If I do 2 selects, one to fetch info from the news table, and then
  another one to fetch bodies, it takes much less time, like 0.05 for each
  request. Did I miss something ?
  [/snip]

  You don't say anything about your hardware, which could be a portion of the
  problem. If you combine the two queries you have a total return time of 1.0
  secs, right? The other 0.5 secs (return time varies with time of day,
  traffic etc.) is probably processing overhead. Why is getting below 1.5 secs
  so important? Just curious...

No, it takes 0.08+0.07 (just tried) so it makes it 0.15sec instead of
1.5sec, that's 10 times more... 0.15 is ok for a huge site, 1.5 isn't
(to me).

(I said 0.05sec, not 0.5sec :-)

-- 
Fabien Penso [EMAIL PROTECTED] | LinuxFr a toujours besoin de :
http://perso.LinuxFr.org/penso/  | http://linuxFr.org/dons/


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

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: Check tables?

2002-05-20 Thread Gerald Clark

Myisamchk returns an exit code.


if myisamchk myfile.MYI ; then
do something
else
do something else
fi

Mark wrote:

Hello,

Is there a way I can do a CHECK TABLES which will return an exit code of
some sort, to use in a shell-script? Looking at the output of a myisamchk is
fun, but I rather have a utility too that will report an error-status that I
can use to decide whether to make a backup/restore, etc.

Thanks

- Mark

P.S. Keeping the bot happy: mysql


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

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: Remote admin of MySQL from Win 2K

2002-05-20 Thread Gerald Clark

It is asking for myslq's root password, not the su password.
If you have not set it yet, skip the -p option.


Todd Cary wrote:

YES!  I was missing something: Telnet!!  I can log in *BUT* I am unable to
change the MySQL password.

mysqladmin -h www.myhost.org -u root -p password 'new_password' asks me for the
password and when I use the root password (su password), I get Access Denied.

Todd

--
Todd Cary
Ariste Software
2200 D Street Extension
Petaluma, CA 94952
707-773-4523
[EMAIL PROTECTED]



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

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





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

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




Re: Join takes way too long. Query optimizing, or denormalizing?

2002-05-20 Thread andy

* roger:
Try selecting FROM the cities table and JOIN with the recommendations
table.

* andy
SELECT count(DISTINCT user_recommending)
FROM geo.cities c
INNER JOIN recommendations  AS t ON t.city_id = c.ID AND c.country_code
= 'gm'

same result. So do u think I would be better off if I save the country_code
in the recommendations table as well? I did read in a sql book not to
include the same data twice, but if performance is that bad?!

Would you recommend to denormalize it?

Andy


- Original Message -
From: Roger Baklund [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: andy [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 4:01 PM
Subject: RE: Join takes way too long. Query optimizing, or denormalizing?


 * andy

SELECT count(DISTINCT user_recommending)
FROM recommendations t
INNER JOIN geo.cities AS c ON t.city_id = c.ID AND
c.country_code = 'gm'

  I guess this is not an issue on the index. Explain select says it is
using
  the index. So I assume, that I did just write down the join syntax
wrong.
  MySQL is joining all 32000 records with the city table and then looks
for
  the country code. So this looks ok to me. Maybe I should
  denormalize my data
  and include the country code in the other table as well?

 Try selecting FROM the cities table and JOIN with the recommendations
table.

 --
 Roger
 sql



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

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




Re: Replication OpenBSD - Linux is failing

2002-05-20 Thread Jeremy Zawodny

On Mon, May 20, 2002 at 03:44:36PM +0200, Michal Ludvig wrote:
 Hi all,
 I have a master MySQL server running 3.23.49 on RedHat Linux 7.2 and want 
 to setup a slave on OpenBSD 3.0 (both are i386 archs). So I took the 
 source (3,23,49 as well), compiled natively and configured as a slave. The 
 problem is, that I can't connect to the master: it always fails with:
 Access denied for user: 'repl@slave' (Using password: YES)
 
 My /etc/my.cnf on slave is:
 [mysqld]
 master-host=master
 master-user=repl
 master-password=ahoj
 master-port=3306
 server-id=3
 datadir=/space/mysql
 default-character-set=latin2
 log-slave-updates
 log=mysql.log
 
 There are two strange things:
 1) I can connect from slave to master with the command line mysql:
 slave% mysql -h master -u repl -p 
 Enter password: 
 Welcome to the MySQL monitor.  Commands end with ; or \g.
 Your MySQL connection id is 3463 to server version: 3.23.49-log

What if you shutdown the slave, remove the master.info file, and start
it back up?

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

MySQL 4.0.2: up 11 days, processed 130,057,042 queries (130/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




Embedding MySQL...

2002-05-20 Thread Nick Stuart

Is it possible to embed MySQL in a stand alone java app? I know you can do
it in c++/vb but waswandering if it was possible to do so in Java.
Thanks for the help!
-Nick



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

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: Remote admin of MySQL from Win 2K

2002-05-20 Thread .ben

/me uses mySQL-Front and PHPMyAdmin for all his Admin tasks

 .b

 -Original Message-
 From: Gerald Clark [mailto:[EMAIL PROTECTED]]
 Sent: 20 May 2002 15:45
 To: Todd Cary
 Cc: David Ayliffe; 'MYSQL-List (E-mail)'
 Subject: Re: Remote admin of MySQL from Win 2K
 
 
 It is asking for myslq's root password, not the su password.
 If you have not set it yet, skip the -p option.
 
 
 Todd Cary wrote:
 
 YES!  I was missing something: Telnet!!  I can log in *BUT* I am 
 unable to
 change the MySQL password.
 
 mysqladmin -h www.myhost.org -u root -p password 'new_password' 
 asks me for the
 password and when I use the root password (su password), I get 
 Access Denied.
 
 Todd
 
 --
 Todd Cary
 Ariste Software
 2200 D Street Extension
 Petaluma, CA 94952
 707-773-4523
 [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
 

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

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: Remote admin of MySQL from Win 2K

2002-05-20 Thread Todd Cary

That was the answer and solution to my MySQL problem!!  Many thanks

Todd

--
Todd Cary
Ariste Software
2200 D Street Extension
Petaluma, CA 94952
707-773-4523
[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




InnoDB, possible bug?

2002-05-20 Thread Andrei Cojocaru

Hello,

I've just switched to InnoDB table from myISAM and it's been running pretty
smoothly except on this SQL statement it doesn't use any indexes when there
are, and therefore is very slow.

mysql explain select
pn.timestamp,ne.viewpoint,pn.id,pn.type,ne.type,ne.newsid,ne.hidestamp from
newsentries10 ne, pnews pn where ne.playerid=28575 and ne.type=2 and
pn.newsid=ne.newsid;
+---++---+-+-+---+--
--++
| table | type   | possible_keys | key | key_len | ref   |
rows   | Extra  |
+---++---+-+-+---+--
--++
| ne| ALL| list_news,delete_news | NULL|NULL | NULL  |
734023 | where used |
| pn| eq_ref | PRIMARY   | PRIMARY |   4 | ne.newsid |
1 ||
+---++---+-+-+---+--
--++
2 rows in set (0.00 sec)

(Notice that key for ne is NULL when there is obviously an index it could
use, but doesn't, why?)

the table structures for the two tables are:
mysql desc newsentries10;
+---+-+--+-+-+---+
| Field | Type| Null | Key | Default | Extra |
+---+-+--+-+-+---+
| newsid| int(10) unsigned|  | MUL | 0   |   |
| playerid  | int(10) unsigned|  | MUL | 0   |   |
| hidestamp | int(10) unsigned|  | | 0   |   |
| viewpoint | tinyint(3) unsigned |  | | 0   |   |
| type  | tinyint(3) unsigned |  | | 0   |   |
| delmarker | tinyint(3) unsigned |  | MUL | 0   |   |
+---+-+--+-+-+---+
6 rows in set (0.00 sec)

mysql desc pnews;
+---+-+--+-+-++
| Field | Type| Null | Key | Default | Extra  |
+---+-+--+-+-++
| newsid| int(10) unsigned|  | PRI | NULL| auto_increment |
| type  | tinyint(3) unsigned |  | | 0   ||
| id| int(10) unsigned|  | MUL | 0   ||
| timestamp | int(10) unsigned|  | | 0   ||
+---+-+--+-+-++
4 rows in set (0.00 sec)

the indexs are:
mysql show index from newsentries10;
+---++-+--+-+---
+-+--++-+
| Table | Non_unique | Key_name| Seq_in_index | Column_name |
Collation | Cardinality | Sub_part | Packed | Comment |
+---++-+--+-+---
+-+--++-+
| newsentries10 |  1 | delmarker   |1 | delmarker   | A
|   0 | NULL | NULL   | |
| newsentries10 |  1 | list_news   |1 | playerid| A
|   0 | NULL | NULL   | |
| newsentries10 |  1 | list_news   |2 | type| A
|   0 | NULL | NULL   | |
| newsentries10 |  1 | delete_news |1 | newsid  | A
|   76379 | NULL | NULL   | |
+---++-+--+-+---
+-+--++-+
4 rows in set (0.20 sec)

mysql show index from pnews;
+---++--+--+-+---+--
---+--++-+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation |
Cardinality | Sub_part | Packed | Comment |
+---++--+--+-+---+--
---+--++-+
| pnews |  0 | PRIMARY  |1 | newsid  | A |
139047 | NULL | NULL   | |
| pnews |  1 | id   |1 | id  | A |
139047 | NULL | NULL   | |
+---++--+--+-+---+--
---+--++-+
2 rows in set (0.07 sec)

Now I have an index on the two columns that are used in the query on the
newsentries10 table and it doesn't use them at all. Could someone please
explain this to me and give me any advice on how to fix it?

Thanks for your help in advance.

words to bypass filter: sql queries

Andrei Cojocaru
[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? 

Re: store JPG in MySQL DB

2002-05-20 Thread Andrei Cojocaru

If I were you I would not store a binary file into the database, I'd store
the information required to fetch it from somewhere else like the mySQL
manual suggests

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
To: Sameer Maggon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 12:26 AM
Subject: Re: store JPG in MySQL DB



 For real-life example, check out http://cdbaza.ultracgis.com, and check
 out the filename
 of the thumbnails images. I'm SELECTing those images from the MySQL
 database.

 That's how it's done:

 1_ Create a table to store your JPGs, and the column that holds JPG data
should be declared as BLOB

 CREATE TABLE images (
 image_id INT UNSIGNED NOT NULL AUT_INCREMENT PRIMARY KEY,
 image BLOB NOT NULL
 );


  2_ Now you are ready to load the JPG data into the image column.
 I use Perl to open the JPG file and dump the contents into the table,
 and the resulting query looks something like:

 INSERT INTO images SET image=here goes contents of the JPG file;

 Perl code that does this job would look like:

 local ($/);
 sysopen (JPG, test.jpg, O_RDONLY) or die $!;
 $dbh-do(qq|INSERT INTO images SET image=?|, undef, JPG);
 close (JPG);

 Sorry if you don't know Perl, but you should be able to do similar
 thing in any other language you might be using



 Good luck!

 --
 Sherzod




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

 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: Performances with BLOB fields in mySql

2002-05-20 Thread Andrei Cojocaru

Well how large is the BLOB field?

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 2:51 AM
Subject: Performances with BLOB fields in mySql


 My application (C++, mySql++, WINNT) is very time-critical and
space-critical and use blob field.
 How can I improve performances?
 Which parameters can I set?
 There's literature about this question?

 Thak's, I'm sorry for my English.
 Bye, Marco


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

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

2002-05-20 Thread Andrei Cojocaru

Try:
/usr/bin/mysql -uroot

then when you're connected type:

grant all on *.* to root@localhost identified by 'newpassword';
flush privileges;

and that should work

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Suresh Pun [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 6:59 AM
Subject: MySQL new-bee...


 Hi
  I have installed mysql server and client version using command.

 # rpm -i MySQL-3.23.49a-1.i386.rpm MySQL-client-3.23.49a-1.i386.rpm

 I am trying to change root password but i am not able to change it.

 # /usr/bin/mysqladmin -u root -p password new-password
 Enter password:   (   I just pressed Enter here )
 mysqladmin: connect to server at 'localhost' failed
 error: 'Access denied for user: 'root@localhost' (Using password:NO)'

 #
 The above error come's wether I press Enter or type anything.
 Pls help me .

 Suresh.


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

 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




2 Database Types/Formats, 2 Databases, 1 Connection

2002-05-20 Thread Jay Blanchard

We have a Vision 4 database with an ODBC driver (AccuCobol), and then I have
a MySQL database that needs to be related to the Vision 4 DB. I need to be
able to do a query something like this; (pseudo-code)

SELECT a.btn, a.custName, b.agingStatus
FROM vision4.tblSubs a, mysql.tblSubscriber b
WHERE a.btn = b.btn
AND b.agingStatus  NULL

I am trying to do this without importing/reformatting/repurposing data from
the Vision 4 DB. It would be preferred to have live data from both. If I
do imports from the Vision 4 DB into the MySQL schema periodically (multiple
times per day) the information is less than live. Any thoughts?

Thanks!

Jay



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

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

2002-05-20 Thread Ray Zimmerman

I figured it out ...

At 3:22 PM +0100 5/20/02, ds wrote:
On Mon, 2002-05-20 at 13:34, Ray Zimmerman wrote:
...
   For example, given the following data ...

 CREATE TABLE Object (
   id int(11) NOT NULL auto_increment,
   PRIMARY KEY  (id)
 );

 INSERT INTO Object (id) VALUES (1);
 INSERT INTO Object (id) VALUES (2);
 INSERT INTO Object (id) VALUES (3);
 INSERT INTO Object (id) VALUES (4);
 INSERT INTO Object (id) VALUES (5);
 INSERT INTO Object (id) VALUES (6);

 CREATE TABLE Link (
   parent int(11) NOT NULL,
   child  int(11) NOT NULL,
 );

 INSERT INTO Link (parent, child) VALUES (1, 4);
 INSERT INTO Link (parent, child) VALUES (1, 5);
 INSERT INTO Link (parent, child) VALUES (2, 4);
 INSERT INTO Link (parent, child) VALUES (2, 5);
 INSERT INTO Link (parent, child) VALUES (2, 6);
 INSERT INTO Link (parent, child) VALUES (3, 4);

  ... I want to find all Objects that have exactly 2 children with ids
  4 and 5  (i.e. should match 1, but not 2 or 3) ... what's the query
  syntax?

SELECT parent FROM Link WHERE child=4 OR child=5
GROUP BY child HAVING count(*)=2;

Actually, while this may work for the specific example, it doesn't 
work in general ... here's the query I finally found to work ...

SELECT * FROM
 Object LEFT OUTER JOIN Link L0 ON
   (Object.id = L0.parent AND L0.child NOT IN (4,5)),
 Link L1,
 Link L2
   WHERE L1.parent = Object.id AND L1.child = 4
 AND L2.parent = Object.id AND L2.child = 5
 AND L0.id IS NULL;


   How about if I want to find all Objects which have no children (i.e.
  should match 4, 5 and 6, but not 1, 2 or 3).

SELECT id FROM Object LEFT JOIN Link ON (Object.id=Link.parent)
WHERE Link.parent IS NULL;

And yes, this is basically what I came up with here too. Thanks.

-- 
  Ray Zimmerman  / e-mail: [EMAIL PROTECTED] / 428-B Phillips Hall
   Sr Research  /   phone: (607) 255-9645  /  Cornell University
Associate  /  FAX: (815) 377-3932 /   Ithaca, NY  14853

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

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: Binary Data mysql_real_escape_

2002-05-20 Thread Andrei Cojocaru

are you null terminating the string?

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Sameer Maggon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 7:51 AM
Subject: Binary Data mysql_real_escape_


 Hi,
   Please see the code given below::

   //

   strcpy(query,INSERT INTO blobtest VALUES('abc',');
   qptr = query;
   len = strlen(query);
   qptr += len;
   qptr += mysql_real_escape_string(mysql, qptr, data, iBytesRead);
   *qptr += '\'';
   *qptr += ')';

   mysql_real_query(mysql,query, (unsigned int)( qptr - query));
   printf(error = %s, mysql_error(mysql));

   //

   It gives the error


  error = You have an error in your SQL syntax
 near ''ÿØÿà\0^PJFIF\0^A^A\0\0^
 A\0^A\0\0ÿÛ\0C\0^H^F^F^G^F^E^H^G^G^G
 ^H\n^L^T\r^L^K^K^L^Y^R^S^O^T^]\Z^_^^^]\Z^\^\ $.\' \'
  at line 1

   HWhat might be the problem
   Please help
   Sameer





 --
 http://www.dypatil.edu For Better tomorrow

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

 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: MyISAM internal algorithms

2002-05-20 Thread Andrei Cojocaru

I believe mySQL uses B-Trees (not binary trees), that's about all I know :)

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Jan Peuker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 2:59 AM
Subject: MyISAM internal algorithms


 Hi MySQL-Team,

 my question is about MySQL(which means MyISAM) internal sorting/storeing
 algorithms. I found some hints in the manual (How MySQL  ... e.g. store
 tables), but not exactly what I want. I don't need any exact information
or
 code fragments (I fell down my chair when I took a first look to the
 source), it's just a point of my interest how MySQL manages datasets. One
of
 my professionals told me that it would have something to do with
 B-(2-3-4)-Trees that are the best solution for reading blocks from disks,
 and that indexes would be stored in Binary-sorted-Trees or Tries. Do you
 have any short description of this for me?
 Thanks a lot,

 Jan Peuker


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

 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: store JPG in MySQL DB

2002-05-20 Thread Andrei Cojocaru

well, let's just say if it crashes it will mean longer recovery time, you
are adding extra processing to the SQL server to handle data it wasn't meant
to handle, storing it in the file system has the main advantage that if any
changes occurs you can change it faster + easier, besides a database is
supposed to store essential data so you don't overload it with things that
can be calculated or made pretty easily, and I'd say an image fits under
that category. And last time I checked my local hard drive is faster than my
network connection :) The choice is yours, but if you have heavy load, I
wouldn't use it.

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
To: Andrei Cojocaru [EMAIL PROTECTED]
Cc: Sameer Maggon [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 9:37 AM
Subject: Re: store JPG in MySQL DB



 Hi Andrei

  If I were you I would not store a binary file into the database, I'd
store
  the information required to fetch it from somewhere else like the mySQL
  manual suggests

 But what difference does it make? Besides, I found storing it in the DB
 more convenient than in the file system. In that case, you will have to
 keep track ofboh the files in the file system, and their meta data in the
 mysql tables.

 Please advise



  
  Andrei Cojocaru
  [EMAIL PROTECTED]
  - Original Message -
  From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
  To: Sameer Maggon [EMAIL PROTECTED]
  Cc: [EMAIL PROTECTED]
  Sent: Monday, May 20, 2002 12:26 AM
  Subject: Re: store JPG in MySQL DB
 
 
  
   For real-life example, check out http://cdbaza.ultracgis.com, and
check
   out the filename
   of the thumbnails images. I'm SELECTing those images from the MySQL
   database.
  
   That's how it's done:
  
   1_ Create a table to store your JPGs, and the column that holds JPG
data
  should be declared as BLOB
  
   CREATE TABLE images (
   image_id INT UNSIGNED NOT NULL AUT_INCREMENT PRIMARY KEY,
   image BLOB NOT NULL
   );
  
  
2_ Now you are ready to load the JPG data into the image column.
   I use Perl to open the JPG file and dump the contents into the
table,
   and the resulting query looks something like:
  
   INSERT INTO images SET image=here goes contents of the JPG file;
  
   Perl code that does this job would look like:
  
   local ($/);
   sysopen (JPG, test.jpg, O_RDONLY) or die $!;
   $dbh-do(qq|INSERT INTO images SET image=?|, undef, JPG);
   close (JPG);
  
   Sorry if you don't know Perl, but you should be able to do similar
   thing in any other language you might be using
  
  
  
   Good luck!
  
   --
   Sherzod
  
  
  
  
   -
   Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
  
   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: Join takes way too long. Query optimizing, or denormalizing?

2002-05-20 Thread Brent Baisley

In my experience, you rarely want to fully normalize your data (unless it's
something simple). City and country codes I wouldn't split up because they
never change. Well, alright, there have been quite a few new countries
popup in Europe recently. But you don't need to change hundreds or thousands
of records, in this case, to update your data, so full normalization doesn't
buy you anything.

I like to think of the joke where the guy programmed 911 (US emergency phone
number) on his speed dial, so to dial 911 he just had to press *78.


 I guess this is not an issue on the index. Explain select says it is using
 the index. So I assume, that I did just write down the join syntax wrong.
 MySQL is joining all 32000 records with the city table and then looks for
 the country code. So this looks ok to me. Maybe I should denormalize my data
 and include the country code in the other table as well?
 
 Andy
 - Original Message -
 From: Gelu Gogancea [EMAIL PROTECTED]
 To: andy [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, May 20, 2002 1:00 PM
 Subject: Re: Join takes way too long. How to optimize this smal query?
 
 Hi,
 Read  5.4.3 How MySQL Uses Indexes from documentation.
 
 Regards,
 Gelu
 _
 G.NET SOFTWARE COMPANY
 
 Permanent e-mail address : [EMAIL PROTECTED]
   [EMAIL PROTECTED]
 - Original Message -
 From: andy [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, May 20, 2002 1:48 PM
 Subject: Join takes way too long. How to optimize this smal query?
 
 
 Hi there,
 
 after reading a nice articel on normalisation, I did split my tables and
 now
 I am suffering performance lost.
 
 this query (finding out the amount of user which have posted an article
 on
 germany) takes 4.5 s:
 
 SELECT count(DISTINCT user_recommending)
 FROM recommendations t
 INNER JOIN geo.cities AS c ON t.city_id = c.ID AND c.country_code = 'gm'
 
 Is there a way to optimize it? The recommendationstable has a city and
 city
 table has the corresponding country_code.
 So the city table has 2.5 million entries and the recommendations table
 32733..
 
 Explain results in:
 
 | table | type   | possible_keys| key  |
 key_len | ref   | rows  | Extra   |
 
 
 +---++--+--+
 -+---+---+-+
 | t | index  | idx_search_engine_cityid | idx_search_for_same_spot |
 6 | NULL  | 32733 | Using index |
 | c | eq_ref | PRIMARY,idx_cp   | PRIMARY  |
 3 | t.city_id | 1 | where used  |
 
 Has anybody a good trick to solve boost it to a 0. time?
 
 Thanx, Andy
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail
 [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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
 

-- 
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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

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: store JPG in MySQL DB

2002-05-20 Thread Sherzod B. Ruzmetov


Hi Andrei

 well, let's just say if it crashes it will mean longer recovery time, you
 are adding extra processing to the SQL server to handle data it wasn't meant
 to handle, storing it in the file system has the main advantage that if any

Yeah, that crash thing really scares me. I guess you're right about 
. And how likely that it might crash?



 changes occurs you can change it faster + easier, besides a database is
 supposed to store essential data so you don't overload it with things that
 can be calculated or made pretty easily, and I'd say an image fits under
 that category. And last time I checked my local hard drive is faster than my
 network connection :) The choice is yours, but if you have heavy load, I
 wouldn't use it.
 
 Andrei Cojocaru
 [EMAIL PROTECTED]
 - Original Message -
 From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
 To: Andrei Cojocaru [EMAIL PROTECTED]
 Cc: Sameer Maggon [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, May 20, 2002 9:37 AM
 Subject: Re: store JPG in MySQL DB
 
 
 
  Hi Andrei
 
   If I were you I would not store a binary file into the database, I'd
 store
   the information required to fetch it from somewhere else like the mySQL
   manual suggests
 
  But what difference does it make? Besides, I found storing it in the DB
  more convenient than in the file system. In that case, you will have to
  keep track ofboh the files in the file system, and their meta data in the
  mysql tables.
 
  Please advise
 
 
 
   
   Andrei Cojocaru
   [EMAIL PROTECTED]
   - Original Message -
   From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
   To: Sameer Maggon [EMAIL PROTECTED]
   Cc: [EMAIL PROTECTED]
   Sent: Monday, May 20, 2002 12:26 AM
   Subject: Re: store JPG in MySQL DB
  
  
   
For real-life example, check out http://cdbaza.ultracgis.com, and
 check
out the filename
of the thumbnails images. I'm SELECTing those images from the MySQL
database.
   
That's how it's done:
   
1_ Create a table to store your JPGs, and the column that holds JPG
 data
   should be declared as BLOB
   
CREATE TABLE images (
image_id INT UNSIGNED NOT NULL AUT_INCREMENT PRIMARY KEY,
image BLOB NOT NULL
);
   
   
 2_ Now you are ready to load the JPG data into the image column.
I use Perl to open the JPG file and dump the contents into the
 table,
and the resulting query looks something like:
   
INSERT INTO images SET image=here goes contents of the JPG file;
   
Perl code that does this job would look like:
   
local ($/);
sysopen (JPG, test.jpg, O_RDONLY) or die $!;
$dbh-do(qq|INSERT INTO images SET image=?|, undef, JPG);
close (JPG);
   
Sorry if you don't know Perl, but you should be able to do similar
thing in any other language you might be using
   
   
   
Good luck!
   
--
Sherzod
   
   
   
   
-
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/   (the list archive)
   
To request this thread, e-mail [EMAIL PROTECTED]
To unsubscribe, e-mail
   [EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
   
   
  
  
 
 
 
 


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

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




Mysql Client

2002-05-20 Thread Federico Coco

I'm testing MySQL Client on Win98, my Server on Suse Linux 7.0.
1- I select database test
2-Commands--tables--Choose Tables, I choose f0001, I can see info  Found 3
columns in 1 tables
3-Commands--Tables--Edit Tables here nothing happens.
4-Commands--Tables--Create Tables here nothing happens.

What is going on?

TIA.


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

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




Re: Replication OpenBSD - Linux is failing

2002-05-20 Thread Michal Ludvig

On Mon, 20 May 2002, Jeremy Zawodny wrote:

 On Mon, May 20, 2002 at 03:44:36PM +0200, Michal Ludvig wrote:
  Hi all,
  I have a master MySQL server running 3.23.49 on RedHat Linux 7.2 and want 
  to setup a slave on OpenBSD 3.0 (both are i386 archs). So I took the 
  source (3,23,49 as well), compiled natively and configured as a slave. The 
  problem is, that I can't connect to the master: it always fails with:
  Access denied for user: 'repl@slave' (Using password: YES)
 
 What if you shutdown the slave, remove the master.info file, and start
 it back up?

Oh, shame on me! Now it works... Thanks a lot!

Michal Ludvig


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

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: store JPG in MySQL DB

2002-05-20 Thread Soheil Shaghaghi

Hello everyone.
While you are on this subject, can I ask you a question?
Is it possible to store sound, or video in the mySQL database? If so, is it
wise? Are there any performance issues I should be aware of
I just want my users to be able to add their photo, and sound (or maybe a
short video) to their profile.

Thanks so much,
Soheil


-Original Message-
From: Sherzod B. Ruzmetov [mailto:[EMAIL PROTECTED]]
Sent: Mon, May 20, 2002 8:37 AM
To: Andrei Cojocaru
Cc: Sameer Maggon; [EMAIL PROTECTED]
Subject: Re: store JPG in MySQL DB



Hi Andrei

 If I were you I would not store a binary file into the database, I'd store
 the information required to fetch it from somewhere else like the mySQL
 manual suggests

But what difference does it make? Besides, I found storing it in the DB
more convenient than in the file system. In that case, you will have to
keep track ofboh the files in the file system, and their meta data in the
mysql tables.

Please advise



 
 Andrei Cojocaru
 [EMAIL PROTECTED]
 - Original Message -
 From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
 To: Sameer Maggon [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, May 20, 2002 12:26 AM
 Subject: Re: store JPG in MySQL DB


 
  For real-life example, check out http://cdbaza.ultracgis.com, and check
  out the filename
  of the thumbnails images. I'm SELECTing those images from the MySQL
  database.
 
  That's how it's done:
 
  1_ Create a table to store your JPGs, and the column that holds JPG data
 should be declared as BLOB
 
  CREATE TABLE images (
  image_id INT UNSIGNED NOT NULL AUT_INCREMENT PRIMARY KEY,
  image BLOB NOT NULL
  );
 
 
   2_ Now you are ready to load the JPG data into the image column.
  I use Perl to open the JPG file and dump the contents into the
table,
  and the resulting query looks something like:
 
  INSERT INTO images SET image=here goes contents of the JPG file;
 
  Perl code that does this job would look like:
 
  local ($/);
  sysopen (JPG, test.jpg, O_RDONLY) or die $!;
  $dbh-do(qq|INSERT INTO images SET image=?|, undef, JPG);
  close (JPG);
 
  Sorry if you don't know Perl, but you should be able to do similar
  thing in any other language you might be using
 
 
 
  Good luck!
 
  --
  Sherzod
 
 
 
 
  -
  Before posting, please check:
 http://www.mysql.com/manual.php   (the manual)
 http://lists.mysql.com/   (the list archive)
 
  To request this thread, e-mail [EMAIL PROTECTED]
  To unsubscribe, e-mail
 [EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 




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

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



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

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




Re: error message....somewhat lost!

2002-05-20 Thread Simon K. Chan

Egor,

I'm running mysql-3.23.36-sun-solaris2.7-sparc.
And yes, I'm pretty sure that the server is installed.  I can still
query the database using a DBI script and get results back.

My mysqld is in /usr/local/mysql/bin
When I try running it, I get this error message:


mysqld: Can't change dir to '/usr/local/mysql-3.23.36-sun-solaris2.7-sparc/var/'
 (Errcode: 2)
020520  9:14:29  Aborting   

I checked the path and there is no var directory in 
/usr/local/mysql-3.23.36-sun-solaris2.7-sparc
I'm really lost!  Thanks for your advice!


--- Egor Egorov [EMAIL PROTECTED] wrote:
 Simon,
 Monday, May 20, 2002, 8:08:50 AM, you wrote:
 
 SKC The other day, I tried connecting to mysql
 SKC via the good old
 
 SKC mysql -u me -p
 
 SKC but I got a message saying that my mysql.sock is missing
 SKC from the tmp folder.  After checking the mailing list
 SKC archive, I decided (well, guessed is the more appropriate word)
 SKC that I could try to re-start the daemon:
 
 SKC bin/safe_mysqld --log 
 
 SKC But i get this error message:
 SKC The file /usr/local/mysql/libexec/mysqld doesn't exist or
 SKC is not executable
 SKC Please do a cd to the mysql installation directory and restart
 SKC this script from there as follows:
 SKC ./bin/safe_mysqld.
 
 SKC Now I'm really confused!!  I tried entering a) ./bin/safe_mysqld and b) 
./bin/safe_mysqld.
 SKC (thinking that the period is part of the command...) but that didn't work.
 SKC a) just gets me the same error message and b) isn't even a command! :-( 
 
 SKC Comments? 
 
 Simon, what OS do you use? What is your MySQL distribution? Are you
 sure that MySQL server is installed? Check where your mysqld is
 located and run mysqld from this dir. Also check your permissions.
 There are a lot of things that can cause that kind of errors... 
 
 SKC Many thanks!
 
 
 
 
 
 -- 
 For technical support contracts, goto https://order.mysql.com/?ref=ensita
 This email is sponsored by Ensita.net http://www.ensita.net/
__  ___ ___   __
   /  |/  /_ __/ __/ __ \/ /Egor Egorov
  / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
 /_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
___/   www.mysql.com
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail 
[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


=
#

Warmest Regards,
Simon K. Chan - [EMAIL PROTECTED]

Great spirits have always encountered violent opposition from mediocre minds.  - 
Albert Einstein

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




innodb rollbacks

2002-05-20 Thread walt

Does anyone know where rollbacks are stored for innodb tables?
I assume memory since I keep getting a table full error when trying to drop an 
index. 
sql,query

Thanks for your help!
-- 
Walter Anthony
System Administrator
National Electronic Attachment
Atlanta, Georgia 
1-800-782-5150 ext. 1608
 If it's not broketweak 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




Help me to Frame Query

2002-05-20 Thread Imrani Baig Shah Masroor


 hi all,
 i am working on Mysql to make a table  to store following data
 Varchar Semester,
 Varchar Name,
 Varcahr Course,
 int Enroll,
 int Responses,
 int Question#22,
 int Question#23,
 int Question#24,
 int Question#25,
 int Question#26,
 int Question#27,
 int Question#28,
 int Question#29,
 int Average

 One Sample Data row is
 XYZ, 1999,ABCDEF,990,6,4,4.75,3.33,4.67,4.00,4.25,4.00,4.25,4.50,4.22

 My question is, can i store the data for fields Question#22.Question#29
 in one data field in table (Say TABLE1), and when i retrieve the field, i should be 
able to break them into individual questions#, take each Question# into
 PHP variables and work on it.
 Any idea how to do that? My aim is to reduce the number of columns for the
 TABLE1. Your answer will be appreciated.

 thnaks
 Imrani





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

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 message....somewhat lost

2002-05-20 Thread Simon K. Chan

Gelu,

Thanks for taking the time to respond.  I did this:

whereis mysqld

and get this: 

mysqld:

which is really weird, because mysqld is located in /usr/local/mysql/bin

I would appreciate any advice you can offer me!  thanks! :-)

--- Gelu Gogancea [EMAIL PROTECTED] wrote:
 ...sorry ... idon't read carefully your message...
 check with :
 whereis mysqld
 ... if is in /usr/libexec then check if is executable.
 If is in other directory whereis tell you and you can move mysqld from
 whereis to /usr/libexec.
 
 
 - Original Message -
 From: Simon K. Chan [EMAIL PROTECTED]
 To: Mysql Help [EMAIL PROTECTED]
 Sent: Monday, May 20, 2002 8:14 AM
 Subject: error messagesomewhat lost
 
 
 
   Hi All,
 
   The other day, I tried connecting to mysql
   via the good old
 
  mysql -u me -p
 
   but I got a message saying that my mysql.sock is missing
   from the tmp folder.  After checking the mailing list
   archive, I decided (well, guessed is the more appropriate word)
   that I could try to re-start the daemon:
 
   bin/safe_mysqld --log 
 
   But i get this error message:
   The file /usr/local/mysql/libexec/mysqld doesn't exist or
   is not executable
   Please do a cd to the mysql installation directory and restart
   this script from there as follows:
   ./bin/safe_mysqld.
 
   Now I'm really confused!!  I tried entering a) ./bin/safe_mysqld and b)
 ./bin/safe_mysqld.
   (thinking that the period is part of the command...) but that didn't
 work.
   a) just gets me the same error message and b) isn't even a command! :-(
 
   Comments?
 
   Many thanks!
 
  simon
 
   __
   Do You Yahoo!?
   LAUNCH - Your Yahoo! Music Experience
   http://launch.yahoo.com
 
 
 
  =
  #
 
  Warmest Regards,
  Simon K. Chan - [EMAIL PROTECTED]
 
  Great spirits have always encountered violent opposition from mediocre
 minds.  - Albert Einstein
 
  __
  Do You Yahoo!?
  LAUNCH - Your Yahoo! Music Experience
  http://launch.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-##L=##[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-##L=##[EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


=
#

Warmest Regards,
Simon K. Chan - [EMAIL PROTECTED]

Great spirits have always encountered violent opposition from mediocre minds.  - 
Albert Einstein

__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: store JPG in MySQL DB

2002-05-20 Thread Andrei Cojocaru

I wouldn't know how likely it is to crash, but it will happen eventually,
nothing is perfect :(

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
To: Andrei Cojocaru [EMAIL PROTECTED]
Cc: Sameer Maggon [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 9:54 AM
Subject: Re: store JPG in MySQL DB



 Hi Andrei

  well, let's just say if it crashes it will mean longer recovery time,
you
  are adding extra processing to the SQL server to handle data it wasn't
meant
  to handle, storing it in the file system has the main advantage that if
any

 Yeah, that crash thing really scares me. I guess you're right about
 . And how likely that it might crash?



  changes occurs you can change it faster + easier, besides a database is
  supposed to store essential data so you don't overload it with things
that
  can be calculated or made pretty easily, and I'd say an image fits under
  that category. And last time I checked my local hard drive is faster
than my
  network connection :) The choice is yours, but if you have heavy load, I
  wouldn't use it.
  
  Andrei Cojocaru
  [EMAIL PROTECTED]
  - Original Message -
  From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
  To: Andrei Cojocaru [EMAIL PROTECTED]
  Cc: Sameer Maggon [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Monday, May 20, 2002 9:37 AM
  Subject: Re: store JPG in MySQL DB
 
 
  
   Hi Andrei
  
If I were you I would not store a binary file into the database, I'd
  store
the information required to fetch it from somewhere else like the
mySQL
manual suggests
  
   But what difference does it make? Besides, I found storing it in the
DB
   more convenient than in the file system. In that case, you will have
to
   keep track ofboh the files in the file system, and their meta data in
the
   mysql tables.
  
   Please advise
  
  
  

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Sherzod B. Ruzmetov [EMAIL PROTECTED]
To: Sameer Maggon [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 12:26 AM
Subject: Re: store JPG in MySQL DB
   
   

 For real-life example, check out http://cdbaza.ultracgis.com, and
  check
 out the filename
 of the thumbnails images. I'm SELECTing those images from the
MySQL
 database.

 That's how it's done:

 1_ Create a table to store your JPGs, and the column that holds
JPG
  data
should be declared as BLOB

 CREATE TABLE images (
 image_id INT UNSIGNED NOT NULL AUT_INCREMENT PRIMARY KEY,
 image BLOB NOT NULL
 );


  2_ Now you are ready to load the JPG data into the image column.
 I use Perl to open the JPG file and dump the contents into the
  table,
 and the resulting query looks something like:

 INSERT INTO images SET image=here goes contents of the JPG
file;

 Perl code that does this job would look like:

 local ($/);
 sysopen (JPG, test.jpg, O_RDONLY) or die $!;
 $dbh-do(qq|INSERT INTO images SET image=?|, undef, JPG);
 close (JPG);

 Sorry if you don't know Perl, but you should be able to do similar
 thing in any other language you might be using



 Good luck!

 --
 Sherzod




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

 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: MyISAM - IN

2002-05-20 Thread Egor Egorov

Edilson,
Saturday, May 18, 2002, 9:29:38 PM, you wrote:

EVdMJ I'm converting my tables from MyISAM to InnoDB. One of them returns an
EVdMJ error
EVdMJ Error: 1114 - The table '#sql-7b67_321' is full - How can i avoid this
EVdMJ error?

EVdMJ Table Structure-
EVdMJ wmkt_client,CREATE TABLE `wmkt_client` (
EVdMJ   `idclient` int(11) NOT NULL auto_increment,
EVdMJ   `realname` varchar(80) NOT NULL default '',
EVdMJ   `fkemail` int(11) NOT NULL default '0',
EVdMJ   `dtInsert` datetime default NULL,
EVdMJ   `dtLastUp` datetime default NULL,
EVdMJ   `fkuser` int(11) NOT NULL default '1',
EVdMJ   PRIMARY KEY  (`idclient`),
EVdMJ   KEY `ixFkemail` (`fkemail`)
EVdMJ ) TYPE=MyISAM
EVdMJ with 220945 records

You should add new data file: add new file to innodb_data_file_path in
my.cnf file. Then restart MySQL server.

EVdMJ Thank u very much,
EVdMJ Edilson.





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



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

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




Re: Possible Bug in UPdATE in MySQL 4.0.1 alpha

2002-05-20 Thread Victoria Reznichenko

Michael,
Sunday, May 19, 2002, 12:56:00 PM, you wrote:
MBV Description:

MBV Possible Bug in UPDATE in MySQL 4.0.1

MBV The following is the message in the error log...

MBV Number of processes running now: 0
MBV 020519 04:55:30  mysqld restarted
MBV 020519  4:55:30  InnoDB: Started
MBV /usr/local/mysql/bin/mysqld: ready for connections
MBV mysqld got signal 11;
MBV This could be because you hit a bug. It is also possible that this binary
MBV or one of the libraries it was linked against is corrupt, improperly
MBV built,
MBV or misconfigured. This error can also be caused by malfunctioning
MBV hardware.
MBV We will try our best to scrape up some info that will hopefully help
MBV diagnose
MBV the problem, but since we have already crashed, something is definitely
MBV wrong
MBV and this may fail.

MBV How-To-Repeat:
MBV Did this query on a database called 'medical' below text

MBV UPDATE `Physical Examination Report` SET `History of Present
MBV Illness`='moo\r\nfoo\r\nboo.' WHERE `ID Code of Appointment`=27

MBV DUMP of medical database schema:


MBV This was done multiple times and caused the server to restart
MBV every time.


MBV Fix:

MBV Moved Database to a machine with MySQL 3.x (3.23.49) and the query
MBV worked without issue.  I even tried this by simply copying the data
MBV directory over (tar.gz-ed the data directory, untared it on the other
MBV machine, and restarted the server)

I tested you SQL statement and it works fine on my v4.0.1
Probably, SIG11 is cause by broken hardware. Please check it. 

BTW, if you use compound names for your tables and columns
use --quote-names option of mysqldump.




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




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

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




Re: Is this a Bug?: Query returns an unexpected result.

2002-05-20 Thread Victoria Reznichenko

Ichinichi,
Monday, May 20, 2002, 3:40:20 PM, you wrote:

II Description:
II Query returns an unexpected result.

II How-To-Repeat:
II run the script below:

[skip]

II select
II o.orderid,
II o.shipping_date,
II o.cancel_date
II from orders o, member u
II where o.userid = u.userid;

II select
II o.orderid,
II o.shipping_date,
II o.cancel_date
II from orders o, member u
II where o.userid = u.userid
II and o.orderid = 1;
II -
II the results of the last two queries are:

II orderid shipping_date   cancel_date
II 1   2002-05-20 21:50:24 NULL
II 2   2002-05-20 21:50:24 NULL
II orderid shipping_date   cancel_date
II 1   2002-05-20 21:50:24 2002-05-20 21:50:24

II in the first query, cancel_date should not be null for orderid=1.

It is fixed in v4.0.2 ...




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




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

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




Re: newbie mysql install

2002-05-20 Thread Egor Egorov

Jeffrey,
Saturday, May 18, 2002, 5:12:15 PM, you wrote:

JC Installed MySQL using Fink to the Mac X OS.  When attempting to run, I 
JC am getting this error.

JC ERROR 2002: Can't connect to local MySQL server through socket 
JC '/tmp/mysql.sock'

JC Help in explaining this error and how to fix the installation would be 
JC appreciated.

Is the MySQL server running?
If so, check where your socket file is located and specify path to
your socket file using --socket option.

JC Thanks in advance.
JC Jeffrey





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



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

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




Re: Mysql Client

2002-05-20 Thread Andrei Cojocaru

try the command line version of the client first then a GUI based one

Andrei Cojocaru
[EMAIL PROTECTED]
- Original Message -
From: Federico Coco [EMAIL PROTECTED]
To: mysql [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 9:57 AM
Subject: Mysql Client


 I'm testing MySQL Client on Win98, my Server on Suse Linux 7.0.
 1- I select database test
 2-Commands--tables--Choose Tables, I choose f0001, I can see info  Found
3
 columns in 1 tables
 3-Commands--Tables--Edit Tables here nothing happens.
 4-Commands--Tables--Create Tables here nothing happens.

 What is going on?

 TIA.


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

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




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

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




Re: Is this a Bug?: Query returns an unexpected result.

2002-05-20 Thread Benjamin Pflugmann

Hi.

I was able to reproduce the behaviour on MySQL 3.23.46. CC'ed to
[EMAIL PROTECTED]

Regards,

Benjamin.


On Mon, May 20, 2002 at 09:40:20PM +0900, [EMAIL PROTECTED] wrote:
 Description:
 
 Query returns an unexpected result.
 
 How-To-Repeat:
 
 run the script below:
 -
 create table member
 (
  userid int(11) primary key auto_increment,
  mailaddress char(40) not null
 );
 
 insert into member values (null,'[EMAIL PROTECTED]');
 insert into member values (null,'[EMAIL PROTECTED]');
 
 create table orders
 (
  orderid int(11) primary key auto_increment,
  userid int(11) not null,
  placedate datetime,
  status enum('WORKING','ACCEPTED','CANCELED','SHIPPED'),
  comments char(255)
 );
 
 insert into orders values (null,1,sysdate(),'ACCEPTED',null);
 insert into orders values (null,2,sysdate(),'ACCEPTED',null);
 
 alter table orders add
 (
  contact_date datetime,
  payment_date datetime,
  shipping_date datetime,
  followup_date datetime,
  cancel_date datetime
 );
 
 update orders set shipping_date=sysdate();
 update orders set cancel_date=sysdate() where orderid=1;
 
 select
 o.orderid,
 o.shipping_date,
 o.cancel_date
 from orders o, member u
 where o.userid = u.userid;
 
 select
 o.orderid,
 o.shipping_date,
 o.cancel_date
 from orders o, member u
 where o.userid = u.userid
 and o.orderid = 1;
 -
 the results of the last two queries are:
 
 orderid shipping_date   cancel_date
 1   2002-05-20 21:50:24 NULL
 2   2002-05-20 21:50:24 NULL
 orderid shipping_date   cancel_date
 1   2002-05-20 21:50:24 2002-05-20 21:50:24
 
 in the first query, cancel_date should not be null for orderid=1.
 
 
 
 MySQL support:  none
 Severity: serious
 Priority: high
 Category: mysqld
 Class:support
 Release:  mysql-3.23.38
 
 Exectutable:   mysqld-nt
 System:Win200

-- 
[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: URGENT - ISAMCHK utility - Please help me

2002-05-20 Thread Benjamin Pflugmann

Hello.

On Mon, May 20, 2002 at 07:17:55PM +0400, [EMAIL PROTECTED] wrote:
 Hello:
 
 I was trying isamchk on my tables. Found one table with deleted blocks.

You know, there would be no reason to repair, except to reclaim the
disk space of the deleted rows?

 Used this option to check:
 ./isamchk -e ~/usr/local/var/events/events.ISM
 ###output###
 Data records: 435   Deleted blocks: 375
 - check file-size
 - check delete-chain
 - check index reference
 - check data record references index: 1
 - check data record references index: 2
 - check records and index references
 ###
 
 And to recover
 ./isamchk -r ~/usr/local/var/events/events.ISM
 ###output msg###
 - recovering ISAM-table '/usr/local/var/events/events.ISM'
 Data records: 435
 - Fixing index 1
 - Fixing index 2
 ###
 
 After fixing the table, the table is showing empty.

Strange. As there are reported 433 records to exist. Did you shutdown
the server while you used isamchk as I recommended in my last mail?

If not, take a backup from the table and start from scratch.

 The .ISD file has got data in that. How can I recover the contents
 in that table or should I use any other command to fix the tables.

No. What you have done should have worked.

Regards,

Benjamin.


[...]
 At 06:47 PM 5/16/02 +0200, you wrote:
[...]
 Shut down the mysql daemon, run isamchk on all tables to find out
 which are corrupted and run isamchk -r on those. Then restart
 mysqld. Do not forget to make backup copies of the tables in question
 beforehand, in case anything unexpected happens.
 
 You can get more information about your version of isamchk with
 isamchk --help.

-- 
[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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: error message....somewhat lost

2002-05-20 Thread Gelu Gogancea

Hi,
Please look at 2.4 Post-installation Setup and Testing in documentation.
Regards,
Gelu
_
G.NET SOFTWARE COMPANY

Permanent e-mail address : [EMAIL PROTECTED]
  [EMAIL PROTECTED]
- Original Message -
From: Simon K. Chan [EMAIL PROTECTED]
To: Gelu Gogancea [EMAIL PROTECTED]; Mysql Help [EMAIL PROTECTED]
Sent: Monday, May 20, 2002 7:29 PM
Subject: Re: error messagesomewhat lost


 Gelu,

 Thanks for taking the time to respond.  I did this:

 whereis mysqld

 and get this:

 mysqld:

 which is really weird, because mysqld is located in /usr/local/mysql/bin

 I would appreciate any advice you can offer me!  thanks! :-)

 --- Gelu Gogancea [EMAIL PROTECTED] wrote:
  ...sorry ... idon't read carefully your message...
  check with :
  whereis mysqld
  ... if is in /usr/libexec then check if is executable.
  If is in other directory whereis tell you and you can move mysqld
from
  whereis to /usr/libexec.
 
 
  - Original Message -
  From: Simon K. Chan [EMAIL PROTECTED]
  To: Mysql Help [EMAIL PROTECTED]
  Sent: Monday, May 20, 2002 8:14 AM
  Subject: error messagesomewhat lost
 
 
  
Hi All,
  
The other day, I tried connecting to mysql
via the good old
  
   mysql -u me -p
  
but I got a message saying that my mysql.sock is missing
from the tmp folder.  After checking the mailing list
archive, I decided (well, guessed is the more appropriate word)
that I could try to re-start the daemon:
  
bin/safe_mysqld --log 
  
But i get this error message:
The file /usr/local/mysql/libexec/mysqld doesn't exist or
is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/safe_mysqld.
  
Now I'm really confused!!  I tried entering a) ./bin/safe_mysqld and
b)
  ./bin/safe_mysqld.
(thinking that the period is part of the command...) but that didn't
  work.
a) just gets me the same error message and b) isn't even a command!
:-(
  
Comments?
  
Many thanks!
  
   simon
  
__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
  
  
  
   =
   #
  
   Warmest Regards,
   Simon K. Chan - [EMAIL PROTECTED]
  
   Great spirits have always encountered violent opposition from
mediocre
  minds.  - Albert Einstein
  
   __
   Do You Yahoo!?
   LAUNCH - Your Yahoo! Music Experience
   http://launch.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-##L=##[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-##L=##[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 


 =
 #

 Warmest Regards,
 Simon K. Chan - [EMAIL PROTECTED]

 Great spirits have always encountered violent opposition from mediocre
minds.  - Albert Einstein

 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Re: query - primary key

2002-05-20 Thread Amer Neely

 Hi,
   
   Firstly, how do i correct that error of BAD text coz i actually
   have a text file which has a HISTORY dump from IE.
   
   Secondly what about the Duplicate Entry stuff, its comming for
   all the URLs why??
 
   Regards
   Sameer

It's been my experience with loading data from text files that most
errors are caused by the end-of-line character/s. You may be importing
text from a file created by Windoze, and loading it into a db on Unix.
The end of line characters are different. In this case you will have to
specify what the 'termination' is: \r\n, \n, or whatever. Also check
your field delimter: is it a tab or what. If it's a tab you shouldn't
have to do anything, but if it's something else you will either have to
change your textfile, or specify what the field terminator is.

Something like this:

LOAD DATA LOCAL INFILE yourfile.txt INTO TABLE LevelOne FIELDS
TERMINATED BY '\t' LINES TERMINATED BY '\r\n'

This mixup will cause the duplicate key error as well I believe, since
the line pointer is not moving forward in your file.

-- 
/* All outgoing email scanned by Norton Antivirus 2002 */
Amer Neely, Softouch Information Services
W: www.softouch.on.ca
E: [EMAIL PROTECTED]
V: 519.438.5887
Perl | PHP | MySQL | CGI programming for shopping carts, data entry
forms.
We make web sites work!


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

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 message....somewhat lost

2002-05-20 Thread walt

try using which instead of whereis
Simon K. Chan wrote:

 Gelu,

 Thanks for taking the time to respond.  I did this:

 whereis mysqld

 and get this:

 mysqld:

 which is really weird, because mysqld is located in /usr/local/mysql/bin

 I would appreciate any advice you can offer me!  thanks! :-)

 --- Gelu Gogancea [EMAIL PROTECTED] wrote:
  ...sorry ... idon't read carefully your message...
  check with :
  whereis mysqld
  ... if is in /usr/libexec then check if is executable.
  If is in other directory whereis tell you and you can move mysqld from
  whereis to /usr/libexec.
 
 
  - Original Message -
  From: Simon K. Chan [EMAIL PROTECTED]
  To: Mysql Help [EMAIL PROTECTED]
  Sent: Monday, May 20, 2002 8:14 AM
  Subject: error messagesomewhat lost
 
 
  
Hi All,
  
The other day, I tried connecting to mysql
via the good old
  
   mysql -u me -p
  
but I got a message saying that my mysql.sock is missing
from the tmp folder.  After checking the mailing list
archive, I decided (well, guessed is the more appropriate word)
that I could try to re-start the daemon:
  
bin/safe_mysqld --log 
  
But i get this error message:
The file /usr/local/mysql/libexec/mysqld doesn't exist or
is not executable
Please do a cd to the mysql installation directory and restart
this script from there as follows:
./bin/safe_mysqld.
  
Now I'm really confused!!  I tried entering a) ./bin/safe_mysqld and b)
  ./bin/safe_mysqld.
(thinking that the period is part of the command...) but that didn't
  work.
a) just gets me the same error message and b) isn't even a command! :-(
  
Comments?
  
Many thanks!
  
   simon
  
__
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com
  
  
  
   =
   #
  
   Warmest Regards,
   Simon K. Chan - [EMAIL PROTECTED]
  
   Great spirits have always encountered violent opposition from mediocre
  minds.  - Albert Einstein
  
   __
   Do You Yahoo!?
   LAUNCH - Your Yahoo! Music Experience
   http://launch.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-##L=##[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-##L=##[EMAIL PROTECTED]
  Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

 =
 #

 Warmest Regards,
 Simon K. Chan - [EMAIL PROTECTED]

 Great spirits have always encountered violent opposition from mediocre minds.  - 
Albert Einstein

 __
 Do You Yahoo!?
 LAUNCH - Your Yahoo! Music Experience
 http://launch.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-##L=##[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-##L=##[EMAIL PROTECTED]
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php




Patch for mysql_read_default_options segfault

2002-05-20 Thread Christian Hammers

Hello 

FYI, here is a patch that was submitted through the Debian Bug Tracking
System for bug #145322. 
(for those who don't like to upgrade etc.. it is fixed in the 3.23.50)

bye,

-christian-

On Mon, May 20, 2002 at 06:55:19PM +0200, [EMAIL PROTECTED] wrote:
 Hi,
 
 I had a similar problem using the mysql_real_connect function. 
 
 Investigation of the problem results in wrong usage of the function
 strcend (const char* s, pchar c) in mysql_read_default_options. The
 documentation of this function tells, that a pointer to the end-null
 of s is returned if the character c is not found in s.
 
 There is a for loop in mysql_read_default_options that loops until
 this function returns a NULL pointer, what never will happen.
 
 ... around line 715 in libmysql/libmysql.c ...
 for (end= *option ; (end= strcend(end,'_')); )
   *end= '-';
 ...
 
 the bugfix is straight forward to check for the char and not for the
 pointer:
 
 715c715
  for (end= *option ; (end= strcend(end,'_')); )
 ---
  for (end= *option ; *(end= strcend(end,'_')); )
 
 
 BTW.: the same bugfix (or correct version :-) is already in the
 reentrant version of the library in libmysql_r/libmysql.c
 
 Dirk


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

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 statement problem

2002-05-20 Thread SpyProductions Support Team



Shouldn't this come up with a list of names from each table that matches?


SELECT * FROM table1,table2 WHERE table1.name = table2.name;


Does anyone see anything wrong with this query?  It keeps giving me an empty
set - but there definitely matches.  I even did a LIKE instead of =, takes
longer, but comes out the same.  I triple checked the data, and it is
*exactly* the same!

Help!

Thanks!

:)

-Mike



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

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




setting ip addresses

2002-05-20 Thread Chris Stefanick

How do you tell mysql what ip to listen on for connections?  I'm remember
seeing a configuration file for this sort of thing somewhere, but the exact
file escapes me at the moment.  Any help you could give would be great!

Thanks,
Chris Stefanick


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

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




Re: Help me to Frame Query

2002-05-20 Thread Brent Baisley

I would structure things differently. Have you thought about making each
question a record/row in a table? Then if you add or remove a question, you
don't have to change you table structure or your code if you do it right.
You could also then easily compile stats on a per question basis. Like how
many people answer 4 for question #25 or how many people got the right/wrong
answer.
It's a little harder to program, but it would be the most flexible.

 
 hi all,
 i am working on Mysql to make a table  to store following data
 Varchar Semester,
 Varchar Name,
 Varcahr Course,
 int Enroll,
 int Responses,
 int Question#22,
 int Question#23,
 int Question#24,
 int Question#25,
 int Question#26,
 int Question#27,
 int Question#28,
 int Question#29,
 int Average
 
 One Sample Data row is
 XYZ, 1999,ABCDEF,990,6,4,4.75,3.33,4.67,4.00,4.25,4.00,4.25,4.50,4.22
 
 My question is, can i store the data for fields Question#22.Question#29
 in one data field in table (Say TABLE1), and when i retrieve the field, i
 should be able to break them into individual questions#, take each Question#
 into
 PHP variables and work on it.
 Any idea how to do that? My aim is to reduce the number of columns for the
 TABLE1. Your answer will be appreciated.
 
 thnaks
 Imrani
 
 
 
 -
 Before posting, please check:
  http://www.mysql.com/manual.php   (the manual)
  http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 

-- 
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


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

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?: Query returns an unexpected result.

2002-05-20 Thread Benjamin Pflugmann

Hi.

On Mon, May 20, 2002 at 07:28:01PM +0300, [EMAIL PROTECTED] wrote:
[...]
 II select
 II o.orderid,
 II o.shipping_date,
 II o.cancel_date
 II from orders o, member u
 II where o.userid = u.userid;
[...]
 II -
 II the results of the last two queries are:
 
 II orderid shipping_date   cancel_date
 II 1   2002-05-20 21:50:24 NULL
 II 2   2002-05-20 21:50:24 NULL
 II orderid shipping_date   cancel_date
 II 1   2002-05-20 21:50:24 2002-05-20 21:50:24
 
 II in the first query, cancel_date should not be null for orderid=1.
 
 It is fixed in v4.0.2 ...

As the 4.0.x tree is still declared alpha, can we expect an back-port
of the fix to the 3.23.x tree?

Bye,

Benjamin.


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




Need some direction please

2002-05-20 Thread Computer Specialist

Here's my dilema. Our website runs a quarterly prize giveaway. Currently
we have an ASP form that gathers the inputed info into a database and
then sends us an e-mail confirmation of the entry. Our rules
specifically state that only one entry is allowed per quarter. As I am
not a programmer (just a dabbler in programming) I have no idea on how
to do the following and need some help.

What we need is a script that will check our current database against an
e-mail, last name, and first name entry. If that entry is in our
database a message pops up telling them that they have already
registered with us. If there entry is not located in our database then
the new info passes along unhindered.

We are on a Cobalt RaQ4r with ChiliAsp 3.62 installed and are using
MySQL.

Thanks in advance for the help.

Sincerely,

Stephen M. LaBar, Jr.
(770) 381-3826
Computer Specialist

Please Visit Our Site At:
http://www.csi-atl.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




Need some direction please

2002-05-20 Thread Webmaster

Here's my dilema. Our website runs a quarterly prize giveaway. Currently
we have an ASP form that gathers the inputed info into a database and
then sends us an e-mail confirmation of the entry. Our rules
specifically state that only one entry is allowed per quarter. As I am
not a programmer (just a dabbler in programming) I have no idea on how
to do the following and need some help.

What we need is a script that will check our current database against an
e-mail, last name, and first name entry. If that entry is in our
database a message pops up telling them that they have already
registered with us. If there entry is not located in our database then
the new info passes along unhindered.

We are on a Cobalt RaQ4r with ChiliAsp 3.62 installed and are using
MySQL.

Thanks in advance for the help.

Sincerely,

Stephen M. LaBar, Jr.
(770) 381-3826
Computer Specialist

Please Visit Our Site At:
http://www.csi-atl.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: setting ip addresses

2002-05-20 Thread Joseph Bueno

Chris Stefanick wrote :
 
 How do you tell mysql what ip to listen on for connections?  I'm remember
 seeing a configuration file for this sort of thing somewhere, but the exact
 file escapes me at the moment.  Any help you could give would be great!
 
 Thanks,
 Chris Stefanick
 
Hi,

Look at 'bind-address' option in /etc/my.cnf

Regards
--
Joseph Bueno
NetClub/Trader.com

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

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




Hung login mysql processes - unable to kill.

2002-05-20 Thread Reid Sutherland (mysql)

Hi everyone,

I have a rather obscure problem with hung login connections in mysql. 
 I've set the wait|interactive_timeout to 120 seconds, but it has no 
effect.\
If I attempt to `mysqladmin kill id`, the process is marked 'killed', 
but never goes away.  

Now I know the main problem is with the program I am using to create the 
connections and access the data, but I'm ignoring that right now because 
I want to deal with these stale (or hung) login processes.  And find out 
how to remove them or time them out (without restarting mysql mind you, 
if at all possible).

Here's some brief output from my `mysqladmin processlist`:

++--+---+--+-+--+---+--+
| Id | User | Host  | db   | Command | Time 
| State | Info |
++--+---+--+-+--+---+--+
| 22088  | via_httplogs | localhost |  | Connect |  
| login |  |
| 22877  | via_httplogs | localhost |  | Connect |  
| login |  |
| 23135  | via_httplogs | localhost |  | Connect |  
| login |  |
| 23226  | via_httplogs | localhost |  | Connect |  
| login |  |
| 26523  | via_httplogs | localhost |  | Connect |  
| login |  |
| 32105  | via_httplogs | localhost |  | Connect |  
| login |  |
| 32113  | via_httplogs | localhost |  | Connect |  
| login |  |
| 37098  | via_httplogs | localhost |  | Connect |  
| login |  |
| 38300  | via_httplogs | localhost |  | Connect |  
| login |  |
| 51212  | via_httplogs | localhost |  | Connect |  
| login |  |
| 89713  | via_httplogs | localhost |  | Connect |  
| login |  |
| 99008  | via_httplogs | localhost |  | Connect |  
| login |  |
| 119642 | via_httplogs | localhost | via_httplogs | Sleep   | 2
|   |  |
| 119644 | via_httplogs | localhost | via_httplogs | Sleep   | 29   
|   |  |
| 119645 | via_httplogs | localhost | via_httplogs | Sleep   | 14   
|   |  |
| 119646 | via_httplogs | localhost | via_httplogs | Sleep   | 41   
|   |  |
...

Nothing shows up in the mysql error log either.

Any ideas?

Thanks again.

-reid



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

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 statement problem

2002-05-20 Thread Benjamin Pflugmann

Hi.

On Mon, May 20, 2002 at 01:58:25PM -0400, [EMAIL PROTECTED] wrote:
 
 Shouldn't this come up with a list of names from each table that matches?
 
 SELECT * FROM table1,table2 WHERE table1.name = table2.name;
 
 Does anyone see anything wrong with this query?

No.

 It keeps giving me an empty set - but there definitely matches.  I
 even did a LIKE instead of =, takes longer, but comes out the same.
 I triple checked the data, and it is *exactly* the same!

If you have indexes defined on the table, try CHECK TABLE to assure
that the indexes are working as expected.

Else, try to create a test case. I.e. try to create a minimal set of
SQL commands which will produce the strange behaviour in order to
enable us to verify the behaviour.

Creating a test case will also help, if it should be an usage error,
as you will learn better what happens.

Regards,

Benjamin.

-- 
[EMAIL PROTECTED]

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

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




RE: MySQL statement problem

2002-05-20 Thread Mike At Spy


 Hi.

 On Mon, May 20, 2002 at 01:58:25PM -0400,
 [EMAIL PROTECTED] wrote:
 
  Shouldn't this come up with a list of names from each table
 that matches?
 
  SELECT * FROM table1,table2 WHERE table1.name = table2.name;
 
  Does anyone see anything wrong with this query?

 No.

  It keeps giving me an empty set - but there definitely matches.  I
  even did a LIKE instead of =, takes longer, but comes out the same.
  I triple checked the data, and it is *exactly* the same!

 If you have indexes defined on the table, try CHECK TABLE to assure
 that the indexes are working as expected.

Everything seems fine with CHECK TABLE.

 Else, try to create a test case. I.e. try to create a minimal set of
 SQL commands which will produce the strange behaviour in order to
 enable us to verify the behaviour.

 Creating a test case will also help, if it should be an usage error,
 as you will learn better what happens.

I'm not sure what you mean; do you mean running more basic commands?  I did
a generic SELECT * from each table, and they come out just fine.

Thanks for answering!  :)

-Mike



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

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




  1   2   >