List:MySQL on Win32« Previous MessageNext Message »
From:Armando Date:August 4 2004 9:24pm
Subject:RE: User privileges on MySQL
View as plain text  
As long as there are no null passwords, yes it will always prompt for a
password. Suggested not to allow any user other than root have full
privileges. Use the GRANT statement to give them access to only what
they need to have access to. Cheers.

Armando

-----Original Message-----
From: S.D.Price [mailto:S.D.Price@stripped] 
Sent: August 4, 2004 9:12 AM
To: Jonathan G. Lampe; win32
Subject: RE: User privileges on MySQL


Hi Johnathan, thanks for the advice.

I just want to run MySQL locally, but require a user to connect to a db
with username and password - as you would on a server.

I will delete the root "%" (all hosts) entry and the two ANY accounts.
This should force someone to use a password and username to make a db
connection, shouldn't it?

Cheers
Steve


-----Original Message-----
From: Jonathan G. Lampe [mailto:jonathan.lampe@stripped] 
Sent: 04 August 2004 15:00
To: S.D.Price; win32
Subject: Re: User privileges on MySQL


At 03:35 AM 8/4/2004, S.D.Price wrote:

>1. I know I should set a password for the root account but I seem to
>have two root accounts. One with access to all hosts % and one with 
>access to localhost. Which one should I set a password on,

Both.  And if your machine is on a network, you should have done it 
yesterday.

>and what is
>the difference between them?

Many people use MySQL from their local machine only, so their first act
is 
often to simply delete the "%" (all hosts) entry.

>2. Is the best way to set a password on the root to cd:\mysql\bin and
>then go mysqladmin -u root password 'thepassword'

I believe that will set the LOCAL password.
I believe you need to do:
mysqladmin --host=(myIP) -u root password 'thepassword'
...to set the ALL HOSTS password.

>3. When I created an account with all privileges on all databases I
>could not connect to a database with a username or password. I had to 
>use blank strings instead. Is this because I had 2 user accounts called

>ANY (again one with access to all hosts % and one with access to
>localhost).

Probably - use the "mysql" console utilty and play around with different

values (i.e. "localhost", your IP address, your hostname) in the
"--host=" 
argument to see how MySQL behaves in the various situations.

>4. Please tell me how I should ideally set up my user permissions

It depends on what you want to do.  Is this an ISP MySQL where lots of 
people need access, a distributed application database server where only
a 
few hosts need access or a local application?  If you need remote
access, 
can you limit your users to only a few classes of permissions (e.g.
Read)?

-jgl 


-- 
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe:    http://lists.mysql.com/win32?unsub=1

Thread
User privileges on MySQLS.D.Price4 Aug
  • Re: User privileges on MySQLJonathan G. Lampe4 Aug
RE: User privileges on MySQLS.D.Price4 Aug
  • RE: User privileges on MySQLArmando4 Aug