Re: Access denied for user: username@%

From: red (groups2_at_reenie.org)
Date: 10/02/04


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



Relevant Pages

  • Re: select ... into outfile: Berechtigung?!
    ... Danke, hab' grad' auf die harte Tour rausgefunden, dass in MySql ... GRANT file ON *.* TO web@localhost; ... Prev by Date: ... Next by Date: ...
    (de.comp.datenbanken.mysql)
  • Re: mysql ??
    ... >>Mike I seem to be making some head way, I have the server running a sock ... > Definitely looks like a grant table problem. ... this is the weakest point in the mysql install procedure - you ... > the whole permission system while I muck with getting mysqld set up ...
    (alt.os.linux.suse)
  • Re: mysql ??
    ... >> essentially disables all the user based security. ... >Can you give me some help on setting access, and how do I config the grant ... "Grant tables" = there's a mysql database named 'mysql' that contains ... including access - to mysqld databases. ...
    (alt.os.linux.suse)
  • Re: mysql ??
    ... >> Definitely looks like a grant table problem. ... >> the whole permission system while I muck with getting mysqld set up ... The mysql module in webin should allow you to set up ... site-wide spam filters at catherders.com. ...
    (alt.os.linux.suse)
  • Re: MySQL wont start....
    ... After setup there was the debian-maintinence account for mysql that I ... There was also a root account with no password that I ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ... Trouble? ...
    (Debian-User)