RE: Password problem

2003-01-16 Thread John Arnold
When connecting from a command line, mysql uses 3 of the columns in the user
table to decide whether or not to grant access.  These are host, user, and
password.  Note that in your results below, there is no
localhost-newsletter-testPass combination.  What the table shows is that
clients from any host other than localhost can log in to a mysql client
using the newsletter and testPass combination.

If you want to login using a client on the same machine that you're running
mysql, you need to add another entry to the user table, i.e.,

GRANT ALL PRIVILIGES ON newsletter.* TO newsletter@localhost IDENTIFIED BY
'testPass'

It took me a while to figure that one out, but it's saved me a lot of
frustration knowing it now.
I guess I don't understand why localhost isn't included in the % wildcard
for the host column in this table.  Anybody?

John Arnold
Director, IT Web Strategies
2k3 Technologies
915.439.1660



-Original Message-
From: Neil Aggarwal [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 15, 2003 11:00 AM
To: Mysql list
Subject: Password problem


Hello:

As the root user, I created a new database and user account:
CREATE DATABASE newsletter;
GRANT ALL PRIVILEGES ON newsletter.* TO newsletter IDENTIFIED BY 'testPass';
FLUSH PRIVILEGES;

I then tried to access the databse via the command-line client:
/usr/local/mysql/bin/mysql -u newsletter -ptestPass newsletter

And I get this error:
ERROR 1045: Access denied for user: 'newsletter@localhost' (Using password:
YES)

I checked that mysql has it set-up correctly in the user and db tables
by logging in as the root account.

select * from user give me this line:
| %  | newsletter | 61fa73f50740c213 | N   |
N   | N   | N   | N   | N | N
| N | N| N | N  | N   |
N  | N

select * from db gives me this line:
| %  | newsletter | newsletter | Y   | Y
| Y   | Y   | Y   | Y | N  | Y
| Y  | Y  |

Any ideas?

Thanks,
Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases


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

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


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

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




RE: Re: Password problem

2003-01-16 Thread John Arnold
Nasser wrote:
it looks as though you have created the newsletter user with plain text
password.  mysql will 
compare the user password against the encrypted password and will fail.

Look at the password entry in the results below starting with 61fa

If the password had been stored as plain text, it would show as 'testPass'.
The only way I've been able to get an unencrypted password into this table
(quite unintentionally, I assure you) is to update the table directly as in
update user set password='testPass' where user = 'newsletter';

Of course, this was back when I was scratching my head over the same problem
below...

John Arnold
Director, IT Web Strategies
2k3 Technologies
915.439.1660




=

Hello:

As the root user, I created a new database and user account:
CREATE DATABASE newsletter;
GRANT ALL PRIVILEGES ON newsletter.* TO newsletter IDENTIFIED BY
'testPass';
FLUSH PRIVILEGES;

I then tried to access the databse via the command-line client:
/usr/local/mysql/bin/mysql -u newsletter -ptestPass newsletter

And I get this error:
ERROR 1045: Access denied for user: 'newsletter@localhost' (Using password:
YES)

I checked that mysql has it set-up correctly in the user and db tables
by logging in as the root account.

select * from user give me this line:
| %  | newsletter | 61fa73f50740c213 | N
|
N   | N   | N   | N   | N | N
| N | N| N | N  | N   |
N  | N

select * from db gives me this line:
| %  | newsletter | newsletter | Y   |
Y
| Y   | Y   | Y   | Y | N  | Y
| Y  | Y  |

Any ideas?

Yes.
See Chapter 4.3.5 of the mysql manual.
Note that we must issue GRANT statements for both monty@localhost and
monty@%.

hth,
Doug


Thanks,
   Neil.

--
Neil Aggarwal
JAMM Consulting, Inc.(972) 612-6056, http://www.JAMMConsulting.com
Custom Internet DevelopmentWebsites, Ecommerce, Java, databases



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

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








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

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


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

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




RE: running as NT service problem

2003-01-08 Thread John Arnold
I had this same problem.  Based on a similar thread, I went into the
properties for the service, changed it run under a user account with admin
privileges, applied the changes, then changed it back to run under the local
account and applied the changes.  No more problem.  Go figure.

-Original Message-
From: Victoria Reznichenko [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 08, 2003 10:55 AM
To: [EMAIL PROTECTED]
Subject: re: running as NT service problem


On Tuesday 07 January 2003 11:49, Leonid Prokopets wrote:

 I'm having a problem running MySQL as NT service on Win2000 plattform.  It
 works allright in manual mode (by 'mysqld' command), but refuses to run as
 service.  I installed the service by 'mysqld-max-nt --install' command.
 The system reported NT service successfully installed.  MySQL appeared
in
 service list.  But then I tried to start it it returned Error 1067.  The
 MySQL service can not be started.

 I should add that I dont have such problem on WinNT server plattform -
 everything runs smoothly.

Run the following from the DOS prompt:

mysqld-max-nt.exe --standalone --console

You can see errors in the output.



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





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

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


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

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