Re: Help! Error building 4.0.2 under RH Linux 7.2

2002-05-10 Thread Vadim P.

Jurgen--

Strange thing is, I had been able to build MySQL 4.0 - up until 3 days
ago - without any problem. All from the same Mysql development tree.
At some point, the whole thing just fell apart after a source update. 

Also, there's no problem building v3.23 on the same box!

It actually looks like some sort of configuration issue, with some
config files gotten out of sync, but I can't be certain about this..

Thanks for the tip, though... Actually, I've been using gcc 2.96 for
quite some time now, including building MySQL 4.0.x that is in
production now (just had to use the new fulltext search features) -
without any known issues... That's why I got somewhat too comfortable
using v2.96...

Regards,
Vadim.


crashke wrote:
 
 Hi Vadim, I don't know but have you read the instructions on the
 Mysql-website?
 
 To determine if you should be concerned about this compiler issue, execute
 gcc -v from the command prompt on your system. If the compiler reports
 version 2.96, then there is a problem (this is the case, for example on RH
 7.x series or Mandrake 8.x). In this case, you should not try to compile
 your own binary before downgrading to one of the compilers mentioned above.
 You should also NOT use the MySQL server provided with your distribution --
 as this copy of MySQL was compiled with the same ill-advised compiler
 version.
 
 I've seen your files and its reporting you have a 2.96 compiler
 
 greetings
 
 Jurgen Campforts
 Meidoornlaan 2/1
 2200 Herentals
 0496/60.25.75
 http://www.scnoorderwijk.be
 http://crashke.no-ip.biz
 
 -Oorspronkelijk bericht-
 Van: Vadim P. [mailto:[EMAIL PROTECTED]]
 Verzonden: donderdag 9 mei 2002 23:07
 Aan: [EMAIL PROTECTED]
 Onderwerp: Re: Help! Error building 4.0.2 under RH Linux 7.2
 
 Just tried building Mysql-3.x.x cloned from the Development Tree on the same
 machine - works like a charm. Still no luck with 4.0.2
 Is there any known issue regarding building 4.0.2 under RedHat7.2?
 
 Thanks,
 Vadim.
 
 Vadim P. wrote:
 
  The Dev. Tree Source MySQL 4.0 no longer builds on this machine, giving
 lots
  of errors. Had been able to build from the same source w/o any problems up
  until a few days ago, when I 'bk resync'ed the source. Any ideas?
 
  Thanks for your help!
 
  --
  A snapshot of build transcript. Invoked by ./BUILD/compile-pentium.
  --
 
  [sql]# make
  Making all in share
  make[1]: Entering directory `/root/mysql-4.0/sql/share'
  make[1]: Nothing to be done for `all'.
  make[1]: Leaving directory `/root/mysql-4.0/sql/share'
  make[1]: Entering directory `/root/mysql-4.0/sql'
  gcc -DMYSQL_SERVER
  -DDEFAULT_MYSQL_HOME=\/usr/local/mysql\
  -DDATADIR=\/usr/local/mysql/var\
  -DSHAREDIR=\/usr/local/mysql/share/mysql\
  -DHAVE_CONFIG_H
  -I../innobase/include   -I./../include
  -I./../regex -I. -I../include -I.
  -O3 -DDBUG_OFF -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  -fno-implicit-templates
  -fno-exceptions -fno-rtti -c mysqld.cc
  cc1plus: warning: Ignoring command line option '-Wimplicit-function-dec'
  cc1plus: warning: Ignoring command line option '-Wimplicit-int'
  mysqld.cc: In function `void *handle_connections_sockets (void *)':
  mysqld.cc:2425: warning: `my_socket new_sock' might be used
  uninitialized in this function
  mysqld.cc: At top level:
  mysqld.cc:3045: `disconnect_slave_event_count' was not declared in this
  scope
  mysqld.cc:3046: `disconnect_slave_event_count' was not declared in this
  scope
  mysqld.cc:3050: `abort_slave_event_count' was not declared in this
  scope
  mysqld.cc:3050: `abort_slave_event_count' was not declared in this
  scope
  mysqld.cc:3053: `max_binlog_dump_events' was not declared in this scope
  mysqld.cc:3053: `max_binlog_dump_events' was not declared in this scope
  mysqld.cc:3056: `opt_sporadic_binlog_dump_fail' was not declared in
  this scope
  mysqld.cc:3057: `opt_sporadic_binlog_dump_fail' was not declared in
  this scope
  mysqld.cc:3299: `OPT_INNODB_MIRRORED_LOG_GROUPS' was not declared in
  this scope
  mysqld.cc:3304: `OPT_INNODB_LOG_FILES_IN_GROUP' was not declared in
  this scope
  mysqld.cc:3308: `OPT_INNODB_LOG_FILE_SIZE' was not declared in this
  scope
  mysqld.cc:3312: `OPT_INNODB_LOG_BUFFER_SIZE' was not declared in this
  scope
  mysqld.cc:3316: `OPT_INNODB_BUFFER_POOL_SIZE' was not declared in this
  scope
  mysqld.cc:3320: `OPT_INNODB_ADDITIONAL_MEM_POOL_SIZE' was not declared
  in this scope
  mysqld.cc:3325: `OPT_INNODB_FILE_IO_THREADS' was not 

Re: newbie help

2002-05-10 Thread Ryan Hatch

Sorry for the confusion.  I have not checked www.MySQL.org in such a 
long time.

I was referring to the period of time when NuSphere (Progress) had owned 
MySQL.org and appeared to be falsely representing themselves as the 
MySQL developers.

I'm sure you now know what I intended.

Regards,

-Ryan Hatch


---
Steve Buehler wrote:

 What makes you think that it is an imposter site?  They both have the 
 same IP address, they are both the same site.
 # nslookup mysql.org
 Name:mysql.org
 Address:  64.28.67.70

 # nslookup mysql.com
 Name:mysql.com
 Address:  64.28.67.70



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

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: Splitting a Table

2002-05-10 Thread dev.mysql

Splitting a table is not realy difficult, you could use:

Create table user_info select fieldname1,fieldname2,... from
large_table_name;

But you'll probably want a connection between the new tables.
you could add a ID-record first by doing:

alter table large_table add ID int unsigned auto_increment primary key;
and then use the create table and include this field like for example:

Create table user_info select ID,fieldname_1,fieldname_2,... from
large_table_name;
Create table product_info select ID as ID_user,fieldname_a,fieldname_b,...
from large_table_name;
Create table product_definition select ID as
ID_user,fieldname_x,fieldname_y,... from large_table_name;

This way you'll have the product_info and product_definition linked to user.
It's probably best to add an auto_increment ID to product_info and
product_definition.

alter product_info table add ID int unsigned auto_increment primary key;

The ID's that were created in create table statement are no longer
auto_increment so for the user_info table you should do this:

alter table user_info modify ID int unsigned auto_increment primary key;


Remco


- Original Message -
From: Daniel Negron/KBE [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 10, 2002 4:54 AM
Subject: Splitting a Table


Hi All,

mysql newbie here, this may be a silly question, but I couldn't figure out
how to word it for a google search

I want to take a table that someone created, a break it up so that one
table is NOT 125 fields large.  I want to separate the table into user
info, product info and product definition.  everything happens to be in the
same table.  The table is heavily occupied with 20,000 entries.  How would
I start to execute this task ?



Thank You



Daniel Negrón
Lotus Notes Administrator / Developer
KB Electronics, Inc.
954.346.4900x122
http://www.kbelectronics.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




newbie problem

2002-05-10 Thread Lalit Nagpal

hello friends,

mysql ..

i just want to move my database from one computer to
another ... no lan ... can be taken on a cd ...
how to plz tell me 

thanx a lot
Lalit Nagpal


__
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

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

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




AW: newbie problem

2002-05-10 Thread Braun, Markus

Hi
there's a 'data' directory in your mysql directory. This one contains one
subdirectory for each of your databases. Just copy the one you need to your
cd and place it in the data directory on the othe computer.
markus

 -Ursprüngliche Nachricht-
 Von:  Lalit Nagpal [SMTP:[EMAIL PROTECTED]]
 Gesendet am:  Freitag, 10. Mai 2002 10:11
 An:   [EMAIL PROTECTED]
 Betreff:  newbie problem
 
 hello friends,
 
 mysql ..
 
 i just want to move my database from one computer to
 another ... no lan ... can be taken on a cd ...
 how to plz tell me 
 
 thanx a lot
 Lalit Nagpal
 

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

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




O2 to MySQL.....

2002-05-10 Thread ritu singla

Hi!!

 I want to convert all the data in o2 database to
mysql...pls. can anyone guide me on that??

Thanx...

Regards,
Ritu Singla







For live cricket scores download  Yahoo! Score Tracker
 at: http://in.sports.yahoo.com/cricket/tracker.html

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

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




Can't RESTORE TABLE...

2002-05-10 Thread ritu singla

Hi!!

I used BACKUP TABLE command to take the backup of a
table...but when i say
RESTORE TABLE, i get the following ::


mysql restore table rs from '/tmp';
+---+-+--+--+
| Table | Op  | Msg_type | Msg_text   
 |
+---+-+--+--+
| rs| restore | error| Failed copying .frm
file |
+---+-+--+--+
1 row in set (0.00 sec)

The output after BACKUP TABLE was ::
mysql backup table abc to '/tmp';
+--++--+--+
| Table| Op | Msg_type | Msg_text |
+--++--+--+
| ritu.abc | backup | status   | OK   |
+--++--+--+
1 row in set (0.00 sec)


Pls. tell me where i went wrongi locked the table
before backup...

Thanks...
Regards,
Ritu Singla








For live cricket scores download  Yahoo! Score Tracker
 at: http://in.sports.yahoo.com/cricket/tracker.html

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

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 help

2002-05-10 Thread Bobby Brooks

if it's an imposterer, its a fairly decent looking mirror :)
-bobby
- Original Message -
From: Ryan Hatch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, May 09, 2002 10:31 PM
Subject: Re: newbie help


 bd...

 Two things here:

 1.)   Mysql.org is an IMPOSTER's site.   www.MySQL.com  is the real site.
 and
 2.)   You haven't given us the warning / error message you received.

 -Ryan Hatch

 [EMAIL PROTECTED] wrote:

 I just created a database and tried to LOAD 1 line of data from a text
file.
 
 I have only 9 coloums , most varchar, one char, one smallint
(autoincrement)
 
 when i load the data (tab de-limeted) it goes fine but i get one Warning.
 
 
 I found on mysql.org that i need to INTO OUTFILE and look for
errors,...but i
 dont see any?
 None of the coloums are overunning, all data types seem correct...
 
 What else could be going on?
 
 could i just ignore the warning?
 
 
 thank you
 
 bd
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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




Replication Problem

2002-05-10 Thread Raymond Brighenti

Hi,

Trying to get replication going between to W2K machines and getting the
following errors in the Slave log file.

MySql: ready for connections
020509 18:58:52  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 18:59:54  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 19:00:57  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec

Below are the two my.cnf files which as far as I can see should be ok.

my.cnf Master
[mysqld]
log-bin
server-id=1

my.cnf Slave
[MYSQLD]
master-host=20.0.0.54
master-user=echo
master-password=password
master-port=3306
server-id=2

Below are the output from some other checks, it's got the connecting to
master in the colum.
Looking at the log file it's getting the MySQL server on '' which seems to
indicate that it doesn't have a host or IP address to connect to!

Any ideas?

Thanks

Ray



So from Master...
mysql show master status;
+---+--+--+--+
| File  | Position | Binlog_do_db | Binlog_ignore_db |
+---+--+--+--+
| dnatest03-bin.002 | 73   |  |  |
+---+--+--+--+
1 row in set (0.00 sec)


And from Slave...
mysql show slave status
- ;
+-+-+-+---+--+-+
---+-+-++---
-+--+
| Master_Host | Master_User | Master_Port | Connect_retry | Log_File | Pos |
Slave_Running | Replicate_do_db | Replicate_ignore_db | Last_errno |
Last_error | Skip_counter |
+-+-+-+---+--+-+
---+-+-++---
-+--+
|   | test| 3306| 60   |  | 4
| Yes   | |   | 0  |
| 0|
+-+-+-+---+--+-+
---+-+-++---
-+--+
1 row in set (0.00 sec)

mysql show processlist
++---+---+--+-+--+--
+--+
| Id | User  | Host  | db   | Command | Time | State| Info
|
++---+---+--+-+--+--
+--+
|  1 | system user   | none  | NULL | Connect | 985  | connecting to
master| NULL |
|  2 | administrator | localhost | NULL | Sleep   | 5|| NULL
|
|  3 | ODBC  | localhost | NULL | Query   | 0| NULL| show
processlist |
++---+---+--+-+--+--
+--+
3 rows in set (0.02 sec)




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

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: O2 to MySQL.....

2002-05-10 Thread (Borus.Kung)

I think a simple way is to export your o2 data into text file
then load the text files into MySQL
is it too hard?

Borus

- Original Message -
寄件者: ritu singla [EMAIL PROTECTED]
收件者: [EMAIL PROTECTED]
傳送日期: 2002年5月10日 PM 05:10
主旨: O2 to MySQL.


 Hi!!

  I want to convert all the data in o2 database to
 mysql...pls. can anyone guide me on that??

 Thanx...

 Regards,
 Ritu Singla






 
 For live cricket scores download  Yahoo! Score Tracker
  at: http://in.sports.yahoo.com/cricket/tracker.html

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

 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




How dangerous is OPTIMIZE TABLE?

2002-05-10 Thread Mark

How dangerous is OPTIMIZE TABLE?

I have been reading through the FAQ, and came to the section on OPTIMIZE
TABLE.

http://www.mysql.com/doc/O/P/OPTIMIZE_TABLE.html

That has my interest, as my MySQL XOVER database will expire articles ever
so often. But then I read a comment there that OPTIMIZE TABLE is dangerous,
and can corrupt your database. :( Not what I want, really. The author that
gave the warning spoke of tables with millions of rows. Mine only hold a
hundred thousand, or so, max (closer to ~ 20 - 30 thousand a group).

I will need OPTIMIZE TABLE, however, as many articles will expire over time,
and I want the empty space reclaimed, of course. So, how dangerous is
OPTIMIZE TABLE, really?

Thanks!

- Mark


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

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: DROP DATABASE executes but fails to remove database!

2002-05-10 Thread Victoria Reznichenko

Gartside,
Friday, May 10, 2002, 3:45:07 AM, you wrote:

G Windows 2K MySQL V ? (recent). Sorry, I'm not at my own machine at present,
G can't check actual version number.

G Installed, running and everything is ok, except I created a database called
G 'xyz' as a test then decided to delete it.
G I used the command: DROP DATABASE 'xzy';which returns a message that
G the command executed successfully, affecting however many rows were in the
G database at the time.
G SHOW DATABASES; shows that the database is still there.

G I then re-tried using command:   DROP DATABASE if exists 'xyz'; with
G the same result (no error messages).

Please, check you database directory if there are any other files than
MySQL table files (*.MYD. *.MYI, .frm etc.). MySQL doesn't remove
database if there are any non-MySQL files in the dir.

G I then tried using mysqladmin to do the job, with the same result.

G I then used:DELETE
G FROM mysql.db
G WHERE Db = xyz;
G which also executes successfully.

:) You removed _users_ with _privileges_ on 'xyz' database, it's not
related with database removal.

G I test by using:SELECT db
G FROM mysql.Db;
G which reveals that the database is NOT there.

Sure, you removed all matched  rows from table 'db' :)

G However! SHOW DATABASES; still
G shows that the database is there!

G I have also tried right click drop database in the GUI MySQL management
G window. It fails to remove it.

G I have stopped and re-started the service and the computer several times.
G DROP DATABASE works fine for other databases I create and remove, just not
G this one.

Please, check your database directory! You have posted your letter 3
times and Heikki already asked you to check the dir.

G Is this a curly one? Any help appreciated.
G Andrew




-- 
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: can't execute any of the binaries

2002-05-10 Thread Victoria Reznichenko

jk,
Thursday, May 09, 2002, 7:57:49 PM, you wrote:

jDescription:

j i installed the binaries of mysql 3.23.49 (tried both tar.gz and rpm) but cannot 
execute any (neither the deamon mysqld nor the monitor mysql). i can execute scripts 
but they will fail as they are
j calling mysqld

What error did you receive and what is the contents of your
hast_name.err file?




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

2002-05-10 Thread Egor Egorov

Lalit,
Friday, May 10, 2002, 11:10:52 AM, you wrote:

LN i just want to move my database from one computer to
LN another ... no lan ... can be taken on a cd ...
LN how to plz tell me 

You should use mysqldump utility for database backup. Some useful info
about backup and mysqldump you can find in our manual:
  http://www.mysql.com/doc/B/a/Backup.html
  http://www.mysql.com/doc/m/y/mysqldump.html

In result of mysqldump you get a dump file that you can write on a CD.

LN thanx a lot
LN Lalit Nagpal





-- 
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: Help -- Can't Get Logs Up and Running on Mysql - Win32

2002-05-10 Thread Egor Egorov

David,
Thursday, May 09, 2002, 11:39:32 PM, you wrote:

DS MySQL is running as a Service in Windows 2000, as one might expect. Tried to
DS get the logs up and running with a my.cnf file in multiple locations,
DS including C:/ and DATADIR\my.cnf

my.cnf must be located in the root dir on C: drive! Or you can rename
it to my.ini and put in the Windows system dir.

DS then restarted service, tried logging in,
DS a few inserts, etc - no luck. Flushed logs using mysqladmin too. Here's my
DS my.cnf contents:

DS [mysqld]
DS log-update
DS log

DS [mysql]
DS log-update
DS log

DS I'm hoping the two listings don't conflict with each other.

David, you can't find your log files in the MySQL data dir or MySQL
doesn't save updates in the log files your_host_name.XXX

DS Thanks.
DS DTS





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




MySQLGUI 1.7.5

2002-05-10 Thread Jon Lochner

Greetings,

Using the semi-static linux binaries to connect to localhost mysqld/mysql 3.23.47. 
Can connect to the database with mysql -u -p. ODBC also OK

But I  keep getting the following with the GUI:
Can't connect to local MySQL server through socket (111)

or if I specifiy IP rather than localhost

Access denied for user: 'root@x' (Using password: YES)

Thanks


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

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




(php thing) Bug #17126 Updated: mysql_pconnect() and mysql_query(LOCKTABLES...) (fwd)

2002-05-10 Thread Stian Skjelstad

Hi

I don't know if this is of any interrest etc, but atleast it is a small 
little issue from the big, big world.


-- Forwarded message --
Date: 10 May 2002 08:41:19 -
From: PHP Bug Database [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Bug #17126 Updated: mysql_pconnect() and mysql_query(LOCK
TABLES...)

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at
http://bugs.php.net/?id=17126edit=2


 ID:   17126
 Updated by:   [EMAIL PROTECTED]
 Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
 Bug Type: MySQL related
 Operating System: RedHat Linux 7.2 with updates
 PHP Version:  4.0CVS-2002-05-09
 New Comment:

PHP is not the appropriate place to do this. If you want
auto-unlocking, bug the MySQL-people or learn to write proper code.


Previous Comments:


[2002-05-09 15:08:49] [EMAIL PROTECTED]

This is a test-thing from one of my projects. The problem is the LOCK
TABLES not beeing unlocked again.. This is a userproblem, but can
sometimes be hard to track when you rerun the script, and hit another
Apache-PID and tables still beeing locked.. maybe when a Link
identifier is destroyed, or new database is selected, an UNLOCK
TABLES should be ommited?

testsource from project:

?
unset ( $ROOT ); $ROOT = ../;
include_once ( $ROOT.include/setup.php ); 
include_once ( $INCLUDE.mysql.php );

MySQL_DoConnect();
echo Locking...; 
mysql_query(LOCK TABLES Ansatt WRITE;);
echo Done (.mysql_error().)br;
?




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

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 Problem

2002-05-10 Thread Terrence Cox

Hi Raymond,

That's an interesting message you're getting. Obviously there is an issue with IP 
address not getting to mysqld. The only thing that can make any sense to me in this 
one is double check the name and location of the my.cnf file. 

See ya,
Terrence

- Original Message -
From: Raymond Brighenti [EMAIL PROTECTED]
Date: Fri, 10 May 2002 10:23:30 +0100
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject: Replication Problem


 Hi,
 
 Trying to get replication going between to W2K machines and getting the
 following errors in the Slave log file.
 
 MySql: ready for connections
 020509 18:58:52  Slave thread: error connecting to master:Can't connect to
 MySQL server on '' (10049)(0), retry in 60 sec
 020509 18:59:54  Slave thread: error connecting to master:Can't connect to
 MySQL server on '' (10049)(0), retry in 60 sec
 020509 19:00:57  Slave thread: error connecting to master:Can't connect to
 MySQL server on '' (10049)(0), retry in 60 sec
 
 Below are the two my.cnf files which as far as I can see should be ok.
 
 my.cnf Master
 [mysqld]
 log-bin
 server-id=1
 
 my.cnf Slave
 [MYSQLD]
 master-host=20.0.0.54
 master-user=echo
 master-password=password
 master-port=3306
 server-id=2
 
 Below are the output from some other checks, it's got the connecting to
 master in the colum.
 Looking at the log file it's getting the MySQL server on '' which seems to
 indicate that it doesn't have a host or IP address to connect to!
 
 Any ideas?
 
 Thanks
 
 Ray
 
 
 
 So from Master...
 mysql show master status;
 +---+--+--+--+
 | File  | Position | Binlog_do_db | Binlog_ignore_db |
 +---+--+--+--+
 | dnatest03-bin.002 | 73   |  |  |
 +---+--+--+--+
 1 row in set (0.00 sec)
 
 
 And from Slave...
 mysql show slave status
 - ;
 +-+-+-+---+--+-+
 ---+-+-++---
 -+--+
 | Master_Host | Master_User | Master_Port | Connect_retry | Log_File | Pos |
 Slave_Running | Replicate_do_db | Replicate_ignore_db | Last_errno |
 Last_error | Skip_counter |
 +-+-+-+---+--+-+
 ---+-+-++---
 -+--+
 |   | test| 3306| 60   |  | 4
 | Yes   | |   | 0  |
 | 0|
 +-+-+-+---+--+-+
 ---+-+-++---
 -+--+
 1 row in set (0.00 sec)
 
 mysql show processlist
 ++---+---+--+-+--+--
 +--+
 | Id | User  | Host  | db   | Command | Time | State| Info
 |
 ++---+---+--+-+--+--
 +--+
 |  1 | system user   | none  | NULL | Connect | 985  | connecting to
 master| NULL |
 |  2 | administrator | localhost | NULL | Sleep   | 5|| NULL
 |
 |  3 | ODBC  | localhost | NULL | Query   | 0| NULL| show
 processlist |
 ++---+---+--+-+--+--
 +--+
 3 rows in set (0.02 sec)
 
 
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 


-- 
___
Download the free Opera browser at http://www.opera.com/

Powered by Outblaze

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

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 Problem

2002-05-10 Thread Luc Foisy

btw, things look much prettier if you use show slave status\G

the replicant user, and host ip address does not match your my.cnf on the
slave
master-host=20.0.0.54
master-user=echo

| Master_Host | Master_User | Master_Port | Connect_retry | Log_File | Pos |
|   | test| 3306| 60   |  | 4

try restarting your slave server or send
SLAVE STOP;
CHANGE MASTER TO MASTER_USER='echo', MASTER_HOST='20.0.0.54';  (the quotes
may be different on your win2k machine)
SLAVE START;

Make sure you have granted FILE permission to a user called 'echo' on your
master

-Original Message-
From: Raymond Brighenti [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 5:24 AM
To: '[EMAIL PROTECTED]'
Subject: Replication Problem


Hi,

Trying to get replication going between to W2K machines and getting the
following errors in the Slave log file.

MySql: ready for connections
020509 18:58:52  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 18:59:54  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 19:00:57  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec

Below are the two my.cnf files which as far as I can see should be ok.

my.cnf Master
[mysqld]
log-bin
server-id=1

my.cnf Slave
[MYSQLD]
master-host=20.0.0.54
master-user=echo
master-password=password
master-port=3306
server-id=2

Below are the output from some other checks, it's got the connecting to
master in the colum.
Looking at the log file it's getting the MySQL server on '' which seems to
indicate that it doesn't have a host or IP address to connect to!

Any ideas?

Thanks

Ray



So from Master...
mysql show master status;
+---+--+--+--+
| File  | Position | Binlog_do_db | Binlog_ignore_db |
+---+--+--+--+
| dnatest03-bin.002 | 73   |  |  |
+---+--+--+--+
1 row in set (0.00 sec)


And from Slave...
mysql show slave status
- ;
+-+-+-+---+--+-+
---+-+-++---
-+--+
| Master_Host | Master_User | Master_Port | Connect_retry | Log_File | Pos |
Slave_Running | Replicate_do_db | Replicate_ignore_db | Last_errno |
Last_error | Skip_counter |
+-+-+-+---+--+-+
---+-+-++---
-+--+
|   | test| 3306| 60   |  | 4
| Yes   | |   | 0  |
| 0|
+-+-+-+---+--+-+
---+-+-++---
-+--+
1 row in set (0.00 sec)

mysql show processlist
++---+---+--+-+--+--
+--+
| Id | User  | Host  | db   | Command | Time | State| Info
|
++---+---+--+-+--+--
+--+
|  1 | system user   | none  | NULL | Connect | 985  | connecting to
master| NULL |
|  2 | administrator | localhost | NULL | Sleep   | 5|| NULL
|
|  3 | ODBC  | localhost | NULL | Query   | 0| NULL| show
processlist |
++---+---+--+-+--+--
+--+
3 rows in set (0.02 sec)




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

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

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

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




RE: Replication Problem

2002-05-10 Thread Luc Foisy

actually you may want to change [MYSQLD] to [mysqld] and restart your slave
server
I don't think it has read your my.cnf file correctly ( that means the other
settings will not have taken affect either, like password and server ID)

-Original Message-
From: Raymond Brighenti [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 5:24 AM
To: '[EMAIL PROTECTED]'
Subject: Replication Problem


Hi,

Trying to get replication going between to W2K machines and getting the
following errors in the Slave log file.

MySql: ready for connections
020509 18:58:52  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 18:59:54  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 19:00:57  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec

Below are the two my.cnf files which as far as I can see should be ok.

my.cnf Master
[mysqld]
log-bin
server-id=1

my.cnf Slave
[MYSQLD]
master-host=20.0.0.54
master-user=echo
master-password=password
master-port=3306
server-id=2

Below are the output from some other checks, it's got the connecting to
master in the colum.
Looking at the log file it's getting the MySQL server on '' which seems to
indicate that it doesn't have a host or IP address to connect to!

Any ideas?

Thanks

Ray



So from Master...
mysql show master status;
+---+--+--+--+
| File  | Position | Binlog_do_db | Binlog_ignore_db |
+---+--+--+--+
| dnatest03-bin.002 | 73   |  |  |
+---+--+--+--+
1 row in set (0.00 sec)


And from Slave...
mysql show slave status
- ;
+-+-+-+---+--+-+
---+-+-++---
-+--+
| Master_Host | Master_User | Master_Port | Connect_retry | Log_File | Pos |
Slave_Running | Replicate_do_db | Replicate_ignore_db | Last_errno |
Last_error | Skip_counter |
+-+-+-+---+--+-+
---+-+-++---
-+--+
|   | test| 3306| 60   |  | 4
| Yes   | |   | 0  |
| 0|
+-+-+-+---+--+-+
---+-+-++---
-+--+
1 row in set (0.00 sec)

mysql show processlist
++---+---+--+-+--+--
+--+
| Id | User  | Host  | db   | Command | Time | State| Info
|
++---+---+--+-+--+--
+--+
|  1 | system user   | none  | NULL | Connect | 985  | connecting to
master| NULL |
|  2 | administrator | localhost | NULL | Sleep   | 5|| NULL
|
|  3 | ODBC  | localhost | NULL | Query   | 0| NULL| show
processlist |
++---+---+--+-+--+--
+--+
3 rows in set (0.02 sec)




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

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: MySQLGUI 1.7.5

2002-05-10 Thread Eric White


On Fri, 10 May 2002, Jon Lochner wrote:

 Greetings,
 
 Using the semi-static linux binaries to connect to localhost mysqld/mysql 3.23.47. 
 Can connect to the database with mysql -u -p. ODBC also OK
 
 But I  keep getting the following with the GUI:
 Can't connect to local MySQL server through socket (111)
 
 or if I specifiy IP rather than localhost
 
 Access denied for user: 'root@x' (Using password: YES)
 
 Thanks

I'm far from a MySQL wiz, but I believe you need to specify
the socket in the GUI client (under the Manage, Options menu).
/tmp/mysql.sock is a likely candidate for this value.  The 
default port is 3306.



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

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 Problem

2002-05-10 Thread Raymond Brighenti

Hi,

I tried using a FreeBSD box with MySQL as the Master and W2K as the slave
and it works fine. I then swapped it so the W2K was master and I get the
following from the Unix box.

020510 14:14:22  mysqld started
/usr/local/libexec/mysqld: ready for connections
020510 14:14:22  Slave: connected to master '[EMAIL PROTECTED]:3306',
replication started in log 'FIRST' at position 4
020510 14:14:22  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:14:22  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:14:22  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:14:22  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:15:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:15:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:15:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:16:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:16:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:16:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:17:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:17:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:17:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:18:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:18:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:18:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:19:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:19:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:19:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:20:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:20:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:20:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)


So it's reading the my.cnf file because I wouldn't be able to use it as a
slave otherwise.

Very strange, any other things to try?

Ray

-Original Message-
From: Luc Foisy [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2002 2:24
To: 'Raymond Brighenti'; MYSQL-List (E-mail)
Subject: RE: Replication Problem


actually you may want to change [MYSQLD] to [mysqld] and restart your slave
server
I don't think it has read your my.cnf file correctly ( that means the other
settings will not have taken affect either, like password and server ID)

-Original Message-
From: Raymond Brighenti [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 5:24 AM
To: 
Subject: Replication Problem


Hi,

Trying to get replication going between to W2K machines and getting the
following errors in the Slave log file.

MySql: ready for connections
020509 18:58:52  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 18:59:54  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec
020509 19:00:57  Slave thread: error connecting to master:Can't connect to
MySQL server on '' (10049)(0), retry in 60 sec

Below are the two my.cnf files which as far as I can see should be ok.

my.cnf Master
[mysqld]
log-bin
server-id=1

my.cnf Slave
[MYSQLD]
master-host=20.0.0.54
master-user=echo
master-password=password
master-port=3306
server-id=2

Below are the output from some other checks, it's got the connecting to
master in the colum.
Looking at the log file it's getting the MySQL server on '' which seems to
indicate that it doesn't have a host or IP address to connect to!

Any ideas?

Thanks

Ray



So from Master...
mysql show master status;
+---+--+--+--+
| File  | Position | Binlog_do_db | Binlog_ignore_db |
+---+--+--+--+
| dnatest03-bin.002 | 73   |  |  |
+---+--+--+--+
1 row in set (0.00 sec)


And from Slave...
mysql show slave status
- ;
+-+-+-+---+--+-+
---+-+-++---
-+--+
| 

re: replication

2002-05-10 Thread Terrence Cox

Let's see your my.cnf file.  

- Original Message -
From: Azhar Khan [EMAIL PROTECTED]
Date: Wed, 8 May 2002 17:49:55 -0400
To: [EMAIL PROTECTED] 
Subject: re: replication 


 During the replication process 
http://www.mysql.com/documentation/mysql/bychapter/manual_MySQL_Database_Administration.html#Replication_HOWTO
 I followed all the steps from 1 - 9
  
 Everything works fine (i.e. both master (marge) and slave (wiggam) run individually) 
and only when on step 9 my log on the slave (wiggam) says:
  
 020508 17:19:47  mysqld started
 020508 17:19:48  InnoDB: Started
 /space/local/mysql-max-4.0.1-alpha-sun-solaris2.8-sparc/bin/mysqld: ready for 
connections
 020508 17:19:48  Slave thread: error connecting to master: Can't connect to MySQL 
server on 'marge' (146), last_errno=2003, retry in 60 sec
  
  
 That is it can't connect to the master...I need to know how I could fix this error. 
The log on my master (marge) says:
  
 020508 16:44:02  mysqld started
 020508 16:44:02  InnoDB: Started
 /opt/local/mysql-max-4.0.1-alpha-sun-solaris2.8-sparc/bin/mysqld: ready for 
connections
  
 Please help
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
 
 


-- 

Powered by Outblaze

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

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




next prev value not null

2002-05-10 Thread max

hi all,
I'm in trouble trying to create a sql query to get the prev  next value not
null starting from a specified point ... I mean:

table_a

id

23
24
56
62

starting from id 56, I need the id 24  the id 62 ... I've trying several
way  mysql funct to do this job but w/o success :(

anyone can help me, plz?

many thanks in advance
max



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

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




Re: RE: error granting rights

2002-05-10 Thread Gerald Clark

It should be  'username'@'localhost'


Mark Shade wrote:

Yep...

I am in as root, so I should have rights to everything.

Yep, I have confirmed that the dbname is right, but doublechecking it 
multiple times.  Plus, this happens even on db that I did the same thing to 
only a week ago.  The * just says all tables as I understand it.

And, that is what I am doing - setting up the user.  That is the whole 
point.

A couple of other considerations:

I have PHPMySQLAdmin running - and it runs just fine.  I can do most 
anything with it and have no errors.  Also, I did this same thing on a 
different db just 1 week ago with no errors.  This time, I even tried to 
scroll back through my commands in mysql at the mysql command prompt and re-
submit the same commands - I get the same error.  I have tried it on a 
variety of dbs and users, but no success.

Thanks for all your help,

Mark

[snip]
mysql GRANT ALL
 - ON dbname.*
 - TO username@localhost
 - IDENTIFIED BY 'password';
[/snip]

A. Do you have GRANT capability as the user that you are logged on as?
2. Is dbname.* right? Shouldn't it be just dbname?
III. Is user set up as username@localhost?

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




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

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: next prev value not null

2002-05-10 Thread Joseph Bueno

max a écrit :
 
 hi all,
 I'm in trouble trying to create a sql query to get the prev  next value not
 null starting from a specified point ... I mean:
 
 table_a
 
 id
 
 23
 24
 56
 62
 
 starting from id 56, I need the id 24  the id 62 ... I've trying several
 way  mysql funct to do this job but w/o success :(
 
 anyone can help me, plz?
 
 many thanks in advance
 max
 

Hi,

I haven't found a solution with a single query but with 2 queries you can do:

select max(id) from table_a where id56;
select min(id) from table_a where id56;

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




hostname vs localhost...

2002-05-10 Thread Richard Idalski

I need to connect to a MySQL database from a remote machine but it seems
that when the mysql was setup, that it was only setup with localhost, and
not it's hostname. IE: When I try these commands:

'mysqladmin -h ren2 --port=3306 version'
I get the following :
mysqladmin: connect to server at 'ren2' failed
error: 'Can't connect to MySQL server on 'ren2' (111)'
Check that mysqld is running on ren2 and that the port is 3306.
You can check this by doing 'telnet ren2 3306'

However if from the same machine I do:

'mysqladmin -h localhost --port=3306 version'
I get:
mysqladmin  Ver 8.0 Distrib 3.22.32, for pc-linux-gnu on i686
TCX Datakonsult AB, by Monty

Server version  3.22.32
Protocol version10
Connection  Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 9 days 7 hours 25 min 52 sec

Threads: 2  Questions: 30874532  Slow queries: 1135  Opens: 3336  Flush
tables: 7  Ope
n tables: 86

How can I get this to work for hostname as well as localhost, hopefully
without distrupting any of the database users?


Thanks,

---
Richard Idalski
System Administrator
Nando Media
www.nandomedia.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: Replication Problem

2002-05-10 Thread Luc Foisy

mysql show slave status
- ;
+-+-+-+---+--+-+
---+-+-++---
-+--+
| Master_Host | Master_User | Master_Port | Connect_retry | Log_File | Pos |
Slave_Running | Replicate_do_db | Replicate_ignore_db | Last_errno |
Last_error | Skip_counter |
+-+-+-+---+--+-+
---+-+-++---
-+--+
|   | test| 3306| 60   |  | 4
| Yes   | |   | 0  |
| 0|
+-+-+-+---+--+-+
---+-+-++---
-+--+
1 row in set (0.00 sec)

this is telling me it has NOT read from the 
my.cnf Slave
[MYSQLD]
master-host=20.0.0.54
master-user=echo
master-password=password
master-port=3306
server-id=2

these are default values I think
if the below is the current log file from the slave, then the above slave
status is not up to date (can you provide a current 'show slave status\G'?)

the log 'FIRST' is NOT how mysql creates log files, I see no indication in
your .cnf files to say this would be different
the correct format for the log files should be (as far as the documentation
goes)HOSTNAME-bin.### by default

Look in your master mysql root directory for a file that matches this
format, that will be your log file
(i personally don't like the way your slave is changing the possition of the
log file either)

When you start slaving from a master, the slave MUST contain the exact same
data as the master at the very moment you started the binary logs on the
master
(apparently this wont be true in upcoming 4.x, you will be able to start a
slave at anytime)

I am not sure replication will create databases for you ( not tested, and
not even looked at ), not sure if that is binary logged

I do not know if changes to the 'mysql' database will get logged ( i do not
recall reference to that in the documentation ), so I am not sure if that
will change your slave data

-Original Message-
From: Raymond Brighenti [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 9:24 AM
To: 'Luc Foisy'; '[EMAIL PROTECTED]'
Subject: RE: Replication Problem


Hi,

I tried using a FreeBSD box with MySQL as the Master and W2K as the slave
and it works fine. I then swapped it so the W2K was master and I get the
following from the Unix box.

020510 14:14:22  mysqld started
/usr/local/libexec/mysqld: ready for connections
020510 14:14:22  Slave: connected to master '[EMAIL PROTECTED]:3306',
replication started in log 'FIRST' at position 4
020510 14:14:22  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:14:22  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:14:22  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:14:22  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:15:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:15:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:15:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:16:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:16:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:16:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:17:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:17:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:17:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:18:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:18:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:18:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:19:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:19:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at position 31
020510 14:19:23  Slave: received 0 length packet from server, apparent
master shutdown:  (0)
020510 14:20:23  Slave: Failed reading log event, reconnecting to retry, log
'FIRST' position 31
020510 14:20:23  Slave: reconnected to master
'[EMAIL PROTECTED]:3306',replication resumed in log 'FIRST' at 

Perl-Mysql manual (.chm version)

2002-05-10 Thread Onder Hazaroglu


I use Perl, Php, mysql for my applications. I have a great manual for php
for mysql processes. But i do not know any manual for perl yet. Does
anyone know any manual about for perl-mysql? Better if would be .chm
version. Thanks.

-Onder


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

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: hostname vs localhost...

2002-05-10 Thread Joseph Bueno

Richard Idalski a écrit :
 
 I need to connect to a MySQL database from a remote machine but it seems
 that when the mysql was setup, that it was only setup with localhost, and
 not it's hostname. IE: When I try these commands:
 
 'mysqladmin -h ren2 --port=3306 version'
 I get the following :
 mysqladmin: connect to server at 'ren2' failed
 error: 'Can't connect to MySQL server on 'ren2' (111)'
 Check that mysqld is running on ren2 and that the port is 3306.
 You can check this by doing 'telnet ren2 3306'
 
 However if from the same machine I do:
 
 'mysqladmin -h localhost --port=3306 version'
 I get:
 mysqladmin  Ver 8.0 Distrib 3.22.32, for pc-linux-gnu on i686
 TCX Datakonsult AB, by Monty
 
 Server version  3.22.32
 Protocol version10
 Connection  Localhost via UNIX socket
 UNIX socket /var/lib/mysql/mysql.sock
 Uptime: 9 days 7 hours 25 min 52 sec
 
 Threads: 2  Questions: 30874532  Slow queries: 1135  Opens: 3336  Flush
 tables: 7  Ope
 n tables: 86
 
 How can I get this to work for hostname as well as localhost, hopefully
 without distrupting any of the database users?
 
 Thanks,
 
 ---
 Richard Idalski
 System Administrator
 Nando Media
 www.nandomedia.com
 --

Hi,

It seems that your mysqld has been started with option 'skip-networking'.
You can check that with mysqladmin variables; 'skip_networking' should
be ON.
If this is the case, you will have to find out how this option was set
(either as an argument to mysqld in safe_mysqld script or defined in /etc/my.cnf),
change it and restart mysqld (this will disturb your users :( ).

BTW, your 'mysqladmin -h localhost --port=3306 version' command, did not
check connectivity on port 3306. Since you are connecting to localhost,
mysqladmin has used /var/lib/mysql/mysql.sock UNIX socket instead of a
TCP/IP socket.

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

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

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




Distributed MySQL : How to synchronize ?

2002-05-10 Thread Christophe Demange

Hello,

I have a question:

We want to real-time synchronize a MySQL database part with a distant
database.
We have a central database containing all the data. This database must share
several parts (records) with the local databases.
All transactions made in the central database must be replicated to the
corresponding local database. This will ensure to have the data available
while the network is down.
In the same time some transactions can be made in the local database, this
includes to have a dual-way replication mechanism.

I have searched replication documentation and articles and I have only found
master-slave relationship. We think this master-slaves relationship doesn't
exactly fit our needs.

Please could you explain us what is the best solution to use for this
architecture.
Thank you for your support.

_

Christophe DEMANGE
Project Manager

GAEL Consultant
Cité Descartes
18, rue Albert Einstein
77420 Champs-sur-Marne
France

mailto:[EMAIL PROTECTED]
http://www.gael.fr
tel +33-(0)1 64 73 99 55
fax +33-(0)1 64 73 51 60
_


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

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




Transactions

2002-05-10 Thread Christophe Demange

Hello,

I had written last week because I tried to send a mail to
[EMAIL PROTECTED] about MySQL transactions without success.
[EMAIL PROTECTED] answered me, but I can't send a mail to him.
Using  set autocommit=0; doesn't fix the problem...

My problem was :

We have 2 threads using sql instruction BEGIN-COMMIT/ROLLBACK (with
Berkeley-db). There is a
conflict if we make this schema:

THREAD 1  |  THREAD 2
  |
begin;|
  |  begin;
select * from table;  |
  |  delete from table where id=4;
update table...   |


An error comes on thread 1:
ERROR 1030: Got error -30996 from table handler

What does it mean?
What can we do to lock table at the first BEGIN and not at the first update
or delete?
(We want that thread 1 locks table at the begin to avoid the error)?

What is the difference between :
begin;

commit;

and :
set  autocommit=0;

set  autocommit=1;

Thank you for your support.

ChristopheDEMANGE



GAEL Consultant
Cité Descartes
18, rue Albert Einstein
77420 Champs-sur-Marne
France Project Manager
mailto:[EMAIL PROTECTED]
http://www.gael.fr
tel +33-(0)1 64 73 99 55
fax +33-(0)1 64 73 51 60


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

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




why null being returned

2002-05-10 Thread Lalit Nagpal


through a servlet i insert my form data into my table
(primary key is auto-incremented) and then i throw
another query which is 
select last_insert_id() from mytable limit 1
through my statement.executeQuery method. when i ask
for the data through
myresultset.getString(1) i get null
NullPointerException 
why ... any ideas ... i welcome your suggestions
friends.

# Lalit Nagpal #

__
Do You Yahoo!?
Yahoo! Shopping - Mother's Day is May 12th!
http://shopping.yahoo.com

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

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




RE: Windows 2000 MySQL login

2002-05-10 Thread Jay Blanchard

[snip]
My VB application has a log-in screen with two fields, userID and
userPassword.
When these are correctly filled in, MySQL logs me in and the application
opens.
 But, I can also log in (as myself) if I leave both fields blank.  And the
plot
thickens when considering the following VB code snippet.

If this code is run 'as is' then I log in.  If the commented code is
restored I
am thrown out.  But the code appears not to change anything.  This doesn't
make
sense.
[/snip]

Can you go to another computer where someone else is logged in to the
network, or can you log in to the network as someone else and try this? Is
your login username/password for the network the same as MySQL?

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




Qoute

2002-05-10 Thread Mark

This is too weird; I can quote until I see blew in the face, but I cannot
seem to make MySQL understand that the name 'group-name' is valid to select.
It keeps blabbing You have an error in your SQL syntax. I mean, what is
the purpose of its own quote function if it can not even quote properly?
Every other name works fine, except when a WHERE clause looks for a column
whose value has a dash in it.

- Mark


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

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

2002-05-10 Thread Jay Blanchard

[snip]
This is too weird; I can quote until I see blew in the face, but I cannot
seem to make MySQL understand that the name 'group-name' is valid to select.
It keeps blabbing You have an error in your SQL syntax. I mean, what is
the purpose of its own quote function if it can not even quote properly?
Every other name works fine, except when a WHERE clause looks for a column
whose value has a dash in it.
[/snip]

Can we see the query?

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: Perl-Mysql manual (.chm version)

2002-05-10 Thread Colin Faber

Hi see perldoc DBI and perldoc DBD::mysql

(search.cpan.org)


Onder Hazaroglu wrote:
 
 I use Perl, Php, mysql for my applications. I have a great manual for php
 for mysql processes. But i do not know any manual for perl yet. Does
 anyone know any manual about for perl-mysql? Better if would be .chm
 version. Thanks.
 
 -Onder
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 To request this thread, e-mail [EMAIL PROTECTED]
 To unsubscribe, e-mail [EMAIL PROTECTED]
 Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 
Colin Faber
(303) 736-5160
fpsn.net, Inc.

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

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




Re: Qoute

2002-05-10 Thread Paul DuBois

At 17:26 +0200 5/10/02, Mark wrote:
This is too weird; I can quote until I see blew in the face, but I cannot
seem to make MySQL understand that the name 'group-name' is valid to select.
It keeps blabbing You have an error in your SQL syntax. I mean, what is
the purpose of its own quote function if it can not even quote properly?
Every other name works fine, except when a WHERE clause looks for a column
whose value has a dash in it.

- Mark


It's kind of difficult to offer any help when you don't show
the query that's causing the problem.

Or were you just making a rhetorical comment? :-)

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

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

2002-05-10 Thread Mark

 This is too weird; I can quote until I see blew in the face, but I cannot
 seem to make MySQL understand that the name 'group-name' is valid to
 select. It keeps blabbing You have an error in your SQL syntax. I mean,
 what is the purpose of its own quote function if it can not even quote
 properly? Every other name works fine, except when a WHERE clause looks
 for a column whose value has a dash in it. [/snip]

 Can we see the query?

 Jay

Sure.

$sth = $dbh - prepare (SELECT expiration from newsgroups WHERE
newsgroup='$group');
$sth - execute;

$group is a newsgroup name; all queries go fine, except one that has a dash
in it. I have tried quoting $group, like:

$newsgroup = $dbh - quote ($group);

$group, btw, where it goes wrong, is a recovery newsgroup called
alt.support.abuse-partners.

I have had Perl quotemeta the whole thing, I haver dropped and added the
single-quotes, I have used place-holders, etc. But I always get, You have
an error in your SQL syntax.

Funnily enough, I had no problem inserting the name into the column.

Sigh. This is such a newbie question, I realize it. But it is rather
frustrating. I appreciate your help.

- Mark


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

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

2002-05-10 Thread Jay Blanchard

[snip]
$sth = $dbh - prepare (SELECT expiration from newsgroups WHERE
newsgroup='$group');
$sth - execute;

$group is a newsgroup name; all queries go fine, except one that has a dash
in it. I have tried quoting $group, like:

$newsgroup = $dbh - quote ($group);

$group, btw, where it goes wrong, is a recovery newsgroup called
alt.support.abuse-partners.

I have had Perl quotemeta the whole thing, I haver dropped and added the
single-quotes, I have used place-holders, etc. But I always get, You have
an error in your SQL syntax.
[/snip]

Have you tried double-quotes? '$group' ?
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: Qoute

2002-05-10 Thread Philip Molter

On Fri, May 10, 2002 at 05:49:12PM +0200, Mark wrote:
:  This is too weird; I can quote until I see blew in the face, but I cannot
:  seem to make MySQL understand that the name 'group-name' is valid to
:  select. It keeps blabbing You have an error in your SQL syntax. I mean,
:  what is the purpose of its own quote function if it can not even quote
:  properly? Every other name works fine, except when a WHERE clause looks
:  for a column whose value has a dash in it. [/snip]
: 
:  Can we see the query?
: 
:  Jay
: 
: Sure.
: 
: $sth = $dbh - prepare (SELECT expiration from newsgroups WHERE
: newsgroup='$group');
: $sth - execute;

Try:

  $sth = $dbh-prepare( 'SELECT expiration FROM newsgroups WHERE newsgroup=?' );
  $sth-execute( $group );
  ...

* Philip Molter
* Texas.net Internet
* http://www.texas.net/
* [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: Qoute

2002-05-10 Thread Mark

- Original Message -
From: Philip Molter [EMAIL PROTECTED]
To: Mark [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, May 10, 2002 6:01 PM
Subject: Re: Qoute


 Try:

   $sth = $dbh-prepare( 'SELECT expiration FROM newsgroups WHERE
   newsgroup=?' );
   $sth-execute( $group );
   ...


I already tried that; but that makes no difference. My guess is that MySQL
seems to think I want to do some calculation, as it may interpret the dash
as a minus sign; but it really is a string, honestly. :)

- Mark


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

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

2002-05-10 Thread Mark

- Original Message -
From: Jay Blanchard [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, May 10, 2002 6:01 PM
Subject: RE: Qoute

 Have you tried double-quotes? '$group' ?
 Jay


I do not see how that can be done; when I do that, Perl complains of a dozen
of syntax errors because the first double quote is seen as closing the,

$sth = $dbh - prepare (SELECT expiration ...

Query.

- Mark


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

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

2002-05-10 Thread Paul DuBois

At 17:49 +0200 5/10/02, Mark wrote:
   This is too weird; I can quote until I see blew in the face, but I cannot
  seem to make MySQL understand that the name 'group-name' is valid to
  select. It keeps blabbing You have an error in your SQL syntax. I mean,
  what is the purpose of its own quote function if it can not even quote
  properly? Every other name works fine, except when a WHERE clause looks
  for a column whose value has a dash in it. [/snip]

  Can we see the query?

  Jay

Sure.

$sth = $dbh - prepare (SELECT expiration from newsgroups WHERE
newsgroup='$group');
$sth - execute;


$sth = $dbh-prepare (SELECT expiration FROM newsgroups WHERE newsgroup = ?);
$sth-execute ($group);

Note: no quotes around the placeholder character.


$group is a newsgroup name; all queries go fine, except one that has a dash
in it. I have tried quoting $group, like:

$newsgroup = $dbh - quote ($group);

That will work, unless you left the quotes around the variable in
the statement.


$group, btw, where it goes wrong, is a recovery newsgroup called
alt.support.abuse-partners.

I have had Perl quotemeta the whole thing, I haver dropped and added the
single-quotes, I have used place-holders, etc. But I always get, You have
an error in your SQL syntax.

Funnily enough, I had no problem inserting the name into the column.

Sigh. This is such a newbie question, I realize it. But it is rather
frustrating. I appreciate your help.

- Mark



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

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




Source compile on Tru64 Unix?

2002-05-10 Thread Paul Reilly


Hi,

I'm trying to compile mysql 3.23.49 on a compaq DS10 box running
Tru64 Unix 5.1 . The binary for ev6 doesn't seem to work on this
architecture (Alpha 21264 processor) and so I'm compiling using
the compaq c and c++ compilers (v6.2) from source.

Compaq 'make' doesn't work so I'm using 'GNU make' (3.79.1) as suggested.
However it seems to be linking to something in /local/mysql/lib/ and
failing (see below)

Is there a recommended build environment for Tru64 Unix?
I note it is one of the OS's on which MySQL is said to work, but
I can only find specific build instructions DEC Unix 4.x and the
environment/configure script for this doesn't even get past 'configure'
on Tru64 5.1

Thanks

Paul

Making all in client
make[2]: Entering directory `/sources/BUILD/mysql-3.23.49/client'
/bin/sh ../libtool --mode=link cxx  -O3 -DDBUG_OFF-o mysql  mysql.o readline.o 
sql_string.o completion_hash.o ../readline/libreadline.a -lcurses 
../libmysql/libmysqlclient.la  -lz -lm
cxx -O3 -DDBUG_OFF -o .libs/mysql mysql.o readline.o sql_string.o completion_hash.o 
../readline/libreadline.a -lcurses ../libmysql/.libs/libmysqlclient.so -lz -lm -lz -lm 
-Wl,-rpath -Wl,/local/mysql/lib/mysql
ld (prelink):
Can't open: /local/mysql/lib/mysql (No such file or directory)
ld:
Can't open: /local/mysql/lib/mysql (No such file or directory)
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/sources/BUILD/mysql-3.23.49/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/sources/BUILD/mysql-3.23.49'
make: *** [all-recursive-am] Error 2


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

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

2002-05-10 Thread Michael Stassen


Maybe I'm misreading what you did, but $dbh-quote($group) adds the single
quotes around the string, so using it followed by ...WHERE
newsgroup='$group'  gets you

WHERE newsgroup=''name.of.group''

Also, your example sets $newsgroup using quote, but uses $group in the
query, which is a problem, of course, if you really did that.

Try this:

$newsgroup = $dbh-quote($group);
$sth = $dbh - prepare (SELECT expiration from newsgroups
 WHERE newsgroup=$newsgroup);
$sth - execute;

Michael

On Fri, 10 May 2002, Mark wrote:

  This is too weird; I can quote until I see blew in the face, but I cannot
  seem to make MySQL understand that the name 'group-name' is valid to
  select. It keeps blabbing You have an error in your SQL syntax. I mean,
  what is the purpose of its own quote function if it can not even quote
  properly? Every other name works fine, except when a WHERE clause looks
  for a column whose value has a dash in it. [/snip]
 
  Can we see the query?
 
  Jay

 Sure.

 $sth = $dbh - prepare (SELECT expiration from newsgroups WHERE
 newsgroup='$group');
 $sth - execute;

 $group is a newsgroup name; all queries go fine, except one that has a dash
 in it. I have tried quoting $group, like:

 $newsgroup = $dbh - quote ($group);

 $group, btw, where it goes wrong, is a recovery newsgroup called
 alt.support.abuse-partners.

 I have had Perl quotemeta the whole thing, I haver dropped and added the
 single-quotes, I have used place-holders, etc. But I always get, You have
 an error in your SQL syntax.

 Funnily enough, I had no problem inserting the name into the column.

 Sigh. This is such a newbie question, I realize it. But it is rather
 frustrating. I appreciate your help.

 - Mark


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

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

2002-05-10 Thread Victoria Reznichenko

Mark,
Thursday, May 09, 2002, 7:31:28 PM, you wrote:

MS I am trying to grant rights to a new db to a new user.
MS I am issuing the following commands (with obvious substitutions):

MS mysql GRANT ALL
MS  - ON dbname.*
MS  - TO username@localhost
MS  - IDENTIFIED BY 'password';

MS I get the following error:
MS Ignoring query to other database

Mark, what options do you use for mysql program?
And show me the output of SHOW GRANTS, please.

MS Thanks,
MS Mark




-- 
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: Help! Error building 4.0.2 under RH Linux 7.2

2002-05-10 Thread Trond Eivind Glomsrød

crashke [EMAIL PROTECTED] writes:

 Hi Vadim, I don't know but have you read the instructions on the
 Mysql-website?

gcc 2.96RH is a known good and stable compiler, no matter what FUD the
site might claim. The below looks like broken code, plain and simple:
Lack of declarations.

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

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

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




RE: Re: Qoute

2002-05-10 Thread domi


Well... This seems to be a typical tricky-goute-on-qoute thing...
I recommend you to test your query in mysql client directly 
(if you havn't already done that).

And THEN take the battle with perls quoting mechanism...

Another tip is to just print the query before executing
so You can see exactly how perl is handling with quotes.
Propably You need to espace quotes to hide them from perl.

I think this is quote... eh.. I mean quite common way to
track down this kind of problems but I say it 'just in case'
You haven't try it yet...

good luck :-)

=d0Mi=

From: Mark [EMAIL PROTECTED]
To:  [EMAIL PROTECTED]
Subject: Re: Qoute

 - Original Message -
 From: Jay Blanchard [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Friday, May 10, 2002 6:01 PM
 Subject: RE: Qoute
 
  Have you tried double-quotes? '$group' ?
  Jay
 
 
 I do not see how that can be done; when I do that, Perl complains of a dozen
 of syntax errors because the first double quote is seen as closing the,
 
 $sth = $dbh - prepare (SELECT expiration ...
 
 Query.
 
 - Mark
 
 
 -
 Before posting, please check:
http://www.mysql.com/manual.php   (the manual)
http://lists.mysql.com/   (the list archive)
 
 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: Re: Qoute

2002-05-10 Thread Paul DuBois

At 16:52 + 5/10/02, [EMAIL PROTECTED] wrote:
Well... This seems to be a typical tricky-goute-on-qoute thing...
I recommend you to test your query in mysql client directly
(if you havn't already done that).

There really are no tricky quote-on-quote things, except when people
try to mess around quoting data values themselves.

Follow these principles, and you'll never have a problem:

- Use placeholders for data values in the query string, then pass values
   to be bound the placeholders when you execute the statement.
or
- Use $dbh-quote() to quote the values, then insert the result directly
   into the query string.

and

- Never put quotes around the placeholder characters or around a data
   value that has been processed by $dbh-quote().

That's it.  It works for numbers, text, NULL (undef) binary stuff like
images, whatever.


And THEN take the battle with perls quoting mechanism...

Another tip is to just print the query before executing
so You can see exactly how perl is handling with quotes.
Propably You need to espace quotes to hide them from perl.

I think this is quote... eh.. I mean quite common way to
track down this kind of problems but I say it 'just in case'
You haven't try it yet...

good luck :-)

=d0Mi=


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

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

2002-05-10 Thread Mark

- Original Message -
From: Paul DuBois [EMAIL PROTECTED]
To: Mark [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Friday, May 10, 2002 6:09 PM
Subject: Re: Qoute


 $group is a newsgroup name; all queries go fine, except one that has
 a dash in it. I have tried quoting $group, like:
 
 $newsgroup = $dbh - quote ($group);

 That will work, unless you left the quotes around the variable in
 the statement.


I solved it. Stupidity was the cause. Mine, to be precise. :)

I had expired articles, and for one group there where no articles left
anymore thereafter. Had I taken the time to inspect my previous query, I
would have seen that min + max(article_num) were no longer defined,

DBD::mysql::st execute failed: You have an error in your SQL syntax near '
stop= WHERE newsgroup = 'alt.support.abuse-partners'' at line 1 at
../MySQL-expire-news.pl line 34.

MySQL simply tripped over stop having no value anymore. I should have
realized that the placeholder I used to insert the entry, should also work
to select the entry, and that, hence, a different cause existed for the
failed query.

Sorry my frustration made me ask before I looked.

- Mark


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

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




trouble with field NULL

2002-05-10 Thread raphael k

I created a table with a field define as NULL, however when I insert
values NULL , Mysql puts 0 instead of nothing ,

I don't understand why I have this trouble , 

 

Thanks 



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

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




funny truncate problem

2002-05-10 Thread Mihail Manolov

Hey guys,

did you spot this problem?

mysql select truncate(199.20,2);
++
| truncate(199.20,2) |
++
| 199.19 |
++
1 row in set (0.00 sec)

Bug?


Mihail Manolov
Government Liquidation, LLC
202 467 6868 x.227
[EMAIL PROTECTED]
www.govliquidation.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: trouble with field NULL

2002-05-10 Thread Joseph Bueno

raphael k wrote :
 
 I created a table with a field define as NULL, however when I insert
 values NULL , Mysql puts 0 instead of nothing ,
 
 I don't understand why I have this trouble ,
 
 
 
 Thanks
 

Hi,

If you don't show us your query, it will be hard to help you ...

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




trouble with field NULL

2002-05-10 Thread raphael k


I created a table with a field define as NULL, however when I insert
values NULL , Mysql puts 0 instead of nothing ,

I don't understand why I have this trouble ,



Thanks



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

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




Re: mysql uses 99% cpu under freebsd 4.3

2002-05-10 Thread Jeremy Zawodny

On Thu, May 09, 2002 at 11:18:35AM -0400, Ken Menzel wrote:

 Gunnar, This sounds very interesting!  I will have to try this and
 see if I cannot aggravate the problem with large cache values.
 Thank you for sharing this information.  Jeremy I hope you will
 share something if you can reproduce this issue.

If we see it again here, I'll do some testing with this info.

So far I've experienced it on one SMP box and one single CPU box.  I
don't believe either of them had very fancy my.cnf files, but I'll
have to check.

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

MySQL 3.23.47-max: up 92 days, processed 2,398,590,779 queries (301/sec. avg)

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

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




Re: How dangerous is OPTIMIZE TABLE?

2002-05-10 Thread Jeremy Zawodny

On Fri, May 10, 2002 at 12:55:39PM +0200, Mark wrote:
 How dangerous is OPTIMIZE TABLE?
 
 I have been reading through the FAQ, and came to the section on OPTIMIZE
 TABLE.
 
 http://www.mysql.com/doc/O/P/OPTIMIZE_TABLE.html
 
 That has my interest, as my MySQL XOVER database will expire
 articles ever so often. But then I read a comment there that
 OPTIMIZE TABLE is dangerous, and can corrupt your database. :( Not
 what I want, really. The author that gave the warning spoke of
 tables with millions of rows. Mine only hold a hundred thousand, or
 so, max (closer to ~ 20 - 30 thousand a group).
 
 I will need OPTIMIZE TABLE, however, as many articles will expire
 over time, and I want the empty space reclaimed, of course. So, how
 dangerous is OPTIMIZE TABLE, really?

I use it pretty often and have never experienced any problems.
Usually when there are problems with data corruption, it is something
outside of MySQL (OS or hardware problems).

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

MySQL 3.23.47-max: up 92 days, processed 2,398,643,618 queries (301/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




Threaded application coredumps

2002-05-10 Thread Anatoliy

Hello,

  I develop threaded mysql client in c++ that uses connection
pool.

  The program coredumps during vio_read (called from my_net_read).
I'm using libmysqlclient_r and keep all rules from How to make
threaded client section. Thread-pool is implemented with
CommonC++ class Thread.
  my_thread_init() and my_thread_end() are called when the new thread
is created/deleted. my_init() is called in pool object constructor.

Could anyone email me working threaded client (preferably in c++) ?

The main query method is below. Does anyone have idea why it doesn't
work ? (I can post the rest of methods if needed)
All notes are welcome :)
Thanks.

--
//getFreeHandle() and disposeHandle() are mutexed and track which
//connections are in use (bool isBusy[MAX_CONN]).

int SQLPool::query(SQLResult res, string sql)
{
int i, ret;
res.free(); res.init();

int h = getFreeHandle();
if (h  0) return -1;

int rh = mysql_query(handles[h], sql.c_str());

if (rh  0) {
res.error = mysql_error(handles[h]);
LogMsg(str(\')+sql+': +res.error, L_GRP, LL_ALERT);
disposeHandle(h);
return -1;
}

MYSQL_RES *table = mysql_store_result(handles[h]);
ret = mysql_affected_rows(handles[h]);
if (! table || ! table-data) {
res.nRows = 0;
res.resetSeq();
res.isBusy = true;
//if (table) mysql_free_result(table);
disposeHandle(h);
return 0;
}

MYSQL_ROWS *row;
MYSQL_FIELD *field;
SQLRow *sqlrow;

res.nRows = mysql_num_rows(table);
res.nFields = mysql_num_fields(table);
if (res.nRows  0) res.rows = new SQLRow*[res.nRows];
if (res.nFields 0 ) res.fieldNames = new char*[res.nFields];

// Copy field names
for(i=0; i  res.nFields; i++) {
res.fieldNames[i] = new char[xstrlen(table-fields[i].name)+1];
xstrcpy(res.fieldNames[i], table-fields[i].name);
}

// Copy data row-by-row
for(i=0, row = table-data-data; row  i  res.nRows; i++, row = row-next) {
sqlrow = new SQLRow(res.nFields);
for(int j=0; jres.nFields; j++) {
int len = xstrlen(row-data[j]);
sqlrow-data[j] = new char[len+1];
xstrcpy(sqlrow-data[j], row-data[j]);
}
sqlrow-parent = res;
res.rows[i] = sqlrow;
}
mysql_free_result(table);
disposeHandle(h);
return ret;
}

-- 
Best regards,
 Anatoliy  mailto:[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: trouble with field NULL

2002-05-10 Thread Steve Buehler

I have found that I can NOT do this:
$null = NULL or even $null = NULL than put that into a statement like this:
UPDATE games SET game_id = '$null';
can't do it like this either
UPDATE games SET game_id = $null;
I have to do it like this:
UPDATE games SET game_id = NULL;
NO QUOTES of any kind.  Somebody else might have a way around this.  In 
that case, I would like to hear it too.  That would let me get around the 
following:

$searchStmt = UPDATE games SET
date = '$date',
time = '$time',;
if($loc_id == ){$searchStmt .= loc_id = NULL,;}else{$searchStmt .= 
loc_id = '$loc_id',;}
if($hteam_pt == ){$searchStmt .= hteam_pt = NULL,;}else{$searchStmt .= 
hteam_pt = '$hteam_pt',;}
if($vteam_pt == ){$searchStmt .= vteam_pt = NULL,;}else{$searchStmt .= 
vteam_pt = '$vteam_pt',;}
if($sea_id == ){$searchStmt .= sea_id = NULL,;}else{$searchStmt .= 
sea_id = '$sea_id',;}
if($hteam == ){$searchStmt .= hteam = NULL,;}else{$searchStmt .= hteam 
= '$hteam',;}
if($vteam == ){$searchStmt .= vteam = NULL,;}else{$searchStmt .= vteam 
= '$vteam',;}
if($hteam_forfeit == ){$searchStmt .= hteam_forfeit = 
NULL,;}else{$searchStmt .= hteam_forfeit = '1',;}
if($vteam_forfeit == ){$searchStmt .= vteam_forfeit = 
NULL,;}else{$searchStmt .= vteam_forfeit = '1',;}
if($official_1 == ){$searchStmt .= official_1 = NULL,;}else{$searchStmt 
.= official_1 = '$official_1',;}
if($official_2 == ){$searchStmt .= official_2 = NULL,;}else{$searchStmt 
.= official_2 = '$official_2',;}
if($official_3 == ){$searchStmt .= official_3 = NULL,;}else{$searchStmt 
.= official_3 = '$official_3',;}
if($official_4 == ){$searchStmt .= official_4 = NULL,;}else{$searchStmt 
.= official_4 = '$official_4',;}
if($official_5 == ){$searchStmt .= official_5 = NULL ;}else{$searchStmt 
.= official_5 = '$official_5' ;}
$searchStmt .= where game_id = '$game_id' ;

The previous is in a PHP script calling a MySQL DB.

Steve


At 12:22 PM 5/10/2002, raphael k wrote:
I created a table with a field define as NULL, however when I insert
values NULL , Mysql puts 0 instead of nothing ,

I don't understand why I have this trouble ,



Thanks



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

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


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

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




Update Statement Failing

2002-05-10 Thread Ekins, Phil

Basic Question

I'm programmatically open a dataset using this select statement

-   SELECT SOD_TAG_DET.*, TAG_MSTR.TAG_NUM 
FROM SOD_TAG_DET, TAG_MSTR 
WHERE (SOD_TAG_DET.TAG_ID = TAG_MSTR.TAG_ID) AND
(SOD_TAG_DET.SODMstrID = 20)
ORDER BY TAG_MSTR.TAG_NUM

however when I do updates against the dataset it fails (because of the
multiple tables I'm assuming)

so...

id like to use this statement - 

select *, (SELECT TAG_NUM FROM TAG_MSTR WHERE Tag_mstr.TAG_ID =
SOD_TAG_DET.Tag_id) AS TAG_NUM from SOD_TAG_DET WHERE SODMstrid = 20 

but MySQL doesn't like this either

I'm working with a disconnected recordset so when I do a batch update I have
multiple updates to apply (and this method works fine in the SQL Server
system I converting) so whilst I could loop through all the records and
apply multiple update statements the batch update is cleaner

suggestions...

TIA

Phil

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

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




Re: Can't RESTORE TABLE...

2002-05-10 Thread Jeremy Zawodny

On Fri, May 10, 2002 at 10:12:15AM +0100, ritu singla wrote:
 Hi!!
 
 I used BACKUP TABLE command to take the backup of a
 table...but when i say
 RESTORE TABLE, i get the following ::
 
 
 mysql restore table rs from '/tmp';
 +---+-+--+--+
 | Table | Op  | Msg_type | Msg_text   
  |
 +---+-+--+--+
 | rs| restore | error| Failed copying .frm
 file |
 +---+-+--+--+
 1 row in set (0.00 sec)
 
 The output after BACKUP TABLE was ::
 mysql backup table abc to '/tmp';
 +--++--+--+
 | Table| Op | Msg_type | Msg_text |
 +--++--+--+
 | ritu.abc | backup | status   | OK   |
 +--++--+--+
 1 row in set (0.00 sec)
 
 
 Pls. tell me where i went wrongi locked the table
 before backup...

What version of MySQL are you using?  I've reproduced the bug in
3.23.47, but found that it works just fine in 4.0.2.  You might check
the change logs to see if it was fixed in a release after the one
you're using.

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

MySQL 3.23.47-max: up 92 days, processed 2,398,838,413 queries (301/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




Loading new setting without restarting the server

2002-05-10 Thread Andrew Kuebler

I've made a few config changes (examples below) in the my.ini except the
server constantly utilizes 66 meg of memory total (Including OS) and I
never see mysql memory usage go any higher than 12-13 meg of memory
usage no matter how much strain I put on the machine. I do not believe
these new settings are taking affect... and I would assume I will need
to restart the server? Is there another way to load the new settings
without taking the server down?

The machine has 512Meg currently and is dedicated for Databases only...I
want to get full performance out of the machine...

set-variable = sort_buffer=8M
set-variable = record_buffer=4M
set-variable = table_cache=256
set-variable = key_buffer=128M

Any help is appreciated. Thank You in advance...

Andrew



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

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: trouble with field NULL

2002-05-10 Thread Paul DuBois

At 13:11 -0500 5/10/02, Steve Buehler wrote:
I have found that I can NOT do this:
$null = NULL or even $null = NULL than put that into a statement like this:
UPDATE games SET game_id = '$null';
can't do it like this either
UPDATE games SET game_id = $null;
I have to do it like this:
UPDATE games SET game_id = NULL;
NO QUOTES of any kind.  Somebody else might have a way around this. 
In that case, I would like to hear it too.  That would let me get 
around the following:

None of those will work, because you test for NULL using
IS NULL, not = NULL.

$searchStmt = UPDATE games SET
date = '$date',
time = '$time',;
if($loc_id == ){$searchStmt .= loc_id = NULL,;}else{$searchStmt 
.= loc_id = '$loc_id',;}
if($hteam_pt == ){$searchStmt .= hteam_pt = 
NULL,;}else{$searchStmt .= hteam_pt = '$hteam_pt',;}
if($vteam_pt == ){$searchStmt .= vteam_pt = 
NULL,;}else{$searchStmt .= vteam_pt = '$vteam_pt',;}
if($sea_id == ){$searchStmt .= sea_id = NULL,;}else{$searchStmt 
.= sea_id = '$sea_id',;}
if($hteam == ){$searchStmt .= hteam = NULL,;}else{$searchStmt .= 
hteam = '$hteam',;}
if($vteam == ){$searchStmt .= vteam = NULL,;}else{$searchStmt .= 
vteam = '$vteam',;}
if($hteam_forfeit == ){$searchStmt .= hteam_forfeit = 
NULL,;}else{$searchStmt .= hteam_forfeit = '1',;}
if($vteam_forfeit == ){$searchStmt .= vteam_forfeit = 
NULL,;}else{$searchStmt .= vteam_forfeit = '1',;}
if($official_1 == ){$searchStmt .= official_1 = 
NULL,;}else{$searchStmt .= official_1 = '$official_1',;}
if($official_2 == ){$searchStmt .= official_2 = 
NULL,;}else{$searchStmt .= official_2 = '$official_2',;}
if($official_3 == ){$searchStmt .= official_3 = 
NULL,;}else{$searchStmt .= official_3 = '$official_3',;}
if($official_4 == ){$searchStmt .= official_4 = 
NULL,;}else{$searchStmt .= official_4 = '$official_4',;}
if($official_5 == ){$searchStmt .= official_5 = NULL 
;}else{$searchStmt .= official_5 = '$official_5' ;}
$searchStmt .= where game_id = '$game_id' ;

The previous is in a PHP script calling a MySQL DB.

Steve


At 12:22 PM 5/10/2002, raphael k wrote:
I created a table with a field define as NULL, however when I insert
values NULL , Mysql puts 0 instead of nothing ,

I don't understand why I have this trouble ,


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

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: Mysqld runs with high cpu load on freebsd 4.4

2002-05-10 Thread Jeremy Zawodny

On Wed, May 08, 2002 at 10:12:10AM -0400, adam nelson wrote:

 I am not having any troubles on 4.5 using plain mysql.  Our
 transaction is lower than some (but certainly higher than others) at
 4 queries/sec avg.

It seems to be unrelated to load.  I've seen this happen on a relatively
lightly box once.

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

MySQL 3.23.47-max: up 92 days, processed 2,399,002,729 queries (301/sec. avg)

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

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




Re: Loading new setting without restarting the server

2002-05-10 Thread Paul DuBois

At 14:22 -0400 5/10/02, Andrew Kuebler wrote:
I've made a few config changes (examples below) in the my.ini except the
server constantly utilizes 66 meg of memory total (Including OS) and I
never see mysql memory usage go any higher than 12-13 meg of memory
usage no matter how much strain I put on the machine. I do not believe
these new settings are taking affect... and I would assume I will need
to restart the server? Is there another way to load the new settings
without taking the server down?

No.

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

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 Problem

2002-05-10 Thread Jeremy Zawodny

On Fri, May 10, 2002 at 10:23:30AM +0100, Raymond Brighenti wrote:
 Hi,
 
 Trying to get replication going between to W2K machines and getting the
 following errors in the Slave log file.
 
 MySql: ready for connections
 020509 18:58:52  Slave thread: error connecting to master:Can't connect to
 MySQL server on '' (10049)(0), retry in 60 sec
 020509 18:59:54  Slave thread: error connecting to master:Can't connect to
 MySQL server on '' (10049)(0), retry in 60 sec
 020509 19:00:57  Slave thread: error connecting to master:Can't connect to
 MySQL server on '' (10049)(0), retry in 60 sec
 
 Below are the two my.cnf files which as far as I can see should be ok.
 
 my.cnf Master
 [mysqld]
 log-bin
 server-id=1
 
 my.cnf Slave
 [MYSQLD]
 master-host=20.0.0.54
 master-user=echo
 master-password=password
 master-port=3306
 server-id=2
 
 Below are the output from some other checks, it's got the
 connecting to master in the colum.  Looking at the log file it's
 getting the MySQL server on '' which seems to indicate that it
 doesn't have a host or IP address to connect to!
 
 Any ideas?

Shut down the slave, blow away the master.info file, and start it
back up.  That should solve the problem. :-)

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

MySQL 3.23.47-max: up 92 days, processed 2,399,288,070 queries (301/sec. avg)

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

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




Re: Loading new setting without restarting the server

2002-05-10 Thread Jeremy Zawodny

On Fri, May 10, 2002 at 02:22:18PM -0400, Andrew Kuebler wrote:

 Is there another way to load the new settings without taking the
 server down?

Not yet.  There's talk of that happening in a future release of MySQL
(4.x maybe?).

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

MySQL 3.23.47-max: up 92 days, processed 2,399,360,000 queries (301/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




add column to table mysql

2002-05-10 Thread Tang Ngo

I am beginning to learn mysql.
How to add a column to table in mysql database.
Thanks
Tang


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

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: trouble with field NULL

2002-05-10 Thread Steve Buehler

At 01:22 PM 5/10/2002, Paul DuBois wrote:
At 13:11 -0500 5/10/02, Steve Buehler wrote:
I have found that I can NOT do this:
$null = NULL or even $null = NULL than put that into a statement like this:
UPDATE games SET game_id = '$null';
can't do it like this either
UPDATE games SET game_id = $null;
I have to do it like this:
UPDATE games SET game_id = NULL;
NO QUOTES of any kind.  Somebody else might have a way around this. In 
that case, I would like to hear it too.  That would let me get around the 
following:

None of those will work, because you test for NULL using
IS NULL, not = NULL.

The above ones aren't testing for NULL, they are trying to assign NULL to a 
$var.  The below ones aren't either.  The below code is testing for 
.  Might be the same thing, but it was the only way I could get it to 
work for me.  I didn't try:
if($loc_id IS NULL)
This code is in PHP.

$searchStmt = UPDATE games SET
date = '$date',
time = '$time',;
if($loc_id == ){$searchStmt .= loc_id = NULL,;}else{$searchStmt .= 
loc_id = '$loc_id',;}
if($hteam_pt == ){$searchStmt .= hteam_pt = NULL,;}else{$searchStmt 
.= hteam_pt = '$hteam_pt',;}
if($vteam_pt == ){$searchStmt .= vteam_pt = NULL,;}else{$searchStmt 
.= vteam_pt = '$vteam_pt',;}
if($sea_id == ){$searchStmt .= sea_id = NULL,;}else{$searchStmt .= 
sea_id = '$sea_id',;}
if($hteam == ){$searchStmt .= hteam = NULL,;}else{$searchStmt .= 
hteam = '$hteam',;}
if($vteam == ){$searchStmt .= vteam = NULL,;}else{$searchStmt .= 
vteam = '$vteam',;}
if($hteam_forfeit == ){$searchStmt .= hteam_forfeit = 
NULL,;}else{$searchStmt .= hteam_forfeit = '1',;}
if($vteam_forfeit == ){$searchStmt .= vteam_forfeit = 
NULL,;}else{$searchStmt .= vteam_forfeit = '1',;}
if($official_1 == ){$searchStmt .= official_1 = 
NULL,;}else{$searchStmt .= official_1 = '$official_1',;}
if($official_2 == ){$searchStmt .= official_2 = 
NULL,;}else{$searchStmt .= official_2 = '$official_2',;}
if($official_3 == ){$searchStmt .= official_3 = 
NULL,;}else{$searchStmt .= official_3 = '$official_3',;}
if($official_4 == ){$searchStmt .= official_4 = 
NULL,;}else{$searchStmt .= official_4 = '$official_4',;}
if($official_5 == ){$searchStmt .= official_5 = NULL 
;}else{$searchStmt .= official_5 = '$official_5' ;}
$searchStmt .= where game_id = '$game_id' ;

The previous is in a PHP script calling a MySQL DB.

Steve


At 12:22 PM 5/10/2002, raphael k wrote:
I created a table with a field define as NULL, however when I insert
values NULL , Mysql puts 0 instead of nothing ,

I don't understand why I have this trouble ,


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

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: add column to table mysql

2002-05-10 Thread Christopher Thompson

Look up the ALTER TABLE statement.

On Friday 10 May 2002 12:52 pm, Tang Ngo wrote:
 I am beginning to learn mysql.
 How to add a column to table in mysql database.
 Thanks
 Tang

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

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




Load Infile to more than one table

2002-05-10 Thread Andrew Hazen

Hi Folks,

Can I do the following:

LOAD DATA INFILE 'persondata.txt'
  INTO TABLE persondata p, jobdata j (p.lname,j.jobtitle,...);

Mysql the spam filter.

Andrew Hazen, O.C.P.
E-Commerce Developer
Jatech Solutions Inc.
www.jatech.ca
Specializing in OSCOMMERCE applications and PHP/MySQL programming.




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

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: changing status of master / slave

2002-05-10 Thread Azharullah Khan

Mysql problem


Regards.

--Azhar Khan

On Fri, 10 May 2002 [EMAIL PROTECTED] wrote:

 Your message cannot be posted because it appears to be either spam or
 simply off topic to our filter. To bypass the filter you must include
 one of the following words in your message:

 sql,query

 If you just reply to this message, and include the entire text of it in the
 reply, your reply will go through. However, you should
 first review the text of the message to make sure it has something to do
 with MySQL. Just typing the word MySQL once will be sufficient, for example.

 You have written the following:

 Scenario:

 If master goes down (for some reason) I want to change the status of my
 slave to a master with shutting my slave down.  How do I do this.


 A solution is to edit the .cnf file and then restart the server.  But I
 dont' want to do this because this requires a slave shutdown...so is there
 a way I can solve this problem?


 Regards.

 --Azhar Khan




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

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: changing status of master / slave

2002-05-10 Thread Azharullah Khan

sql, query

  Your message cannot be posted because it appears to be either spam or
  simply off topic to our filter. To bypass the filter you must include
  one of the following words in your message:
 
  sql,query
 
  If you just reply to this message, and include the entire text of it in the
  reply, your reply will go through. However, you should
  first review the text of the message to make sure it has something to do
  with MySQL. Just typing the word MySQL once will be sufficient, for example.
 
  You have written the following:
 
  Scenario:
 
  If master goes down (for some reason) I want to change the status of my
  slave to a master with shutting my slave down.  How do I do this.
 
 
  A solution is to edit the .cnf file and then restart the server.  But I
  dont' want to do this because this requires a slave shutdown...so is there
  a way I can solve this problem?
 
 
  Regards.
 
  --Azhar Khan
 
 




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

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: add column to table mysql

2002-05-10 Thread Jay Blanchard

[snip]
I am beginning to learn mysql.
How to add a column to table in mysql database.
Thanks
Tang
[/snip]

http://www.mysql.com/doc/A/L/ALTER_TABLE.html




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

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

2002-05-10 Thread Edilson Vasconcelos de Melo Junior

Hi,

What versions of mysql support innodb tables? What about 3.23.45 or 3.23.47?

Thank u very much,
Edilson.

Edilson Vasconcelos de Melo Junior
www.jrsoftwares.com.br
[EMAIL PROTECTED]
Fone: (19) 3256-3577

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 7/5/2002


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

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




Length Limit

2002-05-10 Thread Edilson Vasconcelos de Melo Junior

Hi,

Using the C API, does the sql parameter in the mysql_query function a length
limit?

Thank u very much,
Edilson.

Edilson Vasconcelos de Melo Junior
www.jrsoftwares.com.br
[EMAIL PROTECTED]
Fone: (19) 3256-3577

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 7/5/2002


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

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




Re: Innodb

2002-05-10 Thread Paul DuBois

At 17:26 -0300 5/10/02, Edilson Vasconcelos de Melo Junior wrote:
Hi,

What versions of mysql support innodb tables? What about 3.23.45 or 3.23.47?

Both versions, but only if you
- Compile from source using the --with-innodb option when you configure MySQL
- Use a -max distribution, if you use a binary distribution


Thank u very much,
Edilson.

Edilson Vasconcelos de Melo Junior
www.jrsoftwares.com.br
[EMAIL PROTECTED]
Fone: (19) 3256-3577



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

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: Load Infile to more than one table

2002-05-10 Thread Paul DuBois

At 15:08 -0400 5/10/02, Andrew Hazen wrote:
Hi Folks,

Can I do the following:

LOAD DATA INFILE 'persondata.txt'
   INTO TABLE persondata p, jobdata j (p.lname,j.jobtitle,...);

No.

You could extract the columns you need from the file for each table
into two separate files, then run two LOAD DATA statements.


Mysql the spam filter.

Andrew Hazen, O.C.P.
E-Commerce Developer
Jatech Solutions Inc.
www.jatech.ca
Specializing in OSCOMMERCE applications and PHP/MySQL programming.


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

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: Length Limit

2002-05-10 Thread Kenneth Hylton

The real answer, yes.  It has a limit of several GB, depending on your OS.
It can take a huge string containing MBytes of BLOB data.

Just for grins, I loaded several MB of image data this way just to prove to
myself that you could do it.

The practical answer is then pretty much no.  (Probably would run into a
TCP/IP message length limitation first)

I'm pretty sure the on-line documentation spells that out, or it is in the
MySQL New Riders book, or the MySQL O'Reilly book.

Also, If your are going to load lots of binary data, you need to be sure and
use mysql_escape_string() to pass your data before building sending the
query, and look at using mysql_real_query() rather than mysql_query().  It
takes a length argument and is supposed to be faster, although I haven't
personally looked at speed differences.


Ken


-Original Message-
From: Edilson Vasconcelos de Melo Junior
[mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 3:41 PM
To: MYSQL
Subject: Length Limit


Hi,

Using the C API, does the sql parameter in the mysql_query function a length
limit?

Thank u very much,
Edilson.

Edilson Vasconcelos de Melo Junior
www.jrsoftwares.com.br
[EMAIL PROTECTED]
Fone: (19) 3256-3577

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 7/5/2002


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

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

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

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: trouble with field NULL

2002-05-10 Thread Paul DuBois

At 13:59 -0500 5/10/02, Steve Buehler wrote:
At 01:22 PM 5/10/2002, Paul DuBois wrote:
At 13:11 -0500 5/10/02, Steve Buehler wrote:
I have found that I can NOT do this:
$null = NULL or even $null = NULL than put that into a statement 
like this:
UPDATE games SET game_id = '$null';
can't do it like this either
UPDATE games SET game_id = $null;
I have to do it like this:
UPDATE games SET game_id = NULL;
NO QUOTES of any kind.  Somebody else might have a way around 
this. In that case, I would like to hear it too.  That would let 
me get around the following:

None of those will work, because you test for NULL using
IS NULL, not = NULL.

The above ones aren't testing for NULL, they are trying to assign 
NULL to a $var.  The below ones aren't either.  The below code is 
testing for .  Might be the same thing, but it was the only way I 
could get it to work for me.  I didn't try:
if($loc_id IS NULL)
This code is in PHP.

Ah, yeah.  Sheesh.

Okay, two solutions, one of which you indicate above:

- SET col_name = NULL, with no quotes around NULL (because otherwise it'll
   be taken as a string consisting of the word NULL
- Fake (emulate) some kind of placeholder mechanism, and then bind either
   an unset value (e.g., unset ($var)) or the PHP 4 value NULL to a placeholder
   that you want to be NUL.  But this actually works out to the same thing,
   because the placeholder mechanism would have to put the unquoted word NULL
   into the query string when it recognizes the PHP value that you define by
   convention to represent SQL NULL values.


$searchStmt = UPDATE games SET
date = '$date',
time = '$time',;
if($loc_id == ){$searchStmt .= loc_id = 
NULL,;}else{$searchStmt .= loc_id = '$loc_id',;}
if($hteam_pt == ){$searchStmt .= hteam_pt = 
NULL,;}else{$searchStmt .= hteam_pt = '$hteam_pt',;}
if($vteam_pt == ){$searchStmt .= vteam_pt = 
NULL,;}else{$searchStmt .= vteam_pt = '$vteam_pt',;}
if($sea_id == ){$searchStmt .= sea_id = 
NULL,;}else{$searchStmt .= sea_id = '$sea_id',;}
if($hteam == ){$searchStmt .= hteam = NULL,;}else{$searchStmt 
.= hteam = '$hteam',;}
if($vteam == ){$searchStmt .= vteam = NULL,;}else{$searchStmt 
.= vteam = '$vteam',;}
if($hteam_forfeit == ){$searchStmt .= hteam_forfeit = 
NULL,;}else{$searchStmt .= hteam_forfeit = '1',;}
if($vteam_forfeit == ){$searchStmt .= vteam_forfeit = 
NULL,;}else{$searchStmt .= vteam_forfeit = '1',;}
if($official_1 == ){$searchStmt .= official_1 = 
NULL,;}else{$searchStmt .= official_1 = '$official_1',;}
if($official_2 == ){$searchStmt .= official_2 = 
NULL,;}else{$searchStmt .= official_2 = '$official_2',;}
if($official_3 == ){$searchStmt .= official_3 = 
NULL,;}else{$searchStmt .= official_3 = '$official_3',;}
if($official_4 == ){$searchStmt .= official_4 = 
NULL,;}else{$searchStmt .= official_4 = '$official_4',;}
if($official_5 == ){$searchStmt .= official_5 = NULL 
;}else{$searchStmt .= official_5 = '$official_5' ;}
$searchStmt .= where game_id = '$game_id' ;

The previous is in a PHP script calling a MySQL DB.

Steve


At 12:22 PM 5/10/2002, raphael k wrote:
I created a table with a field define as NULL, however when I insert
values NULL , Mysql puts 0 instead of nothing ,

I don't understand why I have this trouble ,


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

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: Table01 Table02 Table03 I want to change thee.

2002-05-10 Thread Paul DuBois

At 20:45 + 5/10/02, John Doe wrote:
ok I have (for now) three tables all with the same ID, however I want
to be able to change the ID if I need to.  But I don't want to do it
with 3 statements (ie, update table01 set id=2 where id=3;update
table02 set id=2 where id=3;update table03 set id=2 where id=3) what I
would rather have is a mysql statment that looks something like this:
update table01,table02,table03 set id=2 where id=3;

But that doesn't work.  I know for three tables it isn't harsh to do
three statements, however I will soon have closer to 30, and that
would just be obnoxious.

Your comments are very welcome.

The best solution is not to mess around with your IDs.
Then your problem goes away and you don't have to solve it.

[EMAIL PROTECTED]
Student at Greenville College


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

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




RES: Innodb

2002-05-10 Thread Edilson Vasconcelos de Melo Junior

Hi,

The server is not mine :( How do i know if the source was compiled
with --with-innodb option?

Thank u very much,
Edilson.

-Mensagem original-
De: Paul DuBois [mailto:[EMAIL PROTECTED]]
Enviada em: sexta-feira, 10 de maio de 2002 17:47
Para: Edilson Vasconcelos de Melo Junior; MYSQL
Assunto: Re: Innodb


At 17:26 -0300 5/10/02, Edilson Vasconcelos de Melo Junior wrote:
Hi,

What versions of mysql support innodb tables? What about 3.23.45 or
3.23.47?

Both versions, but only if you
- Compile from source using the --with-innodb option when you configure
MySQL
- Use a -max distribution, if you use a binary distribution


Thank u very much,
Edilson.

Edilson Vasconcelos de Melo Junior
www.jrsoftwares.com.br
[EMAIL PROTECTED]
Fone: (19) 3256-3577


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 7/5/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 7/5/2002


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

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




quick sql question

2002-05-10 Thread Augey Mikus

what is the simplest way to delete duplicate occurences of a specific 
field in mysql?

thanks,

augey


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

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: quick sql question

2002-05-10 Thread Paul DuBois

At 17:16 -0400 5/10/02, Augey Mikus wrote:
what is the simplest way to delete duplicate occurences of a 
specific field in mysql?

thanks,

augey

Your question is a bit ambiguous.  You could do this by using ALTER
TABLE to remove the column itself from the table, for example, but
I'm guessing maybe that's not what you mean.

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

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

2002-05-10 Thread Cal Evans

mysqladmin variables

*
* Cal Evans
* Journeyman Programmer
* Techno-Mage
* http://www.calevans.com
*
 

-Original Message-
From: Edilson Vasconcelos de Melo Junior
[mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 4:04 PM
To: Paul DuBois; MYSQL
Subject: RES: Innodb


Hi,

The server is not mine :( How do i know if the source was compiled
with --with-innodb option?

Thank u very much,
Edilson.

-Mensagem original-
De: Paul DuBois [mailto:[EMAIL PROTECTED]]
Enviada em: sexta-feira, 10 de maio de 2002 17:47
Para: Edilson Vasconcelos de Melo Junior; MYSQL
Assunto: Re: Innodb


At 17:26 -0300 5/10/02, Edilson Vasconcelos de Melo Junior wrote:
Hi,

What versions of mysql support innodb tables? What about 3.23.45 or
3.23.47?

Both versions, but only if you
- Compile from source using the --with-innodb option when you configure
MySQL
- Use a -max distribution, if you use a binary distribution


Thank u very much,
Edilson.

Edilson Vasconcelos de Melo Junior
www.jrsoftwares.com.br
[EMAIL PROTECTED]
Fone: (19) 3256-3577


---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 7/5/2002

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.361 / Virus Database: 199 - Release Date: 7/5/2002


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

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



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

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: why null being returned

2002-05-10 Thread Paul DuBois

At 8:17 -0700 5/10/02, Lalit Nagpal wrote:
through a servlet i insert my form data into my table
(primary key is auto-incremented) and then i throw
another query which is
select last_insert_id() from mytable limit 1
through my statement.executeQuery method. when i ask
for the data through
myresultset.getString(1) i get null
NullPointerException
why ... any ideas ... i welcome your suggestions
friends.

# Lalit Nagpal #

I don't know why you're getting a null pointer exception, but your
second query should be just:

SELECT LAST_INSERT_ID()

And maybe you want to invoke getInt() instead of getString()?

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

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




Re: (php thing) Bug #17126 Updated: mysql_pconnect() andmysql_query(LOCK TABLES...) (fwd)

2002-05-10 Thread Paul DuBois

At 14:29 +0200 5/10/02, Stian Skjelstad wrote:
Hi

I don't know if this is of any interrest etc, but atleast it is a small
little issue from the big, big world.

This is easily solved by using mysql_connect() rather than
mysql_pconnect().  Then the connection won't stay open if
the script dies or you forget to UNLOCK, and the MySQL
server will automatically unlock.



-- Forwarded message --
Date: 10 May 2002 08:41:19 -
From: PHP Bug Database [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Bug #17126 Updated: mysql_pconnect() and mysql_query(LOCK
 TABLES...)

ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at
http://bugs.php.net/?id=17126edit=2


  ID:   17126
  Updated by:   [EMAIL PROTECTED]
  Reported By:  [EMAIL PROTECTED]
-Status:   Open
+Status:   Closed
  Bug Type: MySQL related
  Operating System: RedHat Linux 7.2 with updates
  PHP Version:  4.0CVS-2002-05-09
  New Comment:

PHP is not the appropriate place to do this. If you want
auto-unlocking, bug the MySQL-people or learn to write proper code.


Previous Comments:


[2002-05-09 15:08:49] [EMAIL PROTECTED]

This is a test-thing from one of my projects. The problem is the LOCK
TABLES not beeing unlocked again.. This is a userproblem, but can
sometimes be hard to track when you rerun the script, and hit another
Apache-PID and tables still beeing locked.. maybe when a Link
identifier is destroyed, or new database is selected, an UNLOCK
TABLES should be ommited?

testsource from project:

?
unset ( $ROOT ); $ROOT = ../;
include_once ( $ROOT.include/setup.php );
include_once ( $INCLUDE.mysql.php );

MySQL_DoConnect();
echo Locking...;
mysql_query(LOCK TABLES Ansatt WRITE;);
echo Done (.mysql_error().)br;
?




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

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: why null being returned

2002-05-10 Thread Rutledge, Aaron

I've had simmilar problems. 
I had something like this...
String blah = myResultSet.getString(BLAHBLAH);
if(!myResultSet.wasNull()){
if(blah.equals(something)){ ...boom nullPointer exception

I'm not sure why the null value wasn't caught by wasNull(). Anyway I
worked around it by adding an if(blah!=null){ before I used any string
methods such as the equals().  Hope this helps.  If anyone else can
provide an explaination I would be grateful.
--Aaron
 


-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 10, 2002 3:43 PM
To: Lalit Nagpal; [EMAIL PROTECTED]
Subject: Re: why null being returned


At 8:17 -0700 5/10/02, Lalit Nagpal wrote:
through a servlet i insert my form data into my table
(primary key is auto-incremented) and then i throw
another query which is
select last_insert_id() from mytable limit 1
through my statement.executeQuery method. when i ask
for the data through
myresultset.getString(1) i get null
NullPointerException
why ... any ideas ... i welcome your suggestions
friends.

# Lalit Nagpal #

I don't know why you're getting a null pointer exception, but your
second query should be just:

SELECT LAST_INSERT_ID()

And maybe you want to invoke getInt() instead of getString()?

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

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: quick sql question

2002-05-10 Thread Augey Mikus

what i meant is deleting duplicate occurences of records of a certain 
field. ...sorry...


Paul DuBois wrote:

 At 17:16 -0400 5/10/02, Augey Mikus wrote:

 what is the simplest way to delete duplicate occurences of a specific 
 field in mysql?

 thanks,

 augey


 Your question is a bit ambiguous.  You could do this by using ALTER
 TABLE to remove the column itself from the table, for example, but
 I'm guessing maybe that's not what you mean.

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

 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




table handler error 27

2002-05-10 Thread Augey Mikus

when running
  select count(distinct value) from table;
on a table with more than 19 million records i got the error:
 got error 27 from table handler (or something like that)

i looked up the error in mysql perror which gave me file too large

does this have to do with my file size in linux or a specific option in 
my.cnf ?

Augey


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

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: quick sql question

2002-05-10 Thread Paul DuBois

At 17:54 -0400 5/10/02, Augey Mikus wrote:
what i meant is deleting duplicate occurences of records of a 
certain field. ...sorry...

Ah.

One thing you can do is add a unique index on that field with
ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name)
or
ALTER IGNORE TABLE tbl_name ADD PRIMARY KEY (col_name)

and MySQL will clobber duplicate records as it builds the index.



Paul DuBois wrote:

At 17:16 -0400 5/10/02, Augey Mikus wrote:

what is the simplest way to delete duplicate occurences of a 
specific field in mysql?

thanks,

augey


Your question is a bit ambiguous.  You could do this by using ALTER
TABLE to remove the column itself from the table, for example, but
I'm guessing maybe that's not what you mean.


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

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: quick sql question

2002-05-10 Thread Augey Mikus

is there a way for me to do it in a mysql delete statement?  just out of 
curiosity, for instance, if i wanted to add duplicates later for 
whatever reason.

Paul DuBois wrote:

 At 17:54 -0400 5/10/02, Augey Mikus wrote:

 what i meant is deleting duplicate occurences of records of a certain 
 field. ...sorry...


 Ah.

 One thing you can do is add a unique index on that field with
 ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name)
 or
 ALTER IGNORE TABLE tbl_name ADD PRIMARY KEY (col_name)

 and MySQL will clobber duplicate records as it builds the index.



 Paul DuBois wrote:

 At 17:16 -0400 5/10/02, Augey Mikus wrote:

 what is the simplest way to delete duplicate occurences of a 
 specific field in mysql?

 thanks,

 augey



 Your question is a bit ambiguous.  You could do this by using ALTER
 TABLE to remove the column itself from the table, for example, but
 I'm guessing maybe that's not what you mean.







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

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: quick sql question

2002-05-10 Thread Paul DuBois

At 18:00 -0400 5/10/02, Augey Mikus wrote:
is there a way for me to do it in a mysql delete statement?  just 
out of curiosity, for instance, if i wanted to add duplicates later 
for whatever reason.

Okay, let's suppose you have 3947 instances of abc.
You can use LIMIT for this:

DELETE FROM tbl_name WHERE col_name = abc LIMIT 3946;



Paul DuBois wrote:

At 17:54 -0400 5/10/02, Augey Mikus wrote:

what i meant is deleting duplicate occurences of records of a 
certain field. ...sorry...


Ah.

One thing you can do is add a unique index on that field with
ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name)
or
ALTER IGNORE TABLE tbl_name ADD PRIMARY KEY (col_name)

and MySQL will clobber duplicate records as it builds the index.



Paul DuBois wrote:

At 17:16 -0400 5/10/02, Augey Mikus wrote:

what is the simplest way to delete duplicate occurences of a 
specific field in mysql?

thanks,

augey



Your question is a bit ambiguous.  You could do this by using ALTER
TABLE to remove the column itself from the table, for example, but
I'm guessing maybe that's not what you mean.


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

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: Distributed MySQL : How to synchronize ?

2002-05-10 Thread Jeremy Zawodny

On Fri, May 10, 2002 at 04:51:15PM +0200, Christophe Demange wrote:
 Hello,
 
 I have a question:
 
 We want to real-time synchronize a MySQL database part with a
 distant database.  We have a central database containing all the
 data. This database must share several parts (records) with the
 local databases.  All transactions made in the central database must
 be replicated to the corresponding local database. This will ensure
 to have the data available while the network is down.  In the same
 time some transactions can be made in the local database, this
 includes to have a dual-way replication mechanism.

Hmmm.

 I have searched replication documentation and articles and I have
 only found master-slave relationship. We think this master-slaves
 relationship doesn't exactly fit our needs.

It probably doesn't, but...

 Please could you explain us what is the best solution to use for
 this architecture.

Since you asked, here's a thought that'll require a bit of research
and testing on your end.  It might get you some of the way there.

Rather than write records to a single table on the master, break
things out into several identically structured tables.  The create a
MERGE table out of them.  Run your write queries against the
underlying table appropriate for the record.

That *may* allow the slaves to replicate only the data they need.  I
say may because I don't know enough about your application to make
that judgement.

The only problem arises in the getting updates made on the slaves back
to the master.  A slave in MySQL can only have one master, so that's a
more difficult problem.

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

MySQL 3.23.47-max: up 92 days, processed 2,403,910,165 queries (301/sec. avg)

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

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




Re: quick sql question

2002-05-10 Thread Augey Mikus

thanks :-)



Paul DuBois wrote:

 At 18:00 -0400 5/10/02, Augey Mikus wrote:

 is there a way for me to do it in a mysql delete statement?  just out 
 of curiosity, for instance, if i wanted to add duplicates later for 
 whatever reason.


 Okay, let's suppose you have 3947 instances of abc.
 You can use LIMIT for this:

 DELETE FROM tbl_name WHERE col_name = abc LIMIT 3946;



 Paul DuBois wrote:

 At 17:54 -0400 5/10/02, Augey Mikus wrote:

 what i meant is deleting duplicate occurences of records of a 
 certain field. ...sorry...



 Ah.

 One thing you can do is add a unique index on that field with
 ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name)
 or
 ALTER IGNORE TABLE tbl_name ADD PRIMARY KEY (col_name)

 and MySQL will clobber duplicate records as it builds the index.



 Paul DuBois wrote:

 At 17:16 -0400 5/10/02, Augey Mikus wrote:

 what is the simplest way to delete duplicate occurences of a 
 specific field in mysql?

 thanks,

 augey




 Your question is a bit ambiguous.  You could do this by using ALTER
 TABLE to remove the column itself from the table, for example, but
 I'm guessing maybe that's not what you mean.







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

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 Designing a Test System

2002-05-10 Thread Jeremy Zawodny

On Thu, May 09, 2002 at 09:21:12AM -0400, Darrell A. Sullivan, II wrote:

 I am considering porting our applications that currently use an
 in-house database schema to MySQL. I need to setup a test system to
 try this out and I am needing a few pointers.

Excellent.

 First, what type of processor setup will provide the best
 performance assuming that there will be multiple connections to the
 database on a regular basis (about 50 users at a time.

The fastest you can get your hands on. :-)

Ideally, you might consider using multiple processors if you have an
operating system that is friendly with threads on multiple CPUs
(Linux, Solaris, Windows NT/2000/XP).

 Most of the time they will be hitting seperate tables, but some
 tables are used by everyone) and this could increase to 150 over the
 next 12 months.

150 users?  Okay.  Not a problem.

 I am planning to have a RAID 0+1 setup with 6 drives dedicated to
 the database.

An excellent choice.

 Assuming the drives, raid controller, memory, etc. remain constant,
 what type of Intel/AMD processor configuration will give the best
 performance?

The biggest variables yet are:

  1.  How much data will be in the tables?
  2.  How much data will be manipulated in typical queries?
  3.  How much RAM will the box have?  It depends on #1 to a degree.

If you can tell us that, we can better guide you.

But assuming a reasonable amount of data (a few GB) you should be able
use something like a dual P3-866 with 1GB of ram and have a lot of
capacity to spare for growth.

 Second, is there a guid anywhere that goes into the proper
 configuration of the Linux kernel for a machine that will be a
 dedicated MySQL server including anything necessary for replication
 to work?

You shouldn't have to touch the kernel.  Standard RedHat kernels are
just fine as-is.

 I am not a Linux guru by any stretch of the imagination, but it
 seems like the standard Red Hat installation probably has a lot of
 stuff compiled into it that I don't need operational for a dedicated
 database server.

Ahh, you're using Linux.  Good.

Software that happens to be installed on the machine, but not running,
doesn't hurt you at all.  It just consumes disk space.

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 1 days, processed 41,977,865 queries (262/sec. avg)

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

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




Re: quick sql question

2002-05-10 Thread Augey Mikus

so i suppose an automatic delete of every duplicate record is out of the 
question :-)

Paul DuBois wrote:

 At 18:00 -0400 5/10/02, Augey Mikus wrote:

 is there a way for me to do it in a mysql delete statement?  just out 
 of curiosity, for instance, if i wanted to add duplicates later for 
 whatever reason.


 Okay, let's suppose you have 3947 instances of abc.
 You can use LIMIT for this:

 DELETE FROM tbl_name WHERE col_name = abc LIMIT 3946;



 Paul DuBois wrote:

 At 17:54 -0400 5/10/02, Augey Mikus wrote:

 what i meant is deleting duplicate occurences of records of a 
 certain field. ...sorry...



 Ah.

 One thing you can do is add a unique index on that field with
 ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name)
 or
 ALTER IGNORE TABLE tbl_name ADD PRIMARY KEY (col_name)

 and MySQL will clobber duplicate records as it builds the index.



 Paul DuBois wrote:

 At 17:16 -0400 5/10/02, Augey Mikus wrote:

 what is the simplest way to delete duplicate occurences of a 
 specific field in mysql?

 thanks,

 augey




 Your question is a bit ambiguous.  You could do this by using ALTER
 TABLE to remove the column itself from the table, for example, but
 I'm guessing maybe that's not what you mean.







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

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 on Load Data!

2002-05-10 Thread Paul DuBois

At 14:59 -0500 5/9/02, Bob Ryan wrote:
I think you have to use a forward slash in your path instead of a backslash.
C:/ as opposed to C:\

even in windows operating environments I believe you need to use /.

That's correct.  Or you can use doubled backslashes, but / is preferred.


-Original Message-
From: ali hafiz [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 09, 2002 2:23 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: problem on Load Data!


Hi Jack,
For question1, I think you need to use insert with set:

insert into table ABC
set column3 = ,
 column4 = ,
 column5 = ;

I think that should do it.

Have you managed to find an answer to question2? Please let me know.

Ali



From: Jack [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: problem on Load Data!
Date: Mon, 6 May 2002 12:40:08 +0800

Dear all

Two Question :
1.
I know that the 'LOAD DATA' command loads a bulk of data into a table, but
what happen if i only want to load the data into specifc fields on a table
instead of whole table.

eg.
Let say i had a file with 3 column of data, and i want to load these data
into a 'ABC' table's field 3 to 5 and leave field 1  2 as it was!

2.
I copied a file into server's root directory, and i was trying to load that
file's data to table which i had failed using the following command in
MYSQL:
LOAD DATA infile 'c:\hkd_rate.csv' into table hkd_deposit1 fields
terminated by ',' 
It said couldn't find the file!
but if i put the file into the data directory of mysql, then it can find
it!
So what should i do if i want mysql will able to find that file from root
directory?


--
Thx a lot!
Jack
  [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: quick sql question

2002-05-10 Thread Paul DuBois

At 18:13 -0400 5/10/02, Augey Mikus wrote:
so i suppose an automatic delete of every duplicate record is out of 
the question :-)

Sounds like you're trying to have it both ways.


Paul DuBois wrote:

At 18:00 -0400 5/10/02, Augey Mikus wrote:

is there a way for me to do it in a mysql delete statement?  just 
out of curiosity, for instance, if i wanted to add duplicates 
later for whatever reason.


Okay, let's suppose you have 3947 instances of abc.
You can use LIMIT for this:

DELETE FROM tbl_name WHERE col_name = abc LIMIT 3946;


Paul DuBois wrote:

At 17:54 -0400 5/10/02, Augey Mikus wrote:

what i meant is deleting duplicate occurences of records of a 
certain field. ...sorry...



Ah.

One thing you can do is add a unique index on that field with
ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name)
or
ALTER IGNORE TABLE tbl_name ADD PRIMARY KEY (col_name)

and MySQL will clobber duplicate records as it builds the index.



Paul DuBois wrote:

At 17:16 -0400 5/10/02, Augey Mikus wrote:

what is the simplest way to delete duplicate occurences of a 
specific field in mysql?

thanks,

augey




Your question is a bit ambiguous.  You could do this by using ALTER
TABLE to remove the column itself from the table, for example, but
I'm guessing maybe that's not what you mean.


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

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: quick sql question

2002-05-10 Thread Augey Mikus

I suppose the i could always remove the unique constraint once the alter 
statement has removed the duplicates.

ok

Paul DuBois wrote:

 At 18:13 -0400 5/10/02, Augey Mikus wrote:

 so i suppose an automatic delete of every duplicate record is out of 
 the question :-)


 Sounds like you're trying to have it both ways.


 Paul DuBois wrote:

 At 18:00 -0400 5/10/02, Augey Mikus wrote:

 is there a way for me to do it in a mysql delete statement?  just 
 out of curiosity, for instance, if i wanted to add duplicates later 
 for whatever reason.



 Okay, let's suppose you have 3947 instances of abc.
 You can use LIMIT for this:

 DELETE FROM tbl_name WHERE col_name = abc LIMIT 3946;


 Paul DuBois wrote:

 At 17:54 -0400 5/10/02, Augey Mikus wrote:

 what i meant is deleting duplicate occurences of records of a 
 certain field. ...sorry...




 Ah.

 One thing you can do is add a unique index on that field with
 ALTER IGNORE TABLE tbl_name ADD UNIQUE (col_name)
 or
 ALTER IGNORE TABLE tbl_name ADD PRIMARY KEY (col_name)

 and MySQL will clobber duplicate records as it builds the index.



 Paul DuBois wrote:

 At 17:16 -0400 5/10/02, Augey Mikus wrote:

 what is the simplest way to delete duplicate occurences of a 
 specific field in mysql?

 thanks,

 augey





 Your question is a bit ambiguous.  You could do this by using ALTER
 TABLE to remove the column itself from the table, for example, but
 I'm guessing maybe that's not what you mean.







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

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   >