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.
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?
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
>and what is
>the difference between them?
Many people use MySQL from their local machine only, so their first act
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
Probably - use the "mysql" console utilty and play around with different
values (i.e. "localhost", your IP address, your hostname) in the
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
few hosts need access or a local application? If you need remote
can you limit your users to only a few classes of permissions (e.g.
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=1