MySQL Cannot Set Root Password on Solaris 8 (Not the usual - strange.)

2002-07-28 Thread MySQL DBA

Hi,

I have a Solaris 8 Server. I have just compiled MySql 3.23.51.
My Solaris servershas 2 NIC's - 1 with the name/ip of burns, the other with
the name/ip vader

I have done a

make all;

make install;

mysql_install_db

I have then copied the mysql.serverto /etc/init.d/mysql_server
I start mysql using this script and all looks good.

mysql_install_db advised me to set my root password, I have done this on
Linux before so I know not to use the -p option.

I do...

./mysqladmin -u root password newpass

I get

$ ./mysqladmin -u root password newpass
./mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user: 'root@localhost' (Using password: NO)'
$

I have had this before and learnt (thanks to the list) that I sometimes need
to use a hostname.

./mysqladmin -u root -h burns password newpass

./mysqladmin: connect to server at 'burns' failed
error: 'Host 'burns.e-net-lan.co.uk' is not allowed to connect to this MySQL
server'
$


ok so it must be the other hostname

./mysqladmin -u root-h vader password newpass

./mysqladmin: connect to server at 'vader' failed
error: 'Host 'vader.e-netcomm.co.uk' is not allowed to connect to this MySQL
server'
$


So.I cannot connect/change the password from either of the 2 hostnames,
OR the local host.

Mysql is running


$ ps -ef | grep mysql
mysqldba 17585 17497  0 10:41:44 pts/10:00 -ksh
mysqldba 17595 1  0 10:42:08 pts/10:00 /bin/sh
/usr/local/mysql/bin/safe
_mysqld --datadir=/usr/local/mysql/var --pid-f
mysqldba 17607 17595  0 10:42:08 pts/10:00
/usr/local/mysql/libexec/mysqld -
-basedir=/usr/local/mysql --datadir=/usr/local


The ONLY think I can see that is strange is mysql is installed in
/usr/local/mysql so I would expect the --datadir to be /usr/local/mysql/var
on BOTH the mysql daemons.

Any help would be interesting.

Thanks,

Matt.


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

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 Cannot Set Root Password on Solaris 8 (Not the usual - strange.)

2002-07-28 Thread Dicky Wahyu Purnomo

Pada Sun, 28 Jul 2002 10:49:01 +0100
MySQL DBA [EMAIL PROTECTED] menulis :

 ./mysqladmin -u root password newpass
 $ ./mysqladmin -u root password newpass
 ./mysqladmin: connect to server at 'localhost' failed
 error: 'Access denied for user: 'root@localhost' (Using password: NO)'

:D

Did you have mysql running/installed before you install this one ?

It seems that your mysql privileges is already configured, so you don't have to set up 
the root password anymore since it already has one.

You just use it like you always do : mysql -u root -p 
. and you will enter the existing root password ;-)

 $ ps -ef | grep mysql
 mysqldba 17585 17497  0 10:41:44 pts/10:00 -ksh
 mysqldba 17595 1  0 10:42:08 pts/10:00 /bin/sh
 /usr/local/mysql/bin/safe
 _mysqld --datadir=/usr/local/mysql/var --pid-f
 mysqldba 17607 17595  0 10:42:08 pts/10:00
 /usr/local/mysql/libexec/mysqld -
 -basedir=/usr/local/mysql --datadir=/usr/local
 
 
 The ONLY think I can see that is strange is mysql is installed in
 /usr/local/mysql so I would expect the --datadir to be /usr/local/mysql/var
 on BOTH the mysql daemons.

well, you should check your /etc/init.d/mysql_server or your my.cnf file or even you 
/usr/local/mysql/bin/safe_mysqld ;-)

-- 
Let's call it an accidental feature.
-- Larry Wall
 
MySQL 3.23.51 : up 37 days, Queries : 353.656 per second (avg).

--
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790)
Phone : +62 21 79199577 - Web : http://1rstwap.com


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

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




RE: MySQL Cannot Set Root Password on Solaris 8 (Not the usual - strange.)

2002-07-28 Thread MySQL DBA


This is why I am confused, this is a CLEAN mysql install.

I have only done a

make

make install

and mysql_install_db

I have not yet set a root password.

To double check this I deleted ALL /usr/local/mysql and re-did this.

Same thing again.

Matt.

-Original Message-
From: Dicky Wahyu Purnomo [mailto:[EMAIL PROTECTED]]
Sent: 28 July 2002 11:01
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL Cannot Set Root Password on Solaris 8 (Not the usual
- strange.)


Pada Sun, 28 Jul 2002 10:49:01 +0100
MySQL DBA [EMAIL PROTECTED] menulis :

 ./mysqladmin -u root password newpass
 $ ./mysqladmin -u root password newpass
 ./mysqladmin: connect to server at 'localhost' failed
 error: 'Access denied for user: 'root@localhost' (Using password: NO)'

:D

Did you have mysql running/installed before you install this one ?

It seems that your mysql privileges is already configured, so you don't have
to set up the root password anymore since it already has one.

You just use it like you always do : mysql -u root -p
. and you will enter the existing root password ;-)

 $ ps -ef | grep mysql
 mysqldba 17585 17497  0 10:41:44 pts/10:00 -ksh
 mysqldba 17595 1  0 10:42:08 pts/10:00 /bin/sh
 /usr/local/mysql/bin/safe
 _mysqld --datadir=/usr/local/mysql/var --pid-f
 mysqldba 17607 17595  0 10:42:08 pts/10:00
 /usr/local/mysql/libexec/mysqld -
 -basedir=/usr/local/mysql --datadir=/usr/local


 The ONLY think I can see that is strange is mysql is installed in
 /usr/local/mysql so I would expect the --datadir to be
/usr/local/mysql/var
 on BOTH the mysql daemons.

well, you should check your /etc/init.d/mysql_server or your my.cnf file or
even you /usr/local/mysql/bin/safe_mysqld ;-)

--
Let's call it an accidental feature.
-- Larry Wall

MySQL 3.23.51 : up 37 days, Queries : 353.656 per second (avg).

--
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790)
Phone : +62 21 79199577 - Web : http://1rstwap.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: PHP/MySQL Search Engine Query Question

2002-07-28 Thread Dicky Wahyu Purnomo

Pada Sat, 27 Jul 2002 21:32:48 -0500
Paul Maine [EMAIL PROTECTED] menulis :

 $string =1972 Ford Mustang
 
 Using the following SQL statement:
 SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%

 I want to return all records that have Mustang AND 1972 AND Ford.

my suggestion :
change your script into this one :

select * from whatevertable where $string;

$string=whatevercolumns like \%1972%\ and whatevercolumns like \%Ford%\ and 
whatevercolumns like \%1972%\ 

or you can try this  :
$query=1972 Ford Mustang
$query=ereg_replace( ,%\ and whatevercolumns like \%,$query);
$string=whatevercolumns like \%$query%\;

select * from whatevertable where $string;

-- 
Write clearly - don't be too clever.
- The Elements of Programming Style (Kernighan  Plaugher)
 
MySQL 3.23.51 : up 37 days, Queries : 353.647 per second (avg).

--
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790)
Phone : +62 21 79199577 - Web : http://1rstwap.com


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

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




Re: MySQL Cannot Set Root Password on Solaris 8 (Not the usual - strange.)

2002-07-28 Thread Dicky Wahyu Purnomo

Pada Sun, 28 Jul 2002 11:04:09 +0100
MySQL DBA [EMAIL PROTECTED] menulis :

  ./mysqladmin -u root password newpass
  $ ./mysqladmin -u root password newpass

ok then, maybe you this can solve the problem

./mysqladmin -u root password newpass


-- 
panic(kmem_cache_init(): Offsets are wrong - I've been messed with!);
2.2.16 /usr/src/linux/mm/slab.c
 
MySQL 3.23.51 : up 37 days, Queries : 353.644 per second (avg).

--
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790)
Phone : +62 21 79199577 - Web : http://1rstwap.com


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

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




Re: RE: RE: Problem downloading MySQL4.0.2a for windows

2002-07-28 Thread Victoria Reznichenko

Tam,
Thursday, July 25, 2002, 7:35:20 PM, you wrote:

T Hi Victoria,

T Thanks.  Does this mean in the future the -max version would be merged into
T one release or just for the 4.0.2a??

Most likely yes.




-- 
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: Possible bug?

2002-07-28 Thread Egor Egorov

Rich,
Friday, July 26, 2002, 5:59:37 PM, you wrote:

RA Looks as if the MySQL DB crashed and recovered.
RA Linux 2.4.18-5smp #1 SMP
RA MySQL version 3.23.51

From the MySQL server while running mtop 26JUL02 ~6:45AM PST:
RA Unable to execute show procs [Lost connection to MySQL server during query]
RA Stack Trace:
RA at main::__ANON__(/usr/local/bin/mtop:446)
RA at main(/usr/local/bin/mtop:943)

Have you installed MySQL from source or from binary distribution?





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



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

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




Re: Re: Alter table and sort_buffer_size is to small

2002-07-28 Thread Victoria Reznichenko

Martin,
Friday, July 26, 2002, 11:01:20 AM, you wrote:

  MP But when I do it I get:
  MP ERROR 1034: sort_buffer_size is to small
  Hm..
 
  Error 1034 means:
  Incorrect key file for table ...
 
  not a sort_buffer_size is to small
 
  How did you installed the server?
 
 MP I compiled it from source files.
 
 Something is very wrong with your installation.
 
 Can you install MySQL from binary distribution from www.mysql.com and
 check if error occurs again?

MP HI,

MP I can't really do this because it's production machine and I can't
MP change the MySQL instalation. Do you think it will help if I try the
MP latest 3.23.51?

Martin, your installation is wrong. I suggest you to install MySQL
from binary because installation from source is tricky.

MP But I'll have to compile it from the source again.

Up to you.




-- 
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: strange backquote problem

2002-07-28 Thread Victoria Reznichenko

Pekka,
Thursday, July 25, 2002, 7:13:45 PM, you wrote:

PS On my application's setup.php I have quite simple MySQL queries like

PS DROP TABLE IF EXISTS `ee_test`

PS Now, some users (perhaps 5 out of 1000) complain that they get an SQL error 
PS on the first query with backquotes, and when I provided them with a setup 
PS file without any backquotes (luckily all my table and row names are very 
PS simple) like...

PS DROP TABLE IF EXISTS ee_test

PS ...and they reported that it worked just fine.

PS Some users had an older MySQL, but this has been reported happen also in 
PS e.g. 3.23.39.
PS PHP used is always 4.0.6 or newer.

PS Any ideas why some MySQL's give error with standard backquotes and how to 
PS fix this??? I'd really like to know what is going on there. 
PS http://www.mysql.com/doc/L/e/Legal_names.html tells backquotes really must 
PS be there.

I tested it on 3.23.51 and 4.0.2 and it worked well via PHP script and
via mysql command-line client.






-- 
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: Index Corruption

2002-07-28 Thread Egor Egorov

Darrell,
Friday, July 26, 2002, 10:43:32 PM, you wrote:

DAS I am just getting started with MySQL and one of the first things I was
DAS trying is converting one of my larger tables to MySQL to see what kind of
DAS performance I would get from some standard queries that I run against it.

DAS I built the table and created some indices that I thought would boost the
DAS performance for my standard queries. I setup the ODBC on a Windows NT client
DAS (the MySQL database is on Red Hat Linux 7.3 and the MySQL version is 3.23.51
DAS that I downloaded on Wednesday.)

DAS I ran the query below about 15 times successfully using a Visual Basic
DAS program through the ODBC connection. The only queries taking place are
DAS SELECT queries. There are no update queries of any kind being run, yet after
DAS running the select query about 15 times I start getting the error message
DAS below. Is this a standard problem that has a work around? I have dropped the
DAS index and recreated it and I get the same behavior. It works fine for a few
DAS queries and then the message appears.

DAS Thanks for any help.

DAS mysql select * from Documents where type = 1 and (medplancd = '  '
DAS or empno =' ');
DAS ERROR 1034: Incorrect key file for table: 'Documents'. Try to repair it

Check your table and if it's corrupted, repair it:
  http://www.mysql.com/doc/R/e/Repair.html





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



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

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




RE: MySQL Cannot Set Root Password on Solaris 8 (Not the usual - strange.)

2002-07-28 Thread MySQL DBA



Another clean install sorted it, there must have been a lingering file from
the make clean.

thanks,

Matt.

-Original Message-
From: Dicky Wahyu Purnomo [mailto:[EMAIL PROTECTED]]
Sent: 28 July 2002 11:12
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: MySQL Cannot Set Root Password on Solaris 8 (Not the usual
- strange.)


Pada Sun, 28 Jul 2002 11:04:09 +0100
MySQL DBA [EMAIL PROTECTED] menulis :

  ./mysqladmin -u root password newpass
  $ ./mysqladmin -u root password newpass

ok then, maybe you this can solve the problem

./mysqladmin -u root password newpass


--
panic(kmem_cache_init(): Offsets are wrong - I've been messed with!);
2.2.16 /usr/src/linux/mm/slab.c

MySQL 3.23.51 : up 37 days, Queries : 353.644 per second (avg).

--
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790)
Phone : +62 21 79199577 - Web : http://1rstwap.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




graphical interface to mysql on red hat 7.3

2002-07-28 Thread Desmond Lee

Hi there

I'm doing fine with the command line interface of mysql, no complaints from 
me. Howerver, another team member who knows nothign about mysql is more 
familiar with the windows stuff like access. Is there an graphical interface 
for mysql on red hat v7.3? I figured i'd ask here because this is the most 
direct and helpful way since there are a lot of guys (and gals) with mysql 
experience.

Thanks

Desmond



_
Send and receive Hotmail on your mobile device: http://mobile.msn.com


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

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




graphical interface to mysql on red hat 7.3

2002-07-28 Thread Desmond Lee

Hi there

I'm doing fine with the command line interface of mysql, no complaints from 
me. Howerver, another team member who knows nothign about mysql is more 
familiar with the windows stuff like access. Is there an graphical interface 
for mysql on red hat v7.3? I figured i'd ask here because this is the most 
direct and helpful way since a lot of you guys (and gals) have way more 
mysql experience than I :)

Thanks

Desmond



_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.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




graphical interface to mysql on red hat 7.3

2002-07-28 Thread Desmond Lee

Hi there

I'm doing fine with the command line interface of mysql, no complaints from 
me. Howerver, another team member who knows nothign about mysql is more 
familiar with the windows stuff like access. Is there an graphical interface 
for mysql on red hat v7.3? I figured i'd ask here because this is the most 
direct and helpful way since a lot of you guys (and gals) have way more 
mysql experience than I :)

Thanks

Desmond



sql


_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

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




2 mysql daemons starting - both with different configs

2002-07-28 Thread Matt Darcy

Hi,

I have copied the file ./support-files/mysql.server to
/etc/init.d/mysql_server.

I have edited the /etc/init.d/mysql_server to set the basedir to
/usr/local/mysql and the datadir to /usr/local/mysql/var

When I compiled mysql I set the --with-mysqld-user=mysqldba flag.

I run (as root) /etc/init.d/mysql_server start

I see


$ ps -ef | grep mysql
mysqldba 20884 20719  0 11:55:31 pts/10:00 -ksh
mysqldba 20880 20865  0 11:55:11 pts/10:00
/usr/local/mysql/libexec/mysqld -
-basedir=/usr/local/mysql --datadir=/usr/local
root 20865 1  0 11:55:11 pts/10:00 /bin/sh
/usr/local/mysql/bin/safe
_mysqld --datadir=/usr/local/mysql/var --pid-f
$



as you can see the the parent (safe_mysqld)
sets --datadir=/usr/local/mysql/var (correct)
however the children processe owned by mysqldba sets datadir=/usr/local/
 (why not /usr/local/mysql/var )


My Questions are..

Why is the root processes of mysql not owned by mysqldba ? do I need to add
an su - mysqldba at the start of the mysql_server script ?

why is mysqld setting --datadir=/usr/locl when the script sets
datadir=/usr/local/mysql/var ?

Thanks,

Matt.


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

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




New to mySQL questions.

2002-07-28 Thread Ray Healy \(Data Net Services\)

Hi

Just a quick question.

I was reading the manuals on the MySQL web regarding the initial setup of
the program.

I have installed the program and all is going well and have a user called
root with full access and another user called mysql with limited rights
(used mainly for PHPmyAdmin).

There is a database called mysql which contains all the users, rights and
privalages.

The question I would like to ask is that there is another database called
test whcih I belive from reading is a databse that users can connect to
annoymously.  Can I delete this database as I do not want anyone to connect
without a user profile and password. Does it cause a problem deleting this
database.

Also while I am here can any one advise or tell me where to go in respects
of accessing data to/from the database in a php form if the database users
have a password. Or am I totally off track and you do not need a password or
user in the php page as it is running locally.

If anyone has a sample database and some php forms to interact with the
databse they could let me see to learn from, it would be very much
appreciated.

Thanks for all your help


Ray Healy


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

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




RE: help me out here guys... you gotta have a primary key

2002-07-28 Thread Desmond Lee

Hi Eric

I dunno why people make 100 field tables, sounds a little harsh. I'll keep 
you in mind the next time i wanna make a 100 field table.

Anyways, just to let you know mysql 4 will be supporting foreign key 
constraints. And yes thoes other db technologies like postGrep already 
support key constraints, but i thought (and correct me if i'm wrong) that 
mysql just performs a little better (maybe because of having no key 
constraints). But regardless of mysql not supporting foreign keys, i still 
put them in the defenitions of my tables because i believe it's good for 
documentation and also if we upgrade to mysql 4 things will be less painful 
when updating tables to use foreign keys.

Is it such a big deal to use more than one field for a primary key? Two
field keys are only a little slower than single field Primary keys for
selects. Often in linking tables you want to have duplicates of the two
foreign keys right?

Not quite sure what you mean by having duplicates of a foreign key. I'm 
guessing you mean something like this in a linking table:

Linking table
__
authorID, bookID


Author table
_
authorID, firsname, lastname, ...


Book table
___
bookID, name, pubDate, 

Thus the linking table will have a primary key of authorID and the bookID to 
uniquely id the row in the linking table. However, you can have this:

LInking table
_
6, 1
7, 1

Author table
_
6, Puff, Daddy, ...
7, keanu, reves, ...

Book table
___
1, Bad acting and rapping cross over, 2000, 

Thus, the book Bad acting and rapping cross over is written by Both Puff 
and Keanu. Therefore you have multiple entries of the book with id 1 in the 
table. It appears 2 times on 2 different rows, but 2 times within the same 
column. (My apologies to keanu and puffy fans out there).

Good luck with the 100 field tables, and thanks for your reply and all the 
other replies out there for this message. I'm glad to know that i'm not the 
only one that thinks having no primary key is NOT a good idea. I'll be sure 
to give my collegue a mouthful if he bitches about primary keys again.

Thanks

Desmond

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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

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




RE: graphical interface to mysql on red hat 7.3

2002-07-28 Thread Desmond Lee

Ya... i'll give it a try, thanks :)

But do you know of any free graphical interfaces for linux that are not 
browser based?

Thanks again (fast reply to )

desmond


From: Shashank Tripathi [EMAIL PROTECTED]
To: 'Desmond Lee' [EMAIL PROTECTED],[EMAIL PROTECTED]
Subject: RE: graphical interface to mysql on red hat 7.3
Date: Sun, 28 Jul 2002 20:14:25 +0900

Would a browser based interface do?

http://phpmyadmin.sourceforge.net


Cheers
Shashank




_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.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: graphical interface to mysql on red hat 7.3

2002-07-28 Thread Shashank Tripathi

Hi Desmond,


| But do you know of any free graphical interfaces for 
| linux that are not 
| browser based?


Did you try MySqlGUI from the MySql website? It runs on x-windows, so
should suffice (perhaps) although the jury is still out so to speak on
its interface (http://www.mysql.com/downloads/gui-mysqlgui.html) 

Then there is MySQL navigator which is nothing much to write home
about either, imho of course, but you could give it a swing:
http://packages.debian.org/unstable/devel/mysql-navigator.html

Lastly, and this may interest you, Squirrel SQL client is a Java based
client so should work on Linux. I have used it with Oracle but since it
works with any JDBC database, perhaps should in theory support MySQL as
well (http://squirrel-sql.sourceforge.net/) 

Hope some of this is useful,
Shashank


Shashank Tripathi
www.shanx.com 



Sql, query


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

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




Re: PHP/MySQL Search Engine Query Question

2002-07-28 Thread Serge Paquin

This is more of a php question.  explode $string on   (space) which will
give you an array.  Loop through the array first with $sql.=WHERE
whatevercolumn LIKE '%$val%' then for every other entry change WHERE to
AND.

Serge.

- Original Message -
From: Paul Maine [EMAIL PROTECTED]
To: MySQL MySQL [EMAIL PROTECTED]
Sent: Saturday, July 27, 2002 10:32 PM
Subject: PHP/MySQL Search Engine Query Question


 I am currently working on a website that is implemented using PHP and
MySQL.

 The site currently has a simple search engine that allows a shopper to
type
 in a search string that is stored in $search. For example, if a shopper
 types in 1972 Ford Mustang
 $string =1972 Ford Mustang

 Using the following SQL statement:
 SELECT * FROM whatevertable WHERE whatevercolumn LIKE '%$search%

 Records are returned that have this exact string and in this exact order
 (I'm aware a wild card character is included on the front and back of the
 string).

 My desire is to be able to logically AND each token of the search together
 independent or the order of the tokens.
 I want to return all records that have Mustang AND 1972 AND Ford.

 Since a shopper inputs the search string in advance I don't know how many
 tokens will be used.

 I would appreciate any suggestions.

 Regards,
 Paul

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

 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: New to mySQL questions.

2002-07-28 Thread Gerald R. Jensen

Ray:

The only database you shouldn't mess with is the mysql database ... it is
the equivalent of the 'master' database found in other systems, and contains
all of the rights and privileges you invoke.

Get to know the 'GRANT' command in the MySQL Manual
(http://www.mysql.com/manual.php) ... therein you will find the answers to
questions about user rights and privileges and a whole lot more.

For PHP script samples, it is hard to beat http://www.hotscripts.com/PHP.

Gerald Jensen

- Original Message -
From: Ray Healy (Data Net Services) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 28, 2002 6:25 AM
Subject: New to mySQL questions.


Hi

Just a quick question.

I was reading the manuals on the MySQL web regarding the initial setup of
the program.

I have installed the program and all is going well and have a user called
root with full access and another user called mysql with limited rights
(used mainly for PHPmyAdmin).

There is a database called mysql which contains all the users, rights and
privalages.

The question I would like to ask is that there is another database called
test whcih I belive from reading is a databse that users can connect to
annoymously.  Can I delete this database as I do not want anyone to connect
without a user profile and password. Does it cause a problem deleting this
database.

Also while I am here can any one advise or tell me where to go in respects
of accessing data to/from the database in a php form if the database users
have a password. Or am I totally off track and you do not need a password or
user in the php page as it is running locally.

If anyone has a sample database and some php forms to interact with the
databse they could let me see to learn from, it would be very much
appreciated.

Thanks for all your help


Ray Healy


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

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




Problem with found rows

2002-07-28 Thread Lukas Liebenberg

Hi

I need to retrieve records (10 at a time) for a search engine type site.

This will be quite easy using MySql V4  (SQL_CALC_FOUND_ROWS and FOUND_ROWS)
but I only have access to V3.23

Any help pleeaase

Lukas



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

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




Error 1148: The used command is not allowed with this MySQL version

2002-07-28 Thread Jeffrey A. Kirby

Dear Support,

Could you help me understand how to correct this error:

Error 1148:  The used command is not allowed with this MySQL version

I have looked in the online manual under this section for help:
4.2.4 Security issues with LOAD DATA LOCAL

Unfortunately I am very new to MySQL and don't have a clue as to how fix this error.  
I am using Windows.  I think I need to modify the My.ini file under the mysqld 
section... I think it should read local-infile=1.  However when I try that, it still 
get this error when calling LOAD LOCAL FILE from a client application.  Yes, I did 
start and stop the server.

Please help!

Wishing you the best,

Jeffrey Kirby
(608) 743-2117
[EMAIL PROTECTED]
http://www.desktopemailblaster.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




Some prob...

2002-07-28 Thread Tony Bagoly

Got this when i use make

 libmysql.c
mkdir .libs
gcc -DDEFAULT_CHARSET_HOME=\/usr/local/mysql\
-DDATADIR=\/usr/local/mysql/var\
-DSHAREDIR=\/usr/local/mysql/share/mysql\ -DUNDEF_THREADS_HACK
-DDONT_USE_RAID -I./../include -I../include -I./.. -I.. -I.. -O3
-DDBUG_OFF -c libmysql.c  -fPIC -DPIC -o .libs/libmysql.lo
libmysql.c: In function `mysql_real_connect':
libmysql.c:1324: warning: passing arg 5 of `gethostbyname_r' from
incompatible pointer type
libmysql.c:1324: too few arguments to function `gethostbyname_r'
libmysql.c:1324: warning: assignment makes pointer from integer without
a cast
make[2]: *** [libmysql.lo] Error 1
make[2]: Leaving directory `/usr/src/mysql-3.23.51/libmysql'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/mysql-3.23.51'
make: *** [all-recursive-am] Error 2
[root@nonifo mysql-3.23.51]#


First of all i have tar -zxvf mysql-3.23.51.tar.gz
Then i have enter the map, runing ./configure -prefix=/usr/local/mysql
Then make

Lol

// Tony B [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: Problem with found rows

2002-07-28 Thread Serge Paquin

SELECT * FROM tbl WHERE this=that limit 1,10;
SELECT * FROM tbl WHERE this=that limit 11,10;
SELECT * FROM tbl WHERE this=that limit 21,10;
SELECT * FROM tbl WHERE this=that limit 31,10;

etc etc etc...

syntax: limit [start row],[# of rows to return]

To get a total first do a COUNT(*) on the first page and store it in a
session var so you don't need to do it over and over again.

Hope that helps.

Serge.

- Original Message -
From: Lukas Liebenberg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, July 28, 2002 1:05 PM
Subject: Problem with found rows


 Hi

 I need to retrieve records (10 at a time) for a search engine type site.

 This will be quite easy using MySql V4  (SQL_CALC_FOUND_ROWS and
FOUND_ROWS)
 but I only have access to V3.23

 Any help pleeaase

 Lukas



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

 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: 2 mysql daemons starting - both with different configs

2002-07-28 Thread Paul DuBois

At 12:15 +0100 7/28/02, Matt Darcy wrote:
Hi,

I have copied the file ./support-files/mysql.server to
/etc/init.d/mysql_server.

I have edited the /etc/init.d/mysql_server to set the basedir to
/usr/local/mysql and the datadir to /usr/local/mysql/var

When I compiled mysql I set the --with-mysqld-user=mysqldba flag.

I run (as root) /etc/init.d/mysql_server start

I see


$ ps -ef | grep mysql
mysqldba 20884 20719  0 11:55:31 pts/10:00 -ksh
mysqldba 20880 20865  0 11:55:11 pts/10:00
/usr/local/mysql/libexec/mysqld -
-basedir=/usr/local/mysql --datadir=/usr/local
 root 20865 1  0 11:55:11 pts/10:00 /bin/sh
/usr/local/mysql/bin/safe
_mysqld --datadir=/usr/local/mysql/var --pid-f
$



as you can see the the parent (safe_mysqld)
sets --datadir=/usr/local/mysql/var (correct)
however the children processe owned by mysqldba sets datadir=/usr/local/
 (why not /usr/local/mysql/var )


My Questions are..

Why is the root processes of mysql not owned by mysqldba ? do I need to add
an su - mysqldba at the start of the mysql_server script ?

root starts safe_mysqld, which starts mysqld, which switches its user ID
to mysqldba.  safe_mysqld doesn't changed its ID, which is why it shows
up as root.


why is mysqld setting --datadir=/usr/locl when the script sets
datadir=/usr/local/mysql/var ?

I suspect what you're seeing is simply an artifact of ps chopping
off output lines.  The full command probably is a little different.


Thanks,

Matt.


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

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: graphical interface to mysql on red hat 7.3

2002-07-28 Thread Quinten Steenhuis


I've just tried out MyCC (also available at MySQL.com), which is
technically in alpha, but has many of the features that phpMyAdmin has. It
uses the QT widget set, so it looks nice, and I've found it to be
functional. I usually end up sticking with phpMyAdmin though. I find that
it's among the best graphical interfaces for MySQL.

On Sun, 28 Jul 2002, Shashank Tripathi wrote:

 Date: Sun, 28 Jul 2002 20:54:41 +0900
 From: Shashank Tripathi [EMAIL PROTECTED]
 To: 'Desmond Lee' [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: graphical interface to mysql on red hat 7.3

 Hi Desmond,


 | But do you know of any free graphical interfaces for
 | linux that are not
 | browser based?


 Did you try MySqlGUI from the MySql website? It runs on x-windows, so
 should suffice (perhaps) although the jury is still out so to speak on
 its interface (http://www.mysql.com/downloads/gui-mysqlgui.html)

 Then there is MySQL navigator which is nothing much to write home
 about either, imho of course, but you could give it a swing:
 http://packages.debian.org/unstable/devel/mysql-navigator.html

 Lastly, and this may interest you, Squirrel SQL client is a Java based
 client so should work on Linux. I have used it with Oracle but since it
 works with any JDBC database, perhaps should in theory support MySQL as
 well (http://squirrel-sql.sourceforge.net/)

 Hope some of this is useful,
 Shashank


 Shashank Tripathi
 www.shanx.com



 Sql, query


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

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





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

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: MySQL Client Mac OS X 10.2 (Jaguar: Build 6C106)

2002-07-28 Thread Ian Fieldhouse

On 26/7/02 6:07 pm, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Binary builds often break when tried with a newer version of Mac OS X
 than the one they were built on.  Can you try building from source?


I tried building with the following configure options:

./configure --without-server --prefix=/usr/local/mysql

All goes well. However when I try to 'make' it fails with the following
error:

g++ -O3 -DDBUG_OFF -fno-implicit-templates -fno-exceptions -fno-rtti
-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE
-DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -o mysql mysql.o
readline.o sql_string.o completion_hash.o ../readline/libreadline.a
../libmysql/.libs/libmysqlclient.a -lz -lm -lz -lm
ld: Undefined symbols:
_tgoto
_tputs
_tgetent
_tgetflag
_tgetnum
_tgetstr
make[2]: *** [mysql] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2

This is using the Build 6C106 Developer Tools. I'm afraid I don't have a
clue as to what the problem is but maybe some one else who knows a bit more
may be able to shed some light on the situation.

Cheers,

Ian


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

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




Penalty for non-null defaults ?

2002-07-28 Thread Charlie

Is there any storage / performance penalty for specifying '' or 0 as default
values, as opposed to allowing null's in the table structure?

sql, query

Thanks,
Charlie


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

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: Penalty for non-null defaults ?

2002-07-28 Thread Paul DuBois

At 14:34 -0700 7/28/02, Charlie wrote:
Is there any storage / performance penalty for specifying '' or 0 as default
values, as opposed to allowing null's in the table structure?

NULL values take less storage space.  (One bit per NULL value in a row,
if I remember correctly).


sql, query

Thanks,
Charlie


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

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




OR in the JOIN clause -- very very slow!

2002-07-28 Thread Erick Papadakis

hello,

i have a couple of questions about my SQL query. 

1. if i want all rows in table 1 that may or may not have a counterpart
row in table 2, i use LEFT JOIN. this is HORRIBLY slow! why? if i make it
a simple join (i.e., without the words LEFT JOIN) then it is a little
faster. 

2. secondly, i need to have an OR in my join clause. 

   where 
 (table1.col1 = table2.col1 or table1.col2 = table2.col1) 

 this is for a search procedure. if i remove the OR, it is much faster.
how can i get around this? i need to have the OR because of the search
engine in the website, but i need it to be fast. 

3. based on the OR condition, what kind of indices can i use? 

thanks/erick


mysql, sql, query



__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.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




Need help on Multi-table update queries

2002-07-28 Thread deep kapasi

Hi,

I m using MySQL 4.0.2 which now supports multi-table
update query

I am getting error while throwing multi-table UPDATE
query, I don't know what the problem is

To generate an error run below query, it will create a
2 InnoDB table and inserts a dummy record in it

CREATE TABLE `systemdefault` (
`id` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=InnoDB;

 
CREATE TABLE `userpreference` (
`id` int(11) NOT NULL auto_increment,
`SysDefaultId` int(11) default NULL,
`fld1` int(11) default NULL,
`fld2` tinyint(1) unsigned default NULL,
`OperatorId` int(11) default NULL,
PRIMARY KEY (`id`),
KEY `ix_SysDefaultId_userpreference` (`SysDefaultId`),
FOREIGN KEY (`SysDefaultId`) REFERENCES
`test.systemdefault` (`id`)
) TYPE=InnoDB;

 
INSERT INTO systemdefault
VALUES(1), (2), (3);

INSERT INTO
userpreference(sysdefaultid,fld1,fld2,operatorid)
VALUES(1,99,NULL,NULL), (2,88,0,NULL), (3,77,1,NULL),
(1,NULL,NULL,1), (2,NULL,NULL,1),(3,NULL,NULL,1);

Now throw following UPDATE query 

UPDATE UserPreference
LEFT JOIN UserPreference AS Preference ON
UserPreference.SysDefaultId = Preference.SysDefaultId
SET UserPreference.fld1 = Preference.fld1,
UserPreference.fld2 = Preference.fld2
WHERE Preference.OperatorId IS NULL OR
UserPreference.OperatorId = 1;

It throws following Error 
ERROR 1105: Unknown error 

Anybody have an idea wht's wrong in above UPDATE
statement?

THX IN ADVANCE

- Deep


__
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.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




How to use LAST_INSERT_ID() or mysql_insert_id() ?

2002-07-28 Thread databarn

Folk,

I know this is an old query, but still, problems . . .

I've tried these both, but something is amiss - probably my interpretation.

Every time I try to use LAST_INSERT_ID() I get a complaint that the query has a 
problem.

E.G., $qry=$qry.;select LAST_INSERT_ID(); will blow up on me every time  I've 
evaluated $qry, and it works just fine until I append the piece that should let me 
recover the auto increment value that was created during the insert process.

I'm using, according to phpinfo(), MySQL 3.23.32 and PHP 4.0.5 on Win2K with IIS 5.0.

I've dredged up everything I could find, but nothing I've tried seems to work.  I've 
created tables specifically for the purpose of testing, with no more than an ID field 
and a character field, to ensure that I wasn't encountering some other insert problem. 
 I'm quite at wit's end here, and hope that one or more of you can show me where I've 
gone astray.



Make a good day . . .
 . . . barn
~
Some men are discovered, others are found out!!
~




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

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 to set autocommit

2002-07-28 Thread Ben Goswami

Hi,
Where should I change the autocommit setting to 0 (i.e no Autocommit).  I'm
inserting row from perl script using DBI. I would like to bring up mySQL
server with autocommit false, so that I can explicitly commit from the front
end.  But with lot of research in various docs I could not find where to
changer the settings.  If I supply it in the connect string, it does not
take it.
Any help is appreciated





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

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




=?unknown?q?=BFPOR?= QUE USAR CALOSTRO BOVINO mysql@lists.mysql.com?

2002-07-28 Thread Manny



**
Un Abrazo sincero de parte!! Manny Castro Muñiz.
Director Hispa 21.
Escribeme a [EMAIL PROTECTED]
Visitame en: http://www.hispa21.com/sub/personal.asp?id=1310001
Si deseas contactarme via telefonica pudes hacerlo a este numero: (52) 656-630-7854

Hispa 21, La Revolucion en el E-Commerce.

**

En Hispa 21 respetamos tu privacidad y no abusamos de ese privilegio; si tu deseo es, 
ya no recibir futuros mensajes, informacion o desafiliarte de Hispa 21, solo envia un 
mail titulado darme de baja a: [EMAIL PROTECTED]



Re: help me out here guys... you gotta have a primary key

2002-07-28 Thread Gordon Burditt

So, one of my associates has made a linking table (some people also call it 
intersection table, cross tab table, but i believe that the propper way to 
model a many to many relationship is via a linking table). in the linking 
table, there is no primary key defined. 

Let us suppose you wish to define a many-to-many relationship between
people and telephones (and it IS a many-to-many relationship:  most
people have at least a home and a work phone (and some also have a
home cellphone and a work cellphone), and most families do not have
a separate phone for each family member).

You have a 'people' table with names, birth dates, employee number,
etc.  The primary key is the employee number (id int not null
auto_increment).  (Hint:  Social Security numbers are NOT guaranteed
unique, even if everyone relevant has one.)

You have a 'telephone' table with a telephone number, type (landline
or cellular), owner (company or someone else), location, and an
artificial primary key (id int not null auto_increment).  Why not
use the telephone number as primary key?  Some extensions, such as
the one in the lobby for guests, or the ones in elevators, can't
take incoming calls and don't HAVE numbers in the conventional sense.

So how do you represent the relationship?  Add another table
(linking table is a reasonable description) containing two columns,
the primary key of the person and the primary key of the telephone.
So what is a suitable primary key for THIS table?  It's a key on
both columns.  The same person can't have the same telephone more
than once, so requiring uniqueness prevents multiple identical rows
that don't make any sense.  Should the key be (person_id, telephone_id)
or (telephone_id, person_id)?  This depends on which index you
anticipate the SQL query to need most often.

Now, to those who like bringing up the foreign keys as some sort
of alternative:  I don't believe it.  Having foreign keys gets you
referential integrity.  It does NOT eliminate the need for the
linking table, nor does it change what's in the table, to represent
a many-to-many relationship.  I challenge anyone to demonstrate
otherwise.

I believe that every table must have 
a primary key. It is absolutely essential, otherwise you'll get tons of 
problems including redundancy, and inconsistency. 

Yes, you could record the relationship between me and my work telephone
several times, if the primary key didn't prevent that.  I don't believe
you have to have a SINGLE-FIELD primary key on every table.

However, my associate 
believes that our coding will ensure that such problems will be avoided and 
that it's okay for a table to have no primary key defined. I totally 
disagree. Even if our code is perfect, a primary key must be defined.

So, am i correct in being concerned, or am i just being close minded?
If, i'm totally wrong, in what situations is it a good idea, okay, or
benificial to not have a primary key defined for a table?

I can't think of a good reason to not have a primary key.


Gordon L. Burditt

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

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