Re: Access denied for user: username@%
From: red (groups2_at_reenie.org)
Date: 10/02/04
- Next message: JGH: "Re: php global includes?"
- Previous message: Andy Hassall: "Re: Looking for PHP programmers plus co-founder opportunity"
- In reply to: Deon H: "Re: Access denied for user: username@%"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 01 Oct 2004 22:26:57 GMT
Deon H wrote:
> Hi there, Red.
> Will you please be so kind as to help me out with your solution - I have
> the same problem and I am totally new to this.
>
> Regards,
> Deon H
The problem confused me because my username and password successfully
connected to the database but didn't work when I tried to create a
table. But this does make sense because to create a table you not only
have to have a username and password to connect to the database, you
must have the right to create a table within that database.
I'm using windowsxp, this is how I grant rights:
1)Go to the command prompt. There is a link in the start menu.
2)Change the directory to the directory of mysql. The letters cd are
used to change the directory. On my computer, I write:
cd c:\\mysql\bin
The prompt changes to c:\\mysql\bin>
3)logon to the root account of mysql . If your mysql is set up properly,
simply typing
mysql
without a username and password should give you an access denied
message. If it lets you in without giving you an access denied message,
then you still have a default user which should be deleted.
To access the root account type mysql -u root -p
It will then ask you for your root password and let you in
4) To grant rights, use the grant command. If I want to grant
"myusername" with a password of "mypassword" the rights that most users
are allowed to have to "mydatabase" I would use:
grant select, insert, update, delete, index, alter, create, drop on
mydatabase.* to myusername identified by 'mypassword';
Notice the single quotes around the password. Those are the only quotes
in the whole command.
That fixed the problem for me
- Next message: JGH: "Re: php global includes?"
- Previous message: Andy Hassall: "Re: Looking for PHP programmers plus co-founder opportunity"
- In reply to: Deon H: "Re: Access denied for user: username@%"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|