Re: How to use the C API? (_not_ C++)

2003-10-26 Thread bluejack
10/26/03 12:37:28 AM, Patrik Fimml <[EMAIL PROTECTED]> wrote:

>
>Well, I tried it many times... here is the last:
>
>gcc -L/usr/local/lib/mysql -lmysqlclient -lnsl -lm -o rpgservices conn.o io.o 
>main.o 
>main.o(.text+0x80): In function `main':
>: undefined reference to `mysql_connect'
>collect2: ld returned 1 exit status

Patrick, you have a link-ordering problem. I can't quite determine where
-lmysqlclient should be in your link line, because I don't know where
function 'main' is. An app of 'hello world' complexity might look like
so:

gcc test.c -W -Wall -g -L/usr/local/lib/mysql -lmysqlclient -lz -o 
/usr/local/dev/build/test

Wherein 'main' resides in test.c and the output is placed in /usr/local/dev/build/test

In general, the library that is being linked *to* must follow the
library that is doing the linking (so that the unresolved symbol
can be found in a later file, and subsequently resolved) in the
command line to the linker/compiler. If your calls are in some
library, or some object file (conn.o? io.o? then -lmysqlclient
must be *after* them in the link line.)

Since -lmysqlclient is a third party library, depending
on nothing of your own manufacture, it should probably
come at the very end of your link line (although note
that it does, usually, depend on -lz, which should follow
it). 

If this is unhelpful, please feel free to email me details
pertinent to your full development environment, and perhaps
we can delve further. 

-bluejack




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Please help! Trying to install DBI & DBD for mysql

2003-10-26 Thread Daniel
I have downloaded perl 5.8.0 & DBI 1.38 & DBD Mysql 1.2219
I'm not too sure how to install from this point. I am running NT4 and
have tried:-perl makefile.pl, and nmake makefile, and then nmake install
but I keep getting error - can't locate DBI DBD.pm in @INC
Please help
thanks d.a.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How to best accomplish selecting string (unless it is null)

2003-10-26 Thread René Seindal
On Sat, Oct 25, 2003 at 11:49:46PM -0500, Adam Clauss wrote:
> I have a select statement that selects two string (text) fields.  In some
> cases, the first of them may be NULL.  In this case, I would like the second
> field to be selected instead.  It is also possible that in rare cases that
> the second string may be NULL, in which case it should just return NULL.
> 
> Ex:
> I have a table similar to:
> Key   |   str1   |   str2
> 0 |  "str1"  |  "anotherstr"
> 1 |   NULL   |  "string"
> 2 |   NULL   |   NULL
> 
> 
> I would like the select statement to return:
> Key   |   Str
> 0 |   "str1"
> 1 |   "string"
> 2 |   NULL
> 
> How possible is this?

select coalesce(str1, str2);

> 
> Adam Clauss
> [EMAIL PROTECTED]
> 
> 

-- 
René Seindal ([EMAIL PROTECTED])
Seindal Consult

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: MySQL/InnoDB-4.0.16 is released + sneak peek of 4.1.1

2003-10-26 Thread Martijn Tonies
Hi Heikki,

> > As you know - I'm a transaction zealot :-)
> >
> > Is there a way to get a signal back to the client when a
> > transaction has started?
>
> what do you mean? If you have AUTOCOMMIT=0, then every SELECT, INSERT,
> UPDATE, DELETE starts a new active transaction.

Aha - that's good, I did not wholly understand exactly how it was used.

> >Or perhaps something like
> > @@trancount in MSSQL?
>
> What does it count?

In the above case, with AUTOCOMMIT=0, it would return > 0 if a transaction
was started. For example, how does no autocommit work when working with
InnoDB and MyISAM tables - if I wouldn't know what table was being used
in an INSERT, how would I signal the user that a transaction has really
started?

InnoDB could have a "trancount" > 0 if the table would be an InnoDB table,
and return 0 if no InnoDB table was used in a statement or series of
statements.



With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird & MS SQL Server.
Upscene Productions
http://www.upscene.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Spatial Exts in MySQL - converting to SRID values...

2003-10-26 Thread Bill Hess
I am new to the world of GIS and have an application where I would like 
to use MySQL's (found in 4.1 alpha currently) Spatial Extensions.  I 
have a set of latitude and longitude for various locations and am trying 
to figure out how to convert to the SRID units.  I have started going 
thru the tons of info on OpenGIS and other related map projection sites, 
but it currently seems overwhelming.  Has anyone out there converted 
from lat/long to SRID units for point geometry type in MySQL??

If there are any sites or otherrefs for a beginning tutorial on GIS 
topics please forward.  I have been looking at PROJ.4 lib for performing 
these conversions - I am on the right track?   Thanks in advance...

--

Bill Hess

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Table Name

2003-10-26 Thread Eduardo Melo
Hi all !

I am migrating my database from MS-ACCESS to MYSQL. When I try to use a 
select statement below the application fails.

select * from [Clientes of Supermarkets]

anybody have an idea ?

best regards,

Eduardo F. Melo

_
MSN Messenger: converse com os seus amigos online.  
http://messenger.msn.com.br

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


FW: Table Name

2003-10-26 Thread Freddie Sorensen
Eduardo

MySQL does not use the square brackets [] as field delimiters. Try to use
`Clientes of Supermarkets` instead

Note, these are not single quotes (') but ASCII 96

Freddie 

-Original Message-
From: Eduardo Melo [mailto:[EMAIL PROTECTED] 
Sent: Sonntag, 26. Oktober 2003 14:40
To: [EMAIL PROTECTED]

Hi all !

I am migrating my database from MS-ACCESS to MYSQL. When I try to use a
select statement below the application fails.

select * from [Clientes of Supermarkets]

anybody have an idea ?

best regards,

Eduardo F. Melo

_
MSN Messenger: converse com os seus amigos online.  
http://messenger.msn.com.br


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



DROP TEMORARY TABLE

2003-10-26 Thread Michael McTernan
Hi there,

I'm trying to restrict the access that a Tomcat server has to mysql
4.0.15-standard-log database server.  Unfortunately some of the queries use
temporary tables, so I've had to GRANT CREATE TEMPORARY TABLES to the user.

However, since the server is using connection pooling, it also DROPS the
temporary tables after the queries have completed.

I'd really like to be able to GRANT DROP TEMPORARY TABLES, but this doesn't
seem to exist, so I've got to GRANT DROP - which feels a less safe to me :(

Is there a better way of doing this that someone has found before, or is
there a way to grant DROPS of the temporary table?

Many Thanks,

Mike



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Pictures In Table.

2003-10-26 Thread Braulio Lumbreras
 
 Thanks.  I am at the early stage of evolution.  I have created about 20-30
tables using only text.  But this is my first with pics.  I am not quite at
the upload stage.  But I will start with the basic table design that was
mentioned in the article.  
 
Thanks again.
 
Braulio
---Original Message---
 
From: [EMAIL PROTECTED]
Date: Saturday, October 25, 2003 15:56:07
To: Braulio
Cc: [EMAIL PROTECTED]
Subject: Re: Pictures In Table.
 
http://php.dreamwerx.net/forums/viewtopic.php?t=6
This code has served millions of binary objects (pics, files, etc)
for me with no problems.. good luck.
 
 
On Tue, 1 Jan 2002, Braulio wrote:
 
> What is the best method to use to include pictures in tables? I am using
> PHP. I have several customers that I maintain their real estate site and
> the maintenance is sometimes hectic. I am thinking that having the photos
> in a mysql table will make it easier to maintain these sites.
>
> Thanks in advance, Braulio
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
>
 
 
 
.

RE: alternate syntax for UNION?

2003-10-26 Thread Freddie Sorensen
Victor

How about generating a temporary table with the results of both queries ?

Or open two recordsete and merge them in your code ?

Freddie 


-Original Message-
From: Victor Spång Arthursson [mailto:[EMAIL PROTECTED] 
Sent: Sonntag, 26. Oktober 2003 16:56
To: [EMAIL PROTECTED]

Desperately need some way to get around the fact that UNION is not possible
to use on mysql prior to version 4…

Was just about to launch a site when it showed up that the hosting provider
was running version 3.

Help!

Regards,

Victor


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Mortgage Calculator

2003-10-26 Thread Ola Ogunneye
I am trying to create a mortgage loan calculator that would give me the
monthly payments, payoff amount, interest pmts, and all the possible
scenarios in an amortization schedule. (Down payment, Interest Rates...)

Is there a simple table + query that can do this without me having to
re-invent the wheel? 

Any help would do thank you.


Ola


Re: LOAD DATA skips records of text file

2003-10-26 Thread Don Read

On 26-Oct-2003 Heinrich Stoellinger wrote:
> I have a small dBase4 Database that contains 260 records. Exporting it 
> to a text file and then using LOAD DATA into table... I see that of the 
> 260 records only 204 get loaded. I cannot make out what is specific 
> about the records skipped. I do get warnings but (since I am using only 
> 4.1.0 alpha!) show warnings doesn't help at all. What is the typical 
> reason for LOAD DATA to skip records?

Usually embedded quotes, linefeeds or other terminating characters in
strings.

Try SELECT ... INTO OUTFILE ...

Sort the origin input & output files for clues as to what is missing & why.

Regards,
-- 
Don Read [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
(53kr33t w0rdz: sql table query)


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



LOAD DATA skips records of text file

2003-10-26 Thread Heinrich Stoellinger
I have a small dBase4 Database that contains 260 records. Exporting it 
to a text file and then using LOAD DATA into table... I see that of the 
260 records only 204 get loaded. I cannot make out what is specific 
about the records skipped. I do get warnings but (since I am using only 
4.1.0 alpha!) show warnings doesn't help at all. What is the typical 
reason for LOAD DATA to skip records? Better still - when might 4.1.1 be 
available, so I can look at the warnings?
Regards
H. Stoellinger
Salzburg, Austria

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: compile error mysql-4.0.16

2003-10-26 Thread Richard Pijnenburg
Okay, I've update gcc to : gcc (GCC) 3.3.2

And I'm still getting the same error. It's a RH9.0 box.

Hope someone can shed some light on this.
Thanks in advance.



-Original Message-
From: Patrik Fimml [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 8:21 AM
To: Richard Pijnenburg; [EMAIL PROTECTED]
Subject: Re: compile error mysql-4.0.16


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



> gcc: cannot specify -o with -c or -S and multiple compilations
> make[2]: *** [libmysql.lo] Error 1
> make[2]: Leaving directory 
> `/usr/local/src/web/mysql-4.0.16/libmysql_r'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/src/web/mysql-4.0.16'
> make: *** [all] Error 2

It seems your GNU Compiler Collection does not support options -o, -c
and -S, 
as well as multiple connections. You should try to get a new one 
(http://gcc.gnu.org/).

Patrik Fimml
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iQEVAwUBP5t155FyPD7t0rMPAQJROgf+PeUtd3LjFWa2Qd/wOkQfP7MQL2E38bVE
lcBoE6cyP8yweFBlaqsyXDmvlE00AmNg54MszlUT+n3JuB9oxIKEGQxYcEw16HuC
g3LpsG1ruXlJoVTOk83W5Vx90RCM8zSICeEu34ykgrq3fqJsiGLOM0R/MBjARtgv
8tUkYktfu6vnqmZCq9MItCoROptUA3bFQxpCYxNYYBlv1SMe5FKjY//OP613sufO
IdGPADo67HfL+Ju59UGEoLZnm6FECDXe1+s3Nalp31oKo9Ca3kZZ5WJtWJIUQ0EQ
xQNCPQZy+xJE7FEjVE3VpZIaabSVC31/SHNnLiRBIAgbX+3Dj8bCEw==
=wQhH
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



C API first row not being returned from a query

2003-10-26 Thread Carl B. Constantine
I'm writing an application and have the following SQL Query written in
C/GTK+ code:

select customer_id, phone, last_name, first_name,
company, account_code from customers;

OK, I then issue the following C commands:

results = mysql_store_result(conx);
numRows = mysql_num_rows(results);
g_print("There are %d rows returned\n", numRows);
return(results);

The print shows 7 rows returned, which is correct. I then have a while
loop to step through each row like so:

i = 0;

while (db_row = mysql_fetch_row(results))
  {
g_print("getting data...\n");
id = db_row[0];
phone = db_row[1];
last = db_row[2];
first = db_row[3];
company = db_row[4];
account = db_row[5];

row = 
g_strconcat(db_row[0],",",db_row[1],",",db_row[2],",",db_row[3],",",db_row[4], 
",",db_row[5],0L);
g_print("Row %d is: %s\n",i,row);
i++;
}

OK, the problem is, I don't get the very first row, I only get the last
6 rows. Can anyone tell me WHY this is? It doesn't really make sense.
This code supposedly prints rows 1-7 but really only prints 2-7.

Your help is greatly appreciated.

-- 
 .''`.  Carl B. Constantine
: :' : [EMAIL PROTECTED]
`. `'GnuPG: 135F FC30 7A02 B0EB 61DB  34E3 3AF1 DC6C 9F7A 3FF8
  `-  Debian GNU/Linux -- The power of freedom
  "Claiming that your operating system is the best in the world because more
  people use it is like saying McDonalds makes the best food in the world."

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: compile error mysql-4.0.16

2003-10-26 Thread Richard Pijnenburg
Like my last mail, I've updated gcc to the newest version.
And tried to recompile mysql, without any luck.
The strange thing is to, with version 4.0.14 I've got no problems.
Only with 4.0.15,4.0.15a & 4.0.16 I've got this error message.

I hope someone can help me with this caus I'm tierd to stay with an old
version of mysql :(

Thanks in advanced.

( p.s. a binary is NOT an option )

-Original Message-
From: Richard Pijnenburg [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 3:48 PM
To: 'Patrik Fimml'
Cc: [EMAIL PROTECTED]
Subject: RE: compile error mysql-4.0.16


Okay, I've update gcc to : gcc (GCC) 3.3.2

And I'm still getting the same error. It's a RH9.0 box.

Hope someone can shed some light on this.
Thanks in advance.



-Original Message-
From: Patrik Fimml [mailto:[EMAIL PROTECTED] 
Sent: Sunday, October 26, 2003 8:21 AM
To: Richard Pijnenburg; [EMAIL PROTECTED]
Subject: Re: compile error mysql-4.0.16


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



> gcc: cannot specify -o with -c or -S and multiple compilations
> make[2]: *** [libmysql.lo] Error 1
> make[2]: Leaving directory
> `/usr/local/src/web/mysql-4.0.16/libmysql_r'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/usr/local/src/web/mysql-4.0.16'
> make: *** [all] Error 2

It seems your GNU Compiler Collection does not support options -o, -c
and -S, 
as well as multiple connections. You should try to get a new one 
(http://gcc.gnu.org/).

Patrik Fimml
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iQEVAwUBP5t155FyPD7t0rMPAQJROgf+PeUtd3LjFWa2Qd/wOkQfP7MQL2E38bVE
lcBoE6cyP8yweFBlaqsyXDmvlE00AmNg54MszlUT+n3JuB9oxIKEGQxYcEw16HuC
g3LpsG1ruXlJoVTOk83W5Vx90RCM8zSICeEu34ykgrq3fqJsiGLOM0R/MBjARtgv
8tUkYktfu6vnqmZCq9MItCoROptUA3bFQxpCYxNYYBlv1SMe5FKjY//OP613sufO
IdGPADo67HfL+Ju59UGEoLZnm6FECDXe1+s3Nalp31oKo9Ca3kZZ5WJtWJIUQ0EQ
xQNCPQZy+xJE7FEjVE3VpZIaabSVC31/SHNnLiRBIAgbX+3Dj8bCEw==
=wQhH
-END PGP SIGNATURE-


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Why change in CONCAT_WS

2003-10-26 Thread Will French
I noticed in the changelog for the upcoming 4.1.1 alpha release that
CONCAT_WS is being changed to NOT skip empty strings.  I am sure that this
must have been done in response to feedback but I wonder if there are others
who like me have relied on the skipping of empty strings.  Among other
things, I use the function to assemble full names (of people) which I store
in parsed fields in my database (i.e. title, firstname, middlename,
lastname, suffix).  In many cases, my middlename and suffix fields are blank
and the current version of CONCAT_WS allows me to reassemble the parts
without having the possibility of having double spaces, leading spaces, or
trailing spaces.

Are there others like me who would like to preserve the empty string
skipping version of CONCAT_WS.  Perhaps the new version of the function
could be added under a new name like CONCAT_WS_NOSKIP or perhaps the option
to skip blanks could be provided in an argument.  Just curious what people
think.

obligatory keyword for list: mysql



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



schemaball - a schema visualizer

2003-10-26 Thread Martin Krzywinski

I've been working on a small app which produces flexible schema
visualizations. Tables are oraganized along a circular path with FK links
shown by lines or curves. Tables and links can be highlighted in a flexible
manner, using regular expressions.

http://mkweb.bcgsc.ca/schemaball/

Schemaball is designed to create views suitable for publication, on the web
or otherwise. By toggling the display of schema ball elements you can
generate layers for your favourite image editing program.

I would appreciate any comments.

Regards,

Martin


Martin Krzywinski
Genome Sciences Centre
600 W 10th Ave
Vancouver BC V5Z 4E6
tel 604.877.6000 x 3262
fax 604.877.6085
http://www.bcgsc.ca


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Date Field

2003-10-26 Thread Eduardo Melo
Hi All !

I have a datetime field in a table. When I use insert into table 
(aniversary) values ('24/10/2003'). The date is save as 20/10/2024. I am 
using dd/mm/ What can I do to save the date correctely ?

best regards,

Eduardo F. Melo

_
MSN Messenger: converse com os seus amigos online.  
http://messenger.msn.com.br

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


newbie - question about error msg

2003-10-26 Thread candy b
I have some Java programs that connect to MYSQL to create a table and 
populate it.  I had it working fine about a week ago.  The next day I 
started getting an error message that I don't understand.  There seems to be 
a problem with my connection not the program so I have no idea what to do to 
fix the problem.  The message I've been getting is "java.sql.SQLException: 
Communication link failure: java.io.Exception, underlying cause: Unexpected 
end of input stream"

I had heard that this could be caused from the connection be idle too long 
so I have disconnected and reconnected a couple of times with no change in 
the error message.

Do any of you have any suggestion on what my problem is?

Candy

_
Want to check if your PC is virus-infected?  Get a FREE computer virus scan 
online from McAfee.
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Date Field

2003-10-26 Thread Freddie Sorensen
Eduardo

Use the format '-mm-dd' instead

By the way, there is an excellent manual on http://www.mysql.com including
all the field types and formats

Freddie 


-Original Message-
From: Eduardo Melo [mailto:[EMAIL PROTECTED] 
Sent: Sonntag, 26. Oktober 2003 16:15
To: [EMAIL PROTECTED]

Hi All !

I have a datetime field in a table. When I use insert into table
(aniversary) values ('24/10/2003'). The date is save as 20/10/2024. I am
using dd/mm/ What can I do to save the date correctely ?

best regards,

Eduardo F. Melo

_
MSN Messenger: converse com os seus amigos online.  
http://messenger.msn.com.br


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



alternate syntax for UNION?

2003-10-26 Thread Victor Spång Arthursson
Desperately need some way to get around the fact that UNION is not 
possible to use on mysql prior to version 4…

Was just about to launch a site when it showed up that the hosting 
provider was running version 3.

Help!

Regards,

Victor

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


How do I restrict a mysql user only can work on a database

2003-10-26 Thread Clive Luk
Hi all,

I have a question. I have created

===mysql_command start==
mysql> GRANT ALL PRIVILEGES ON testdb to [EMAIL PROTECTED]
-> identified by 'some_passwd';
===mysql_command end==

the user can login no problem. but can see testdb

===mysql_command start==
mysql> show databases;
+--+
| Database |
+--+
| mysql|
| test |
+--+
2 rows in set (0.11 sec)

mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> use mysql;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> use testdb
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> use openwebmail;
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> quit

===mysql_command end==

and then i did that with a root login

===mysql_command start==
mysql> use testdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> grant select,update on *.* to [EMAIL PROTECTED];
Query OK, 0 rows affected (0.00 sec)

===mysql_command end==

But the testuser can actually view all databases. That's not what I really
want. I just want testuser can select and update testdb. But not others.

How can I restrict testuser only work on testdb?

Thanks.


Cheers,
Clive


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Paul DuBois
I'll bet the real problem is that you're not being authenticated as
testuser.
After you try connecting to the server as testuser, issue this query:

SELECT CURRENT_USER();

What's the result?

At 11:57 AM +1100 10/27/03, Clive Luk wrote:
Hi all,

I have a question. I have created

===mysql_command start==
mysql> GRANT ALL PRIVILEGES ON testdb to [EMAIL PROTECTED]
-> identified by 'some_passwd';
===mysql_command end==
the user can login no problem. but can see testdb

===mysql_command start==
mysql> show databases;
+--+
| Database |
+--+
| mysql|
| test |
+--+
2 rows in set (0.11 sec)
mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> use mysql;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> use testdb
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> use openwebmail;
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> quit
===mysql_command end==

and then i did that with a root login

===mysql_command start==
mysql> use testdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> grant select,update on *.* to [EMAIL PROTECTED];
Query OK, 0 rows affected (0.00 sec)
===mysql_command end==

But the testuser can actually view all databases. That's not what I really
want. I just want testuser can select and update testdb. But not others.
How can I restrict testuser only work on testdb?

Thanks.

Cheers,
Clive
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Paul DuBois
Please reply to the list, not to me personally, so that others can
follow this discussion.
At 12:13 PM +1100 10/27/03, Clive Luk wrote:
it says the following..

mysql> select current_user();
+---+
| current_user()|
+---+
| [EMAIL PROTECTED] |
+---+
1 row in set (0.00 sec)
Cheers,
Clive
Okay, that's correct.  Let's see... ha, I didn't read your original
message closely enough.  Your first grant statement should says
"ON testdb.*" rather than "ON testdb".  The latter syntax grants
privileges to "the testdb table in the current database", which isn't
what you want.
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 12:10 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: How do I restrict a mysql user only can work on a database
I'll bet the real problem is that you're not being authenticated as
testuser.
After you try connecting to the server as testuser, issue this query:

SELECT CURRENT_USER();

What's the result?

At 11:57 AM +1100 10/27/03, Clive Luk wrote:
Hi all,

I have a question. I have created

===mysql_command start==
mysql> GRANT ALL PRIVILEGES ON testdb to [EMAIL PROTECTED]
 -> identified by 'some_passwd';
===mysql_command end==
the user can login no problem. but can see testdb

===mysql_command start==
mysql> show databases;
+--+
| Database |
+--+
| mysql|
| test |
+--+
2 rows in set (0.11 sec)
mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> use mysql;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> use testdb
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> use openwebmail;
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> quit
===mysql_command end==

and then i did that with a root login

===mysql_command start==
mysql> use testdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> grant select,update on *.* to [EMAIL PROTECTED];
Query OK, 0 rows affected (0.00 sec)
===mysql_command end==

But the testuser can actually view all databases. That's not what I really
want. I just want testuser can select and update testdb. But not others.
How can I restrict testuser only work on testdb?

Thanks.

Cheers,
Clive
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Clive Luk
Thanks Paul,

but how do i reset all the previous setting before I try to run the command
again? Or do I need to reset the privileges?

Cheers,
Clive

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 12:21 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: How do I restrict a mysql user only can work on a database


Please reply to the list, not to me personally, so that others can
follow this discussion.

At 12:13 PM +1100 10/27/03, Clive Luk wrote:
>it says the following..
>
>mysql> select current_user();
>+---+
>| current_user()|
>+---+
>| [EMAIL PROTECTED] |
>+---+
>1 row in set (0.00 sec)
>
>Cheers,
>Clive

Okay, that's correct.  Let's see... ha, I didn't read your original
message closely enough.  Your first grant statement should says
"ON testdb.*" rather than "ON testdb".  The latter syntax grants
privileges to "the testdb table in the current database", which isn't
what you want.

>
>-Original Message-
>From: Paul DuBois [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 27, 2003 12:10 PM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: Re: How do I restrict a mysql user only can work on a database
>
>
>I'll bet the real problem is that you're not being authenticated as
>testuser.
>
>After you try connecting to the server as testuser, issue this query:
>
>SELECT CURRENT_USER();
>
>What's the result?
>
>
>At 11:57 AM +1100 10/27/03, Clive Luk wrote:
>>Hi all,
>>
>>I have a question. I have created
>>
>>===mysql_command start==
>>mysql> GRANT ALL PRIVILEGES ON testdb to [EMAIL PROTECTED]
>>  -> identified by 'some_passwd';
>>===mysql_command end==
>>
>>the user can login no problem. but can see testdb
>>
>>===mysql_command start==
>>mysql> show databases;
>>+--+
>>| Database |
>>+--+
>>| mysql|
>>| test |
>>+--+
>>2 rows in set (0.11 sec)
>>
>>mysql> use test;
>>Database changed
>>mysql> show tables;
>>Empty set (0.00 sec)
>>
>>mysql> use mysql;
>>Database changed
>>mysql> show tables;
>>Empty set (0.00 sec)
>>
>>mysql> use testdb
>>ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
>>'testdb'
>>mysql> use openwebmail;
>>ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
>>'testdb'
>>mysql> quit
>>
>>===mysql_command end==
>>
>>and then i did that with a root login
>>
>>===mysql_command start==
>>mysql> use testdb;
>>Reading table information for completion of table and column names
>>You can turn off this feature to get a quicker startup with -A
>>
>>Database changed
>>mysql> grant select,update on *.* to [EMAIL PROTECTED];
>>Query OK, 0 rows affected (0.00 sec)
>>
>>===mysql_command end==
>>
>>But the testuser can actually view all databases. That's not what I really
>>want. I just want testuser can select and update testdb. But not others.
>>
>>How can I restrict testuser only work on testdb?
>>
>>Thanks.
>>
>>
>>Cheers,
>>Clive
>>
>>
>>--
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
>
>
>--
>Paul DuBois, Senior Technical Writer
>Madison, Wisconsin, USA
>MySQL AB, www.mysql.com
>
>Are you MySQL certified?  http://www.mysql.com/certification/


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification/


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Paul DuBois
At 12:26 PM +1100 10/27/03, Clive Luk wrote:
Thanks Paul,

but how do i reset all the previous setting before I try to run the command
again? Or do I need to reset the privileges?
Try:

REVOKE ALL PRIVILEGES ON testdb FROM [EMAIL PROTECTED];

Cheers,
Clive
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 12:21 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: How do I restrict a mysql user only can work on a database
Please reply to the list, not to me personally, so that others can
follow this discussion.
At 12:13 PM +1100 10/27/03, Clive Luk wrote:
it says the following..

mysql> select current_user();
+---+
| current_user()|
+---+
| [EMAIL PROTECTED] |
+---+
1 row in set (0.00 sec)
Cheers,
Clive
Okay, that's correct.  Let's see... ha, I didn't read your original
message closely enough.  Your first grant statement should says
"ON testdb.*" rather than "ON testdb".  The latter syntax grants
privileges to "the testdb table in the current database", which isn't
what you want.
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 12:10 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: How do I restrict a mysql user only can work on a database
I'll bet the real problem is that you're not being authenticated as
testuser.
After you try connecting to the server as testuser, issue this query:

SELECT CURRENT_USER();

What's the result?

At 11:57 AM +1100 10/27/03, Clive Luk wrote:
Hi all,

I have a question. I have created

===mysql_command start==
mysql> GRANT ALL PRIVILEGES ON testdb to [EMAIL PROTECTED]
  -> identified by 'some_passwd';
===mysql_command end==
the user can login no problem. but can see testdb

===mysql_command start==
mysql> show databases;
+--+
| Database |
+--+
| mysql|
| test |
+--+
2 rows in set (0.11 sec)
mysql> use test;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> use mysql;
Database changed
mysql> show tables;
Empty set (0.00 sec)
mysql> use testdb
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> use openwebmail;
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
'testdb'
mysql> quit
===mysql_command end==

and then i did that with a root login

===mysql_command start==
mysql> use testdb;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> grant select,update on *.* to [EMAIL PROTECTED];
Query OK, 0 rows affected (0.00 sec)
===mysql_command end==

But the testuser can actually view all databases. That's not what I really
want. I just want testuser can select and update testdb. But not others.
How can I restrict testuser only work on testdb?

Thanks.

Cheers,
 >>Clive


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Clive Luk
Hi paul,

Thanks for the quick reply.

I have revoke all the privileges and ran

grant all privileges on testdb.* to [EMAIL PROTECTED];

and i login as testuser and i have confirm with select Current_user(); that
i am a testuser;

and i can still select on mysql.user.

just an info.

select * from mysql.user where user='testuser';

| localhost | testuser | x | N   | N   | N
| N   | N   | N | N   | N | N
| N | N  | N   | N  | N  | N
| N  | N | N| N| N
| N|  || |  |
0 |   0 |   0 |

any clue?

Cheers,
Clive

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 12:30 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: How do I restrict a mysql user only can work on a database


At 12:26 PM +1100 10/27/03, Clive Luk wrote:
>Thanks Paul,
>
>but how do i reset all the previous setting before I try to run the command
>again? Or do I need to reset the privileges?

Try:

REVOKE ALL PRIVILEGES ON testdb FROM [EMAIL PROTECTED];

>
>Cheers,
>Clive
>
>-Original Message-
>From: Paul DuBois [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 27, 2003 12:21 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: How do I restrict a mysql user only can work on a database
>
>
>Please reply to the list, not to me personally, so that others can
>follow this discussion.
>
>At 12:13 PM +1100 10/27/03, Clive Luk wrote:
>>it says the following..
>>
>>mysql> select current_user();
>>+---+
>>| current_user()|
>>+---+
>>| [EMAIL PROTECTED] |
>>+---+
>>1 row in set (0.00 sec)
>>
>>Cheers,
>>Clive
>
>Okay, that's correct.  Let's see... ha, I didn't read your original
>message closely enough.  Your first grant statement should says
>"ON testdb.*" rather than "ON testdb".  The latter syntax grants
>privileges to "the testdb table in the current database", which isn't
>what you want.
>
>>
>>-Original Message-
>>From: Paul DuBois [mailto:[EMAIL PROTECTED]
>>Sent: Monday, October 27, 2003 12:10 PM
>>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>>Subject: Re: How do I restrict a mysql user only can work on a database
>>
>>
>>I'll bet the real problem is that you're not being authenticated as
>>testuser.
>>
>>After you try connecting to the server as testuser, issue this query:
>>
>>SELECT CURRENT_USER();
>>
>>What's the result?
>>
>>
>>At 11:57 AM +1100 10/27/03, Clive Luk wrote:
>>>Hi all,
>>>
>>>I have a question. I have created
>>>
>>>===mysql_command start==
>>>mysql> GRANT ALL PRIVILEGES ON testdb to [EMAIL PROTECTED]
>>>   -> identified by 'some_passwd';
>>>===mysql_command end==
>>>
>>>the user can login no problem. but can see testdb
>>>
>>>===mysql_command start==
>>>mysql> show databases;
>>>+--+
>>>| Database |
>>>+--+
>>>| mysql|
>>>| test |
>>>+--+
>>>2 rows in set (0.11 sec)
>>>
>>>mysql> use test;
>>>Database changed
>>>mysql> show tables;
>>>Empty set (0.00 sec)
>>>
>>>mysql> use mysql;
>>>Database changed
>>>mysql> show tables;
>>>Empty set (0.00 sec)
>>>
>>>mysql> use testdb
>>>ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
>>>'testdb'
>>>mysql> use openwebmail;
>>>ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database
>>>'testdb'
>>>mysql> quit
>>>
>>>===mysql_command end==
>>>
>>>and then i did that with a root login
>>>
>>>===mysql_command start==
>>>mysql> use testdb;
>>>Reading table information for completion of table and column names
>>>You can turn off this feature to get a quicker startup with -A
>>>
>>>Database changed
>>>mysql> grant select,update on *.* to [EMAIL PROTECTED];
>>>Query OK, 0 rows affected (0.00 sec)
>>>
>>>===mysql_command end==
>>>
>>>But the testuser can actually view all databases. That's not what I
really
>>>want. I just want testuser can select and update testdb. But not others.
>>>
>>>How can I restrict testuser only work on testdb?
>>>
>>>Thanks.
>>>
>>>
>>>Cheers,
>  >>Clive


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification/


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Paul DuBois
At 12:48 PM +1100 10/27/03, Clive Luk wrote:
Hi paul,

Thanks for the quick reply.

I have revoke all the privileges and ran

grant all privileges on testdb.* to [EMAIL PROTECTED];

and i login as testuser and i have confirm with select Current_user(); that
i am a testuser;
and i can still select on mysql.user.

just an info.

select * from mysql.user where user='testuser';

| localhost | testuser | x | N   | N   | N
| N   | N   | N | N   | N | N
| N | N  | N   | N  | N  | N
| N  | N | N| N| N
| N|  || |  |
0 |   0 |   0 |
any clue?
What does SELECT * FROM mysql.db WHERE User='testuser' show?

Cheers,
Clive


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Clive Luk
| localhost | testdb | testuser | Y   | Y   | Y   |
Y   | Y   | Y | N  | Y   | Y
| Y  | Y | Y|

the N is Grant_priv

I don't understand why? thanks...

Cheers,
Clive

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 1:04 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: How do I restrict a mysql user only can work on a database


At 12:48 PM +1100 10/27/03, Clive Luk wrote:
>Hi paul,
>
>Thanks for the quick reply.
>
>I have revoke all the privileges and ran
>
>grant all privileges on testdb.* to [EMAIL PROTECTED];
>
>and i login as testuser and i have confirm with select Current_user(); that
>i am a testuser;
>
>and i can still select on mysql.user.
>
>just an info.
>
>select * from mysql.user where user='testuser';
>
>| localhost | testuser | x | N   | N   | N
>| N   | N   | N | N   | N | N
>| N | N  | N   | N  | N  | N
>| N  | N | N| N| N
>| N|  || |  |
>0 |   0 |   0 |
>
>any clue?

What does SELECT * FROM mysql.db WHERE User='testuser' show?

>
>Cheers,
>Clive


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification/



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Paul DuBois
At 1:06 PM +1100 10/27/03, Clive Luk wrote:
| localhost | testdb | testuser | Y   | Y   | Y   |
Y   | Y   | Y | N  | Y   | Y
| Y  | Y | Y|
the N is Grant_priv

I don't understand why? thanks...
Don't understand what?  Why Grant_priv is N? It's not included in "ALL
PRIVILEGES".
As far as being able to access the mysql database, apparently you've
granted global access to it, or any-user access to it at the database
level.  Does SELECT * FROM mysql.db WHERE Db='mysql' show anything?
Cheers,
Clive
-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 1:04 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: How do I restrict a mysql user only can work on a database
At 12:48 PM +1100 10/27/03, Clive Luk wrote:
Hi paul,

Thanks for the quick reply.

I have revoke all the privileges and ran

grant all privileges on testdb.* to [EMAIL PROTECTED];

and i login as testuser and i have confirm with select Current_user(); that
i am a testuser;
and i can still select on mysql.user.

just an info.

select * from mysql.user where user='testuser';

| localhost | testuser | x | N   | N   | N
| N   | N   | N | N   | N | N
| N | N  | N   | N  | N  | N
| N  | N | N| N| N
| N|  || |  |
0 |   0 |   0 |
any clue?
What does SELECT * FROM mysql.db WHERE User='testuser' show?

Cheers,
 >Clive


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com
Are you MySQL certified?  http://www.mysql.com/certification/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Why change in CONCAT_WS

2003-10-26 Thread Jesse Sheidlower
On Sun, Oct 26, 2003 at 10:05:07AM -0500, Will French wrote:
> 
> Are there others like me who would like to preserve the empty string
> skipping version of CONCAT_WS.  Perhaps the new version of the function
> could be added under a new name like CONCAT_WS_NOSKIP or perhaps the option
> to skip blanks could be provided in an argument.  Just curious what people
> think.

I agree absolutely. I was thrilled to discover CONCAT_WS and now
use it all the time in ways very similar to how you do--joining
lists of things that may or may not have values. It would be
very irritating to have to rewrite this functionality within
MySQL, and tedious to have to do it in the relevant programming
language instead.

Jesse Sheidlower
<[EMAIL PROTECTED]>

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: How do I restrict a mysql user only can work on a database

2003-10-26 Thread Clive Luk
Hi Paul,

FLUSH PRIVILEGES; <- missing hahaha

That's the command I didn't use after the commands you asked me to put in
before... it is working know... I can't see mysql. I can see testdb and
test... thank you very much for your help

Cheers,
Clive

-Original Message-
From: Paul DuBois [mailto:[EMAIL PROTECTED]
Sent: Monday, October 27, 2003 1:15 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: How do I restrict a mysql user only can work on a database


At 1:06 PM +1100 10/27/03, Clive Luk wrote:
>| localhost | testdb | testuser | Y   | Y   | Y   |
>Y   | Y   | Y | N  | Y   | Y
>| Y  | Y | Y|
>
>the N is Grant_priv
>
>I don't understand why? thanks...

Don't understand what?  Why Grant_priv is N? It's not included in "ALL
PRIVILEGES".

As far as being able to access the mysql database, apparently you've
granted global access to it, or any-user access to it at the database
level.  Does SELECT * FROM mysql.db WHERE Db='mysql' show anything?

>
>Cheers,
>Clive
>
>-Original Message-
>From: Paul DuBois [mailto:[EMAIL PROTECTED]
>Sent: Monday, October 27, 2003 1:04 PM
>To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: RE: How do I restrict a mysql user only can work on a database
>
>
>At 12:48 PM +1100 10/27/03, Clive Luk wrote:
>>Hi paul,
>>
>>Thanks for the quick reply.
>>
>>I have revoke all the privileges and ran
>>
>>grant all privileges on testdb.* to [EMAIL PROTECTED];
>>
>>and i login as testuser and i have confirm with select Current_user();
that
>>i am a testuser;
>>
>>and i can still select on mysql.user.
>>
>>just an info.
>>
>>select * from mysql.user where user='testuser';
>>
>>| localhost | testuser | x | N   | N   | N
>>| N   | N   | N | N   | N | N
>>| N | N  | N   | N  | N  | N
>>| N  | N | N| N| N
>>| N|  || |  |
>>0 |   0 |   0 |
>>
>>any clue?
>
>What does SELECT * FROM mysql.db WHERE User='testuser' show?
>
>>
>>Cheers,
>  >Clive


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification/



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Non-blocking MySQL C API calls?

2003-10-26 Thread Chris Nolan
Hi all,

One feature that PostgreSQL has is non-blocking API calls. Admittedly, they 
don't have prepared statements yet, but non-blocking calls might be well 
worth having for an app I'm hoping to build. Does the MySQL API have this 
sort of capability?

Regards,

Chris

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Supported data types

2003-10-26 Thread Lay Hoon Tan
Does MySQL support "serial" (auto-increment a number) and currency types ?
It seems that both are not supported but I would just like to confirm this.

Thank you



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]