I try to grant permission to all users. When I do the next:
GRANT ALL PRIVILEGES ON *.* TO 'root'#'my' IDENTIFIED BY 'er';
and than try to entet mysql from this ip and with the pasword "er", I see the next massage:
Access denied for user 'root'#'localhost' (using password: YES).
What I do wrong? maybe I need to grant permission to all user in the organization?
Your granting to root#my you probably should be granting to root#localhost
Related
I'm connected to my cloud. I can login with Mariadb root with this command:
mysql -u root -p
Then I created a new user bill with host %
CREATE USER 'bill'#'%' IDENTIFIED BY 'passpass';
Granted all the privileges to user bill:
grant all privileges on *.* to 'bill'#'%' with grant option;
when i entered it I got this error:
ERROR 1045 (28000): Access denied for user 'root'#'%' (using password: YES)
Please give me answer as soon as possible.
Thanks in advance.
I am trying to access database on remote server with normal user (testuser) with no GRANT privileges. When I try to access the database using the above user I get the following error:
Access denied for user 'testuser'#'%' to database 'test_db'
I do not have any database interface to directly grant privileges to this user. I have SSH root access to the server. How do I grant privileges to this user?
Login to mysql command line interface with your root user. Run the below commands to give access
GRANT ALL PRIVILEGES ON *.* TO 'testuser'#'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
FLUSH PRIVILEGES;
I get this error when I try to access my database via the user 'spot'#'localhost' identified by its password.
PermissionsError: (1045, "Access denied for user 'spot'#'localhost' (using password: YES)", None)
I create this user using these two lines:
create user 'spot'#'localhost' identified by 'fakepasswd';
grant all privileges on *.* to 'spot'#'localhost';
When I run this code locally, it works fine. When I run this code on a different machine, I get the aforementioned error.
Yet when I run show grants for 'spot'#'localhost' on both machines, they both give me the same output:
GRANT ALL PRIVILEGES ON *.* TO 'spot'#'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4FRO4CA44C47D54D78478C7E2BD7B7'
How can I debug this access problem?
Yo need to grant privileges not only from localhost, run this querys:
create user 'spot'#'%' identified by 'fakepasswd';
grant all privileges on *.* to 'spot'#'%';
flush privileges;
This allow the user to connect from ANY ip, you can replace the % with the ip of your server.
I have installed wampserver. i revoke the the delete privilege from root user. now i want to grant same privilege back to root user but it gives the error:
i tried the following command
GRANT ALL PRIVILEGES ON *.* TO 'root'#'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
but the command gives the
#1045 - Access denied for user 'root'#'localhost' (using password: YES)
there are two root users
root localhost
root 127.0.0.1
root localhost do not have DELETE privilege. root 127.0.0.1 have all privileges. i tried with http://127.0.0.1/phpmyadmin but the same error occurs. is there a way to reset root user privileges.
I have had issues with GRANT ... TO 'user'#'%' ... before. Try to additionally issue the following GRANT statement:
GRANT ALL PRIVILEGES ON *.* TO 'root'#'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;
For me, this did the trick. Somehow mysql seems picky when it comes to localhost
In mysql i executed following command
REVOKE ALL PRIVILEGES
after that i try to give GRANT then it shows Access denied
it would seem that you revoked the GRANT privileges of your own user, you should use the root user to grant those privileges back.
for a review of your status regarding the privileges run from root user:
SHOW GRANTS;