Re: Problem with GRANT ... 'user'@'%'

2007-05-22 Thread Mogens Melander
On my servers i'm using the 'user'@'localhost' for PHP apps.
running on the local web-server. Those users allocated for
web-apps can only connect to their specific DB from localhost.

On Tue, May 22, 2007 03:19, Miguel Cardenas wrote:
 Localhost is indeed a special value that isn't include in '%'. It's a
 feature not a bug ;)

 Regards,

 Bingo! That was the point! If i connect to the server ip or server name it
 works perfectly, but if I try to connect to localhost it fails unless I
 add a
 new user specific to localhost :D

 Thanks for your comments

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


 --
 This message has been scanned for viruses and
 dangerous content by OpenProtect(http://www.openprotect.com), and is
 believed to be clean.



-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


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



Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
 If you don't specify a hostname in SHOW GRANTS, '%' is assumed.  My mistake
 for not telling you this before.  If you enable networking, and connect
 with

   mysql -h 127.0.0.1

 instead of

   mysql -h localhost

Well, in fact 127.0.0.1 and localhost produce the same effect but by using the 
ip address of the server works fine :D

Somebody has just sent a comment saying that localhost and a normal ip address 
work different, and in fact was right, now am able to connect to the ip 
instead of localhost...

Thanks for all your comments

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
 Localhost is indeed a special value that isn't include in '%'. It's a
 feature not a bug ;)

 Regards,

Bingo! That was the point! If i connect to the server ip or server name it 
works perfectly, but if I try to connect to localhost it fails unless I add a 
new user specific to localhost :D

Thanks for your comments

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-21 Thread Miguel Cardenas
 Hm, I didn't know that!  I thought it was only a special value to the
 client tools, which I know will try to connect via socket on UNIX machines
 when they see 'localhost' but will try to connect via TCP/IP when they see
 '127.0.0.1'. Thanks for pointing this out!

 Baron

In fact that was the problem, connecting to localhost didn't work unless I add 
specifically localhost... If tried with the host ip or name worked perfectly, 
so your comment had sense and solved it all...

Just one comment, 127.0.0.1 had the same effect as localhost, I should connect 
to the specific host ip or name.

Thanks for all your comments

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Mathieu Bruneau
Baron Schwartz a écrit :
 Hi,
 
 Miguel Cardenas wrote:
 Hello list

 I have a problem adding a user with host '%' ...

 *** If I add a user with host '%' when trying to connect get this error:
 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
 password: YES)

 *** If I add the same user with localhost it connects and works fine...

 My specific doubt is:

 1) do I need to add a same user with both '%' and 'localhost' to
 connect locally and from another location???, or...

 2) for some reason a host '%' is not working or need to do something
 so it allows connections from any host?
 
 Remember to quote the user and host carefully.  So,
 
 GRANT ... TO 'user'@'%'
 
 not
 
 GRANT ... TO [EMAIL PROTECTED]
 
 If you have doubts about what you actually granted, do this:
 
 SHOW GRANTS FOR 'user'
 
 And see what host it claims the permissions are for.  If you did it
 wrong, it will say no such user exists.  If you do all this and
 everything looks okay, write back to the list again and maybe we can
 help you more.
 
 Oh, one more place to look is at the server configuration in /etc/my.cnf
 or equivalent, to be sure networking is configured right.  You want to
 check the bind-address and skip-networking settings.  You don't want
 skip-networking, and you want bind-address set to the machine's IP
 address.  Now that I think of it, this is more likely to be the problem
 for you.
 
 Cheers
 Baron
 


Localhost is indeed a special value that isn't include in '%'. It's a
feature not a bug ;)

Regards,

-- 
Mathieu Bruneau
aka ROunofF

===
GPG keys available @ http://rounoff.darktech.org

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Baron Schwartz

Mathieu Bruneau wrote:

Baron Schwartz a écrit :

Hi,

Miguel Cardenas wrote:

Hello list

I have a problem adding a user with host '%' ...

*** If I add a user with host '%' when trying to connect get this error:
ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
password: YES)

*** If I add the same user with localhost it connects and works fine...

My specific doubt is:

1) do I need to add a same user with both '%' and 'localhost' to
connect locally and from another location???, or...

2) for some reason a host '%' is not working or need to do something
so it allows connections from any host?

Remember to quote the user and host carefully.  So,

GRANT ... TO 'user'@'%'

not

GRANT ... TO [EMAIL PROTECTED]

If you have doubts about what you actually granted, do this:

SHOW GRANTS FOR 'user'

And see what host it claims the permissions are for.  If you did it
wrong, it will say no such user exists.  If you do all this and
everything looks okay, write back to the list again and maybe we can
help you more.

Oh, one more place to look is at the server configuration in /etc/my.cnf
or equivalent, to be sure networking is configured right.  You want to
check the bind-address and skip-networking settings.  You don't want
skip-networking, and you want bind-address set to the machine's IP
address.  Now that I think of it, this is more likely to be the problem
for you.

Cheers
Baron




Localhost is indeed a special value that isn't include in '%'. It's a
feature not a bug ;)


Hm, I didn't know that!  I thought it was only a special value to the client 
tools, which I know will try to connect via socket on UNIX machines when they 
see 'localhost' but will try to connect via TCP/IP when they see '127.0.0.1'. 
Thanks for pointing this out!


Baron

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Miguel Cardenas
 Remember to quote the user and host carefully.  So,

The quoting is okay, I tested again

 If you have doubts about what you actually granted, do this:
 SHOW GRANTS FOR 'user'

I've sent this command:
grant all on mydatabase.* to 'myuser'@'%' identified by 'mypass';

Then tested the show grants:
show grants for 'myuser';
---
Grants for [EMAIL PROTECTED] :
GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY PASSWORD '...'
GRANT ALL PRIVILEGES ON `mydatabase`.* TO 'myuser'@'%'

so it appears that user is added correctly, but when I try to connect get this 
error again:

ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using 
password: YES)

 Oh, one more place to look is at the server configuration in /etc/my.cnf or
 equivalent, to be sure networking is configured right.  You want to check
 the bind-address and skip-networking settings.  You don't want
 skip-networking, and you want bind-address set to the machine's IP address.
  Now that I think of it, this is more likely to be the problem for you.

- skip-networking is disabled
- bind-address option is not present in /etc/my.cnf

should I try to add a:

bind-address = x.y.z.a

to the configuration file :-?


Thanks for any comment

**
P.S.
I've added the same user but using 'myuser'@'localhost' whithout deleting the 
first one created, and the new show grants outputs the *same* two lines of 
information

Grants for [EMAIL PROTECTED] :
GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY PASSWORD '...'
GRANT ALL PRIVILEGES ON `mydatabase`.* TO 'myuser'@'%'

but this time am able to connect. What can be wrong? or do I need to add 
both '%' and 'localhost' hosts?
**

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



Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Mogens Melander
You are still missing the GRANT for 'myuser'@'localhost'

On Mon, May 21, 2007 03:06, Miguel Cardenas wrote:
 Remember to quote the user and host carefully.  So,

 The quoting is okay, I tested again

 If you have doubts about what you actually granted, do this:
 SHOW GRANTS FOR 'user'

 I've sent this command:
 grant all on mydatabase.* to 'myuser'@'%' identified by 'mypass';

 Then tested the show grants:
 show grants for 'myuser';
 ---
 Grants for [EMAIL PROTECTED] :
 GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY PASSWORD '...'
 GRANT ALL PRIVILEGES ON `mydatabase`.* TO 'myuser'@'%'

 so it appears that user is added correctly, but when I try to connect get
 this
 error again:

 ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using
 password: YES)

 Oh, one more place to look is at the server configuration in /etc/my.cnf
 or
 equivalent, to be sure networking is configured right.  You want to
 check
 the bind-address and skip-networking settings.  You don't want
 skip-networking, and you want bind-address set to the machine's IP
 address.
  Now that I think of it, this is more likely to be the problem for you.

 - skip-networking is disabled
 - bind-address option is not present in /etc/my.cnf

 should I try to add a:

 bind-address = x.y.z.a

 to the configuration file :-?


 Thanks for any comment

 **
 P.S.
 I've added the same user but using 'myuser'@'localhost' whithout deleting
 the
 first one created, and the new show grants outputs the *same* two lines of
 information

 Grants for [EMAIL PROTECTED] :
 GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY PASSWORD '...'
 GRANT ALL PRIVILEGES ON `mydatabase`.* TO 'myuser'@'%'

 but this time am able to connect. What can be wrong? or do I need to add
 both '%' and 'localhost' hosts?
 **

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


 --
 This message has been scanned for viruses and
 dangerous content by OpenProtect(http://www.openprotect.com), and is
 believed to be clean.



-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


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



Re: Problem with GRANT ... 'user'@'%'

2007-05-20 Thread Baron Schwartz

Hi,

Miguel Cardenas wrote:

Remember to quote the user and host carefully.  So,


The quoting is okay, I tested again


If you have doubts about what you actually granted, do this:
SHOW GRANTS FOR 'user'


I've sent this command:
grant all on mydatabase.* to 'myuser'@'%' identified by 'mypass';

Then tested the show grants:
show grants for 'myuser';
---
Grants for [EMAIL PROTECTED] :
GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY PASSWORD '...'
GRANT ALL PRIVILEGES ON `mydatabase`.* TO 'myuser'@'%'

so it appears that user is added correctly, but when I try to connect get this 
error again:


ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using 
password: YES)



Oh, one more place to look is at the server configuration in /etc/my.cnf or
equivalent, to be sure networking is configured right.  You want to check
the bind-address and skip-networking settings.  You don't want
skip-networking, and you want bind-address set to the machine's IP address.
 Now that I think of it, this is more likely to be the problem for you.


- skip-networking is disabled
- bind-address option is not present in /etc/my.cnf

should I try to add a:

bind-address = x.y.z.a

to the configuration file :-?


Thanks for any comment

**
P.S.
I've added the same user but using 'myuser'@'localhost' whithout deleting the 
first one created, and the new show grants outputs the *same* two lines of 
information


Grants for [EMAIL PROTECTED] :
GRANT USAGE ON *.* TO 'myuser'@'%' IDENTIFIED BY PASSWORD '...'
GRANT ALL PRIVILEGES ON `mydatabase`.* TO 'myuser'@'%'

but this time am able to connect. What can be wrong? or do I need to add 
both '%' and 'localhost' hosts?

**



I think you now have two users, which you will only be able to see with these:

SHOW GRANTS FOR 'myuser'@'%'
SHOW GRANTS FOR 'myuser'@'localhost'

If you don't specify a hostname in SHOW GRANTS, '%' is assumed.  My mistake for 
not telling you this before.  If you enable networking, and connect with


mysql -h 127.0.0.1

instead of

mysql -h localhost

You will connect via TCP/IP, and you will be connecting as 'myuser'@'%' user. 
(As someone else said, localhost is a magical value with special behavior; it 
defaults to connecting via a socket on UNIX-ish systems, instead of TCP/IP). 
The simplest way to set this server configuration, if you haven't already, is 
probably to set bind-address to 127.0.0.1, which allows TCP/IP connections from 
the same machine.  If you want to be able to connect from elsewhere, set it to 
the server's IP address.


Cheers
Baron

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



Problem with GRANT ... 'user'@'%'

2007-05-19 Thread Miguel Cardenas
Hello list

I have a problem adding a user with host '%' ...

*** If I add a user with host '%' when trying to connect get this error:
ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using 
password: YES)

*** If I add the same user with localhost it connects and works fine...

My specific doubt is:

1) do I need to add a same user with both '%' and 'localhost' to connect 
locally and from another location???, or...

2) for some reason a host '%' is not working or need to do something so it 
allows connections from any host?

Thanks for your help


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



Re: Problem with GRANT ... 'user'@'%'

2007-05-19 Thread Baron Schwartz

Hi,

Miguel Cardenas wrote:

Hello list

I have a problem adding a user with host '%' ...

*** If I add a user with host '%' when trying to connect get this error:
ERROR 1045 (28000): Access denied for user 'myuser'@'localhost' (using 
password: YES)


*** If I add the same user with localhost it connects and works fine...

My specific doubt is:

1) do I need to add a same user with both '%' and 'localhost' to connect 
locally and from another location???, or...


2) for some reason a host '%' is not working or need to do something so it 
allows connections from any host?


Remember to quote the user and host carefully.  So,

GRANT ... TO 'user'@'%'

not

GRANT ... TO [EMAIL PROTECTED]

If you have doubts about what you actually granted, do this:

SHOW GRANTS FOR 'user'

And see what host it claims the permissions are for.  If you did it wrong, it 
will say no such user exists.  If you do all this and everything looks okay, 
write back to the list again and maybe we can help you more.


Oh, one more place to look is at the server configuration in /etc/my.cnf or 
equivalent, to be sure networking is configured right.  You want to check the 
bind-address and skip-networking settings.  You don't want skip-networking, and 
you want bind-address set to the machine's IP address.  Now that I think of it, 
this is more likely to be the problem for you.


Cheers
Baron

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



Re: Problem with GRANT not working.

2005-10-15 Thread Gleb Paharenko
Hello.



Enable a General log and find out what is MySQL thinking about the host

from you're connecting to it.



Ben Clewett wrote:

 Dear MySQL,

 

 A new installation of 4.1.9 on AIX 5. I have a GRANT that is not working.

 

 Connecting from foreign server 'pho.com' with IP of '192.168.1.1', I

 should be able to GRANT using either:

 

 mysql GRANT all ON test.* TO test@'192.168.%' IDENTIFIED BY 'test';

 mysql GRANT all ON test.* TO test@'%.com' IDENTIFIED BY 'test';

 

 The second version '%.com' allows access.  The first version access by

 IP '192.168.%' does not work.

 

 This always has worked on 4.1.9 before.  There is nothing in the manual

 to elaborate on this problem.  As far as I can see, this should work

 perfectly.

 

 Would any users be able to suggest a solution to this?

 

 Regards,

 

 Ben Clewett.

 

 

 

 



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




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



Re: Problem with GRANT not working.

2005-10-15 Thread Gleb Paharenko
Hello.



It looks very weird for me. I don't have an access to AIX machine, so I

suggest you to use gdb and research where MySQL is getting such an

interesting result. See sql/hostname.cc file from the source

distribution and:

  http://dev.mysql.com/doc/refman/4.1/en/debugging-server.html





Ben Clewett wrote:





 A little more information:

 

 If I use --skip-name-resolve then I get an odd error:

 

 ERROR 1045 (28000): Access denied for user 'me'@'0.0.0.0' (using

 password: YES)

 

 This seems to suggest that MySQL thinks my client is from '0.0.0.0' and

 hence cannot match any GRANT syntax I use.  Why would MySQL think my

 client is from '0.0.0.0'?

 

 Thanks in advance for any person who can offer a solution to these

 problems.

 



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




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



Problem with GRANT not working.

2005-10-13 Thread Ben Clewett

Dear MySQL,

A new installation of 4.1.9 on AIX 5. I have a GRANT that is not working.

Connecting from foreign server 'pho.com' with IP of '192.168.1.1', I 
should be able to GRANT using either:


mysql GRANT all ON test.* TO test@'192.168.%' IDENTIFIED BY 'test';
mysql GRANT all ON test.* TO test@'%.com' IDENTIFIED BY 'test';

The second version '%.com' allows access.  The first version access by 
IP '192.168.%' does not work.


This always has worked on 4.1.9 before.  There is nothing in the manual 
to elaborate on this problem.  As far as I can see, this should work 
perfectly.


Would any users be able to suggest a solution to this?

Regards,

Ben Clewett.




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



Re: Problem with GRANT not working.

2005-10-13 Thread Ben Clewett

A little more information:

If I use --skip-name-resolve then I get an odd error:

ERROR 1045 (28000): Access denied for user 'me'@'0.0.0.0' (using 
password: YES)


This seems to suggest that MySQL thinks my client is from '0.0.0.0' and 
hence cannot match any GRANT syntax I use.  Why would MySQL think my 
client is from '0.0.0.0'?


Thanks in advance for any person who can offer a solution to these problems.



Ben Clewett wrote:

Dear MySQL,

A new installation of 4.1.9 on AIX 5. I have a GRANT that is not working.

Connecting from foreign server 'pho.com' with IP of '192.168.1.1', I 
should be able to GRANT using either:


mysql GRANT all ON test.* TO test@'192.168.%' IDENTIFIED BY 'test';
mysql GRANT all ON test.* TO test@'%.com' IDENTIFIED BY 'test';

The second version '%.com' allows access.  The first version access by 
IP '192.168.%' does not work.


This always has worked on 4.1.9 before.  There is nothing in the manual 
to elaborate on this problem.  As far as I can see, this should work 
perfectly.


Would any users be able to suggest a solution to this?

Regards,

Ben Clewett.







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



problem with grant

2005-09-15 Thread Anil
HI,

 

I have granted all privileges to a user to connect from any host like below

 

 

grant all on *.* to [EMAIL PROTECTED] identified by 'password';

 

flush privileges;

 

 

when I tried to connect to database using ip address like below on the
server where database was hosted

 

 

  mysql -uusername -p  -h127.0.0.1

 

 

I am unable to connect to the database. Please anybody explain what was the
problem

 

 

Thanks

Anil

DBA 



Re: problem with grant

2005-09-15 Thread Michael Stassen

Anil wrote:

HI,

I have granted all privileges to a user to connect from any host like below

grant all on *.* to [EMAIL PROTECTED] identified by 'password';
flush privileges;


Verify this worked with

  SHOW GRANTS FOR [EMAIL PROTECTED];

By the way, giving all privileges to a user who can connect from any machine 
in the world is probably not a good idea.



when I tried to connect to database using ip address like below on the
server where database was hosted

  mysql -uusername -p  -h127.0.0.1

I am unable to connect to the database. Please anybody explain what was the
problem


We cannot explain, because you have not told us what went wrong.  Please 
provide the exact text of the error message you received (copy/paste).



Thanks
Anil
DBA 


Michael

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



RE: problem with grant

2005-09-15 Thread Anil
Michael,

Just I want to know if we grant privileges with '%' wild card character will
it accept connection from 127.0.0.1. when I tried it is showing connection
request is coming from [EMAIL PROTECTED] and connection is not establishing . to
my knowledge '%' means it shouls accept connection from any host . please
clarify

Thanks
Anil
DBA

-Original Message-
From: Michael Stassen [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 15, 2005 11:22 PM
To: Anil
Cc: mysql@lists.mysql.com
Subject: Re: problem with grant

Anil wrote:
 HI,
 
 I have granted all privileges to a user to connect from any host like
below
 
 grant all on *.* to [EMAIL PROTECTED] identified by 'password';
 flush privileges;

Verify this worked with

   SHOW GRANTS FOR [EMAIL PROTECTED];

By the way, giving all privileges to a user who can connect from any machine

in the world is probably not a good idea.

 when I tried to connect to database using ip address like below on the
 server where database was hosted
 
   mysql -uusername -p  -h127.0.0.1
 
 I am unable to connect to the database. Please anybody explain what was
the
 problem

We cannot explain, because you have not told us what went wrong.  Please 
provide the exact text of the error message you received (copy/paste).

 Thanks
 Anil
 DBA 

Michael

-- 
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: problem with grant

2005-09-15 Thread Michael Stassen

Anil wrote:

Michael,

Just I want to know if we grant privileges with '%' wild card character will
it accept connection from 127.0.0.1. when I tried it is showing connection
request is coming from [EMAIL PROTECTED] and connection is not establishing . to
my knowledge '%' means it should accept connection from any host . please
clarify

Thanks
Anil
DBA


Anil,

To get meaningful help, you must provide meaningful information. 
Descriptions of your understanding of an error message are a poor substitute 
for the actual error message itself.  If you want a definitive answer, you 
need to supply the exact text of the error message you received (as I asked 
in my previous message).


That said, I'll go out on a limb and take a guess.  '%' does mean any host, 
but '%' is the least specific of any possible host sppecification.  You need 
to read the description of the authentication process in the manual 
http://dev.mysql.com/doc/mysql/en/connection-access.html.  Entries in the 
user table are sorted from most specific to least, with host taking 
precedence over user.  You are attempting to connect as [EMAIL PROTECTED], but 
127.0.0.1 is localhost.  Here are some possible users which would match, in 
descending order of specificity:


  [EMAIL PROTECTED]
  ''@localhost
  [EMAIL PROTECTED]
  [EMAIL PROTECTED]

My guess is you have a more specific entry than [EMAIL PROTECTED] that is a match.  We 
would know for sure if you included the error message.


Michael

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



Problem with GRANT...WITH GRANT OPTION

2004-07-21 Thread John R. Porter
I created a new user with a GRANT statement like:

GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO 'demouser'@'localhost'
IDENTIFIED BY 'testpwd' WITH GRANT OPTION

If I then log in as 'demouser' I can execute SELECT etc. statements on the
'test' database, but if I try to create another user with access to 'test'
using:

GRANT Select ON test.* TO 'newuser'@'localhost' IDENTIFIED BY 'newpwd'

I get:

Error: 1044 - Access denied for user: '[EMAIL PROTECTED]' to database
'mysql'

Does 'demouser' have to be explicitly GRANTed access to the MySQL grant
tables (user, db, host, tables_priv and columns_priv) before the user can be
GRANTed GRANT privileges to any database or table? If so, what are the
minimum privileges required?

John R. Porter
I.T. Services
University of Strathclyde
Faculty of Education
76 Southbrae Drive
Glasgow
G13 1PP
e-mail: [EMAIL PROTECTED]
Tel. 0141 950 3289




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



RE: Problem with GRANT...WITH GRANT OPTION

2004-07-21 Thread Martin Gainty
John-
GRANT privilege ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY 
'password'

in this case you need to
GRANT GRANT ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY 
'password'

Hope this helps,
Martin Gainty
SQL Consultant
USA 001-617-852-7822


From: John R. Porter [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Problem with GRANT...WITH GRANT OPTION
Date: Wed, 21 Jul 2004 14:54:10 +0100
MIME-Version: 1.0
Received: from lists.mysql.com ([213.136.52.31]) by mc2-f16.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.6824); Wed, 21 Jul 2004 06:56:43 -0700
Received: (qmail 30011 invoked by uid 109); 21 Jul 2004 13:54:17 -
Received: (qmail 29991 invoked from network); 21 Jul 2004 13:54:17 -
Received: pass (lists.mysql.com: local policy)
X-Message-Info: JGTYoYF78jHJ0WhRVXWZU4HTCZz6ybBU
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
List-ID: mysql.mysql.com
Precedence: bulk
List-Help: mailto:[EMAIL PROTECTED]
List-Unsubscribe: 
mailto:[EMAIL PROTECTED]
List-Post: mailto:[EMAIL PROTECTED]
List-Archive: http://lists.mysql.com/mysql/169422
Delivered-To: mailing list [EMAIL PROTECTED]
Message-ID: [EMAIL PROTECTED]
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0)
In-Reply-To: [EMAIL PROTECTED]
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Strath-Information: Contact [EMAIL PROTECTED] for more 
information
X-Strath-Scan: clean
X-Strath-UBECheck: X-Virus-Checked: Checked
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 21 Jul 2004 13:56:43.0725 (UTC) 
FILETIME=[8E23FFD0:01C46F2A]

I created a new user with a GRANT statement like:
GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO 'demouser'@'localhost'
IDENTIFIED BY 'testpwd' WITH GRANT OPTION
If I then log in as 'demouser' I can execute SELECT etc. statements on the
'test' database, but if I try to create another user with access to 'test'
using:
GRANT Select ON test.* TO 'newuser'@'localhost' IDENTIFIED BY 'newpwd'
I get:
Error: 1044 - Access denied for user: '[EMAIL PROTECTED]' to database
'mysql'
Does 'demouser' have to be explicitly GRANTed access to the MySQL grant
tables (user, db, host, tables_priv and columns_priv) before the user can 
be
GRANTed GRANT privileges to any database or table? If so, what are the
minimum privileges required?

John R. Porter
I.T. Services
University of Strathclyde
Faculty of Education
76 Southbrae Drive
Glasgow
G13 1PP
e-mail: [EMAIL PROTECTED]
Tel. 0141 950 3289

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/

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


RE: Problem with GRANT...WITH GRANT OPTION

2004-07-21 Thread aman
Also, if you have any doubts whether your changes took the right effect,
check the mysql database on your server and check out the tables that
store privileges assigned by your GRANT query.

Aman Raheja
http://www.techquotes.com


On Wed, 2004-07-21 at 11:11, Martin Gainty wrote:
 John-
 
 GRANT privilege ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY 
 'password'
 
 in this case you need to
 GRANT GRANT ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY 
 'password'
 
 Hope this helps,
 
 Martin Gainty
 SQL Consultant
 USA 001-617-852-7822
 
 
 
 
 
 From: John R. Porter [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Problem with GRANT...WITH GRANT OPTION
 Date: Wed, 21 Jul 2004 14:54:10 +0100
 MIME-Version: 1.0
 Received: from lists.mysql.com ([213.136.52.31]) by mc2-f16.hotmail.com 
 with Microsoft SMTPSVC(5.0.2195.6824); Wed, 21 Jul 2004 06:56:43 -0700
 Received: (qmail 30011 invoked by uid 109); 21 Jul 2004 13:54:17 -
 Received: (qmail 29991 invoked from network); 21 Jul 2004 13:54:17 -
 Received: pass (lists.mysql.com: local policy)
 X-Message-Info: JGTYoYF78jHJ0WhRVXWZU4HTCZz6ybBU
 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 List-ID: mysql.mysql.com
 Precedence: bulk
 List-Help: mailto:[EMAIL PROTECTED]
 List-Unsubscribe: 
 mailto:[EMAIL PROTECTED]
 List-Post: mailto:[EMAIL PROTECTED]
 List-Archive: http://lists.mysql.com/mysql/169422
 Delivered-To: mailing list [EMAIL PROTECTED]
 Message-ID: [EMAIL PROTECTED]
 X-MSMail-Priority: Normal
 X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0)
 In-Reply-To: [EMAIL PROTECTED]
 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
 X-Strath-Information: Contact [EMAIL PROTECTED] for more 
 information
 X-Strath-Scan: clean
 X-Strath-UBECheck: X-Virus-Checked: Checked
 Return-Path: [EMAIL PROTECTED]
 X-OriginalArrivalTime: 21 Jul 2004 13:56:43.0725 (UTC) 
 FILETIME=[8E23FFD0:01C46F2A]
 
 I created a new user with a GRANT statement like:
 
 GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO 'demouser'@'localhost'
 IDENTIFIED BY 'testpwd' WITH GRANT OPTION
 
 If I then log in as 'demouser' I can execute SELECT etc. statements on the
 'test' database, but if I try to create another user with access to 'test'
 using:
 
 GRANT Select ON test.* TO 'newuser'@'localhost' IDENTIFIED BY 'newpwd'
 
 I get:
 
 Error: 1044 - Access denied for user: '[EMAIL PROTECTED]' to database
 'mysql'
 
 Does 'demouser' have to be explicitly GRANTed access to the MySQL grant
 tables (user, db, host, tables_priv and columns_priv) before the user can 
 be
 GRANTed GRANT privileges to any database or table? If so, what are the
 minimum privileges required?
 
 John R. Porter
 I.T. Services
 University of Strathclyde
 Faculty of Education
 76 Southbrae Drive
 Glasgow
 G13 1PP
 e-mail: [EMAIL PROTECTED]
 Tel. 0141 950 3289
 
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 _
 Express yourself instantly with MSN Messenger! Download today - it's FREE! 
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
 


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



RE: Problem with GRANT...WITH GRANT OPTION

2004-07-21 Thread John R. Porter
'GRANT GRANT ON table_or_database_name ...' gave a syntax error.
'GRANT GRANT OPTION ON table_or_database_name ...' worked, but the result
was as before, i.e. the new user still couldn't grant access to the table or
database.

Inspection of the grant tables showed the following:

Table 'user'
Field 'User': Value 'demouser' Field 'Grant_Priv': Value 'N'

Table 'db'
Field 'Db': Value 'test' Field 'User': Value 'demouser' Field 'Grant_Priv':
Value 'Y'

Do I have to set 'Grant_Priv' to 'Y' for 'demouser' in the 'user' table?
Doesn't that give the user global GRANT privileges, rather than restricting
them to the single database 'test'? Or do I have to give the user Read/Write
privs. to the grant tables, and if so, what are the minimum privileges
required?

Regards,

John R. Porter
I.T. Services
University of Strathclyde
Faculty of Education
76 Southbrae Drive
Glasgow
G13 1PP
e-mail: [EMAIL PROTECTED]
Tel. 0141 950 3289


-Original Message-
From: aman [mailto:[EMAIL PROTECTED]
Sent: 21 July 2004 17:17
To: [EMAIL PROTECTED]
Subject: RE: Problem with GRANT...WITH GRANT OPTION


Also, if you have any doubts whether your changes took the right effect,
check the mysql database on your server and check out the tables that
store privileges assigned by your GRANT query.

Aman Raheja
http://www.techquotes.com


On Wed, 2004-07-21 at 11:11, Martin Gainty wrote:
 John-

 GRANT privilege ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY
 'password'

 in this case you need to
 GRANT GRANT ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY
 'password'

 Hope this helps,

 Martin Gainty
 SQL Consultant
 USA 001-617-852-7822





 From: John R. Porter [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: Problem with GRANT...WITH GRANT OPTION
 Date: Wed, 21 Jul 2004 14:54:10 +0100
 MIME-Version: 1.0
 Received: from lists.mysql.com ([213.136.52.31]) by mc2-f16.hotmail.com
 with Microsoft SMTPSVC(5.0.2195.6824); Wed, 21 Jul 2004 06:56:43 -0700
 Received: (qmail 30011 invoked by uid 109); 21 Jul 2004 13:54:17 -
 Received: (qmail 29991 invoked from network); 21 Jul 2004 13:54:17 -
 Received: pass (lists.mysql.com: local policy)
 X-Message-Info: JGTYoYF78jHJ0WhRVXWZU4HTCZz6ybBU
 Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
 List-ID: mysql.mysql.com
 Precedence: bulk
 List-Help: mailto:[EMAIL PROTECTED]
 List-Unsubscribe:
 mailto:[EMAIL PROTECTED]
 List-Post: mailto:[EMAIL PROTECTED]
 List-Archive: http://lists.mysql.com/mysql/169422
 Delivered-To: mailing list [EMAIL PROTECTED]
 Message-ID: [EMAIL PROTECTED]
 X-MSMail-Priority: Normal
 X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0)
 In-Reply-To: [EMAIL PROTECTED]
 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
 X-Strath-Information: Contact [EMAIL PROTECTED] for more
 information
 X-Strath-Scan: clean
 X-Strath-UBECheck: X-Virus-Checked: Checked
 Return-Path: [EMAIL PROTECTED]
 X-OriginalArrivalTime: 21 Jul 2004 13:56:43.0725 (UTC)
 FILETIME=[8E23FFD0:01C46F2A]
 
 I created a new user with a GRANT statement like:
 
 GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO 'demouser'@'localhost'
 IDENTIFIED BY 'testpwd' WITH GRANT OPTION
 
 If I then log in as 'demouser' I can execute SELECT etc. statements on
the
 'test' database, but if I try to create another user with access to
'test'
 using:
 
 GRANT Select ON test.* TO 'newuser'@'localhost' IDENTIFIED BY 'newpwd'
 
 I get:
 
 Error: 1044 - Access denied for user: '[EMAIL PROTECTED]' to database
 'mysql'
 
 Does 'demouser' have to be explicitly GRANTed access to the MySQL grant
 tables (user, db, host, tables_priv and columns_priv) before the user can

 be
 GRANTed GRANT privileges to any database or table? If so, what are the
 minimum privileges required?
 
 John R. Porter
 I.T. Services
 University of Strathclyde
 Faculty of Education
 76 Southbrae Drive
 Glasgow
 G13 1PP
 e-mail: [EMAIL PROTECTED]
 Tel. 0141 950 3289
 
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 

 _
 Express yourself instantly with MSN Messenger! Download today - it's FREE!
 http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



--
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: Problem with GRANT...WITH GRANT OPTION

2004-07-21 Thread Brian Duke
I'm new so this may be whacked but here goes:

Isn't the grant statement tailed with the grant option?

i.e.
GRANT ALL ON table_or_database_name to 'somebody'@'localhost' WITH GRANT
OPTION;

Somebody verify that please.

 -Original Message-
 From: John R. Porter [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 21, 2004 11:09 AM
 To: [EMAIL PROTECTED]
 Subject: RE: Problem with GRANT...WITH GRANT OPTION
 
 'GRANT GRANT ON table_or_database_name ...' gave a syntax error.
 'GRANT GRANT OPTION ON table_or_database_name ...' worked, but the result
 was as before, i.e. the new user still couldn't grant access to the table
 or
 database.
 
 Inspection of the grant tables showed the following:
 
 Table 'user'
 Field 'User': Value 'demouser' Field 'Grant_Priv': Value 'N'
 
 Table 'db'
 Field 'Db': Value 'test' Field 'User': Value 'demouser' Field
 'Grant_Priv':
 Value 'Y'
 
 Do I have to set 'Grant_Priv' to 'Y' for 'demouser' in the 'user' table?
 Doesn't that give the user global GRANT privileges, rather than
 restricting
 them to the single database 'test'? Or do I have to give the user
 Read/Write
 privs. to the grant tables, and if so, what are the minimum privileges
 required?
 
 Regards,
 
 John R. Porter
 I.T. Services
 University of Strathclyde
 Faculty of Education
 76 Southbrae Drive
 Glasgow
 G13 1PP
 e-mail: [EMAIL PROTECTED]
 Tel. 0141 950 3289
 
 
 -Original Message-
 From: aman [mailto:[EMAIL PROTECTED]
 Sent: 21 July 2004 17:17
 To: [EMAIL PROTECTED]
 Subject: RE: Problem with GRANT...WITH GRANT OPTION
 
 
 Also, if you have any doubts whether your changes took the right effect,
 check the mysql database on your server and check out the tables that
 store privileges assigned by your GRANT query.
 
 Aman Raheja
 http://www.techquotes.com
 
 
 On Wed, 2004-07-21 at 11:11, Martin Gainty wrote:
  John-
 
  GRANT privilege ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY
  'password'
 
  in this case you need to
  GRANT GRANT ON table_or_database_name TO [EMAIL PROTECTED] IDENTIFIED BY
  'password'
 
  Hope this helps,
 
  Martin Gainty
  SQL Consultant
  USA 001-617-852-7822
 
 
 
 
 
  From: John R. Porter [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Subject: Problem with GRANT...WITH GRANT OPTION
  Date: Wed, 21 Jul 2004 14:54:10 +0100
  MIME-Version: 1.0
  Received: from lists.mysql.com ([213.136.52.31]) by mc2-f16.hotmail.com
  with Microsoft SMTPSVC(5.0.2195.6824); Wed, 21 Jul 2004 06:56:43 -0700
  Received: (qmail 30011 invoked by uid 109); 21 Jul 2004 13:54:17 -
  Received: (qmail 29991 invoked from network); 21 Jul 2004 13:54:17 -
 
  Received: pass (lists.mysql.com: local policy)
  X-Message-Info: JGTYoYF78jHJ0WhRVXWZU4HTCZz6ybBU
  Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
  List-ID: mysql.mysql.com
  Precedence: bulk
  List-Help: mailto:[EMAIL PROTECTED]
  List-Unsubscribe:
  mailto:[EMAIL PROTECTED]
  List-Post: mailto:[EMAIL PROTECTED]
  List-Archive: http://lists.mysql.com/mysql/169422
  Delivered-To: mailing list [EMAIL PROTECTED]
  Message-ID: [EMAIL PROTECTED]
  X-MSMail-Priority: Normal
  X-Mailer: Microsoft Outlook CWS, Build 9.0.6604 (9.0.2911.0)
  In-Reply-To: [EMAIL PROTECTED]
  X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
  X-Strath-Information: Contact [EMAIL PROTECTED] for more
  information
  X-Strath-Scan: clean
  X-Strath-UBECheck: X-Virus-Checked: Checked
  Return-Path: [EMAIL PROTECTED]
  X-OriginalArrivalTime: 21 Jul 2004 13:56:43.0725 (UTC)
  FILETIME=[8E23FFD0:01C46F2A]
  
  I created a new user with a GRANT statement like:
  
  GRANT SELECT, INSERT, UPDATE, DELETE ON test.* TO
 'demouser'@'localhost'
  IDENTIFIED BY 'testpwd' WITH GRANT OPTION
  
  If I then log in as 'demouser' I can execute SELECT etc. statements on
 the
  'test' database, but if I try to create another user with access to
 'test'
  using:
  
  GRANT Select ON test.* TO 'newuser'@'localhost' IDENTIFIED BY 'newpwd'
  
  I get:
  
  Error: 1044 - Access denied for user: '[EMAIL PROTECTED]' to database
  'mysql'
  
  Does 'demouser' have to be explicitly GRANTed access to the MySQL grant
  tables (user, db, host, tables_priv and columns_priv) before the user
 can
 
  be
  GRANTed GRANT privileges to any database or table? If so, what are the
  minimum privileges required?
  
  John R. Porter
  I.T. Services
  University of Strathclyde
  Faculty of Education
  76 Southbrae Drive
  Glasgow
  G13 1PP
  e-mail: [EMAIL PROTECTED]
  Tel. 0141 950 3289
  
  
  
  
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]
  
 
  _
  Express yourself instantly with MSN Messenger! Download today - it's
 FREE!
  http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
 
 
 
 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL

DB init script problem with Grant statements

2004-03-12 Thread Kevin Hanser
Hello, 
I am having a weird problem with some sql that is supposed to set up a
DB for me.  When I run the .sql file manually from the command line like
this:
 
mysql --user=root  DB_init.sql
 
It works fine.  But when I do the same command from a shell script that
is run during the kickstart setup of the server, it seems to be stopping
processing of the file after the first grant statement.  I changed the
command to:

mysql --user=root -v -v -v  DB_init.sql
 
to try to get some indication of what mysql is doing and why it's
stopping, but that didn't tell me much.  It just showed me where it was
stopping (after the first grant statement), but didn't seem to provide
any answer as to why.
 
Here's the DB_init.sql script that I'm trying to run (this is run during
kickstart setup to set up a DB and some tables on the server):
 
DB_init.sql begin
# create users
 
CONNECT mysql;
 
# perl user
REPLACE INTO user (host, user, password)
VALUES (
'localhost',
'vsperl',
'encrpyted passwd'
);
 
REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv,
 delete_priv, create_priv, drop_priv)
VALUES (
'localhost',
'RelayStats',
'vsperl',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y'
);
 
# php user
REPLACE INTO user (host, user, password)
VALUES (
'localhost',
'vsphp',
'encrpyted passwd'
);
 
REPLACE INTO db (host, db, user, select_priv, insert_priv, update_priv,
 delete_priv, create_priv, drop_priv)
VALUES (
'localhost',
'RelayStats',
'vsphp',
'Y', 'Y', 'Y', 'Y',
'Y', 'Y'
);
 

# database creation
CREATE DATABASE RelayStats;
 
CONNECT RelayStats;
 
#
# Table structure for table `host`
#
 
CREATE TABLE `host` (
  `id` float NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `ip` varchar(255) default NULL,
  PRIMARY KEY  (`id`),
  KEY `Name` (`name`)
);
 

#
# Table structure for table `stats`
#
 
CREATE TABLE `stats` (
  `id` float NOT NULL auto_increment,
  `host_id` float NOT NULL default '0',
  `virus_id` float NOT NULL default '0',
  `date` date NOT NULL default '-00-00',
  `time` time NOT NULL default '00:00:00',
  PRIMARY KEY  (`id`),
  KEY `Host_Id` (`host_id`,`virus_id`),
  KEY `date` (`date`),
  KEY `Timestamp` (`time`)
);
 

#
# Table structure for table `virus`
#
 
CREATE TABLE `virus` (
  `id` float NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `date_added` datetime NOT NULL default '-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  KEY `Name` (`name`),
  KEY `date_added` (`date_added`)
);
 
# grant permissions on all the tables
#GRANT SELECT, UPDATE, INSERT, DELETE ON table to user;
GRANT SELECT, UPDATE, INSERT, DELETE ON host to [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ;
GRANT SELECT, UPDATE, INSERT, DELETE ON host to [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ;
GRANT SELECT, UPDATE, INSERT, DELETE ON stats to [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ;
GRANT SELECT, UPDATE, INSERT, DELETE ON stats to [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ;
GRANT SELECT, UPDATE, INSERT, DELETE ON virus to [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ;
GRANT SELECT, UPDATE, INSERT, DELETE ON virus to [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] ;
 
FLUSH PRIVELEGES;
 
# done.
 
DB_init.sql end
 
And the output from mysql ends like this:
 
begin mysql output
--
CREATE TABLE `virus` (
  `id` float NOT NULL auto_increment,
  `name` varchar(255) NOT NULL default '',
  `date_added` datetime NOT NULL default '-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  KEY `Name` (`name`),
  KEY `date_added` (`date_added`)
)
--
 
Query OK, 0 rows affected (0.00 sec)
 
--
GRANT SELECT, UPDATE, INSERT, DELETE ON host to [EMAIL PROTECTED]
--
 
Bye

end mysql output
 
 
Does anybody have any idea why it's just stopping after that first Grant
statement?  And why it works when I run it manaully, but for some
unknown reason doesn't work during the kickstart install?
 
thx!
 
k
 


Sudden problem with Grant Tables on Windows NT

2002-09-23 Thread José Fernández

I have installed MySQL on a PC with Windows NT. As the
MySQL dir is not on c:, I have copied the 'my.cnf'
file to c:, and I have edited it to MySQL work with
InnoDB tables. All has been working fine, but
suddendly, without change any, when I have tried to
start up MySQL with the command mysqld-max
--standalone (as usually) I have got the message:
mysqld-max: Table 'mysql.host' doesn't exist
in the 'mysql.err' file.

I have found that I start up MySQL with: mysqld-max
-Sg --standalone, then it works.

How can I solve the problem to be able to start up
mysqld-max with the full functionality (without use
-Sg option)?

I was thinking that the origin of this problem was
that I have not privilege tables on my PC. But I think
also that when I install MySQL on Windows NT, the
privilege table are being creatend during the
installation process (MySQL was woriking fine at the
beginning).
Please, can you help me?

Thanks in advance

José Fernández


___
Yahoo! Messenger
Nueva versión: Webcam, voz, y mucho más ¡Gratis! 
Descárgalo ya desde http://messenger.yahoo.es

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

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

2002-01-22 Thread Andrew Dumaresq

Hello,

I have what I consider to be a very strange problem, I log in into mysql
on my localhost I can select from and manually modify tables using
insert select and delete, but I cannot do Grant.  I typed the following
command:
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'my password
in here';
to this command the system responds:

ERROR 1045: Access denied for user: 'root@localhost' (Using password:
YES)

I realize this command is redundant, but it proves my point.  I am using
a RedHat 7.2 server with RedHat kernel version 2.4.7

Any help would be greatly appreciated.

Thanks


Andrew Dumaresq
Technician / Administrator
Mathematics  Computing Science
Saint Mary's University
Phone: (902)420-5893
Fax: (902)420-5035



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

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

2002-01-22 Thread Vasoczki Ferenc

It's correct, just insert at the end of line:
WITH GRANT OPTION;

rtfm

Vaso

-Original Message-
From: Andrew Dumaresq [mailto:[EMAIL PROTECTED]]
Sent: 2002. janur 22. 19:31
To: [EMAIL PROTECTED]
Subject: Problem with Grant command


Hello,

I have what I consider to be a very strange problem, I log in into mysql
on my localhost I can select from and manually modify tables using
insert select and delete, but I cannot do Grant.  I typed the following
command:
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'my password
in here';
to this command the system responds:

ERROR 1045: Access denied for user: 'root@localhost' (Using password:
YES)

I realize this command is redundant, but it proves my point.  I am using
a RedHat 7.2 server with RedHat kernel version 2.4.7

Any help would be greatly appreciated.

Thanks


Andrew Dumaresq
Technician / Administrator
Mathematics  Computing Science
Saint Mary's University
Phone: (902)420-5893
Fax: (902)420-5035



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

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

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

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




RE: Problem with Grant command

2002-01-22 Thread Andrew Dumaresq

I don't understand what you mean by this.  Where do I add that command?

Also I am logged into database as root (ie I used mysql mysql -u root -p
to connect).

Btw I did rtfm :)


Thanks
Andrew

 
Andrew Dumaresq
Technician / Administrator
Mathematics  Computing Science
Saint Mary's University
Phone: (902)420-5893
Fax: (902)420-5035
 

-Original Message-
From: Vasoczki Ferenc [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 22, 2002 2:35 PM
To: 'Andrew Dumaresq'; [EMAIL PROTECTED]
Subject: RE: Problem with Grant command

It's correct, just insert at the end of line:
WITH GRANT OPTION;

rtfm

Vaso

-Original Message-
From: Andrew Dumaresq [mailto:[EMAIL PROTECTED]]
Sent: 2002. január 22. 19:31
To: [EMAIL PROTECTED]
Subject: Problem with Grant command


Hello,

I have what I consider to be a very strange problem, I log in into mysql
on my localhost I can select from and manually modify tables using
insert select and delete, but I cannot do Grant.  I typed the following
command:
GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'my password
in here';
to this command the system responds:

ERROR 1045: Access denied for user: 'root@localhost' (Using password:
YES)

I realize this command is redundant, but it proves my point.  I am using
a RedHat 7.2 server with RedHat kernel version 2.4.7

Any help would be greatly appreciated.

Thanks


Andrew Dumaresq
Technician / Administrator
Mathematics  Computing Science
Saint Mary's University
Phone: (902)420-5893
Fax: (902)420-5035



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

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 grant for another user with password

2001-09-06 Thread Rainer Krienke

Hello,

I have a mysql (3.23) server running on a linux system. The server has 
several databases belonging to the (unix) user who created his database. So 
each Student may create his own database and usually only he himself may 
access/modify the data in this database. This creation of a new database is 
done by a web interface executed as the mysql-root user.

The problem now is, that sometimes a database should not only be accessible 
by the owner himself but also by another user protected by a password. So the 
owner x of a database wants to do this:

$ mysql -h mysqlserver -u x -p xyz
mysql grant select on dbOfUserX.* to otherUser identified by 'otherPassword';
ERROR 1044: Access denied for user: '[EMAIL PROTECTED]' to database 
'mysql'

The user otherUser does not already exist in the mysql users table. The 
user x has the grant right and just saying:

mysql grant select on dbOfUserX.* to otherUser; 

works just fine. But user x is unable to allow someone else to access his 
database with password protection.

So the question is, how can the privilege system be set up, so that a user x 
can allow another user y to access his database by password (different from 
the password of the user x of course). Another question is, how can I (the 
db-admin) allow a user to access the mysql-DB (to allow the password change) 
without allowing him to change passwords of other users that already exist in 
the mysql user table (having their own databases)? Where is the information 
stored, that allows a user (execpt for root) to access the mysql database.

Thanks for any help
Rainer Krienke

-- 
-
Rainer Krienke [EMAIL PROTECTED]
Universitaet Koblenz,  http://www.uni-koblenz.de/~krienke
Rechenzentrum, Voice: +49 261 287 - 1312
Rheinau 1, 56075 Koblenz, Germany  Fax:   +49 261 287 - 1001312
-

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

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 Grant

2001-05-31 Thread Damnish

Hi
I am using MySql on linux.
I can start mysqld by safe_mysqld --user=mysql --skip-grant-tables 
But when i try to start it withour --skip-grant-tables, it said Access 
Denied  @localhost. I have updated the mysql.user table and mysql.host 
table, still i can't connect it .
Any help in this matter will be appriciated.
Thanks in advance.
Damnish 


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

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 Grant

2001-05-31 Thread oltra jean-michel


Have you tried 'flush privileges' after having set root password?

jean-michel

On Thu, 31 May 2001, Damnish wrote:

 I am using MySql on linux.
 I can start mysqld by safe_mysqld --user=mysql --skip-grant-tables 
 But when i try to start it withour --skip-grant-tables, it said Access
 Denied  @localhost. I have updated the mysql.user table and mysql.host
 table, still i can't connect it .
 Any help in this matter will be appriciated.
 Thanks in advance.
 Damnish


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

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 Grant

2001-05-31 Thread Damnish

Yes i did that , after that i restart my server, But still it didn't load
the new settings.
Kindly help.
Thanks
Damnish
- Original Message -
From: oltra jean-michel [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, June 01, 2001 2:52 AM
Subject: Re: problem with Grant



 Have you tried 'flush privileges' after having set root password?

 jean-michel

 On Thu, 31 May 2001, Damnish wrote:

  I am using MySql on linux.
  I can start mysqld by safe_mysqld --user=mysql --skip-grant-tables

  But when i try to start it withour --skip-grant-tables, it said
Access
  Denied  @localhost. I have updated the mysql.user table and
mysql.host
  table, still i can't connect it .
  Any help in this matter will be appriciated.
  Thanks in advance.
  Damnish


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

 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