Douglas Brantz wrote:
> Hello,
>
> I have purchase the Msql & MySQL book and it is great. I am currently
> on the chapter about The Mysql Mysql database "permissions" and adding
> users etc.
>
> I have created a user and a database and this first user has a password
> to access the database. I even have a form on the web where this user
> fills in the username and password so that the database can be accessed
> and the info from the form is inserted.
> This works great and I was wondering if this is a good way to protect
> the database by having the user supply username and password so in the
> form I have $USERNAME and $PASSWORD so in the CGI script I use
> my $dbh=mysql->connect("host","database","$username","$password");
>
> My thought was to have multiple users use the same form and enter their
> username and passwords.
>
> My problem is that everytime I create a new user and allow that user
> access to that database I can't use the password because it gives me an
> error. Even at the command line I have to access the database with
> username only and if I try to use the password option I get an error or
> acces denied. What is happening? Then I check everything out with
> mysqlaccess -d "database" -u "user"
> It tells me that anyone can access the database with the new user
> It also says that the username is not relevent and anyone can use
> anonymous
>
> How do I create new users that can access a database with a password?
> Because this is happening even though I am putting a password in the
> password field of the new user.
>
> Should I be giving grant permissions to the new users? How do you use
> the grant statement? Is it from the mysqladmin ? I tried grant
> databasename.* user?
>
> Thanks in advance.
>
> Douglas
>
> --
>
> Douglas Brantz
> Computer Consultant
> Fine & Applied Arts
> Appalachian State University
> Boone, NC 28608
>
> 828-262-6312 FAX
> 828-262-6549 OFFICE
> brantzdr@stripped
--
Douglas Brantz
Computer Consultant
Fine & Applied Arts
Appalachian State University
Boone, NC 28608
828-262-6312 FAX
828-262-6549 OFFICE
brantzdr@stripped
| Thread |
|---|
| • [Fwd: User problems] | Douglas Brantz | 14 Sep |