does anybody know in which table godaddy store the users table ?
I have a database created using database wizard and I have added a user using the mysql database wizard to the database. But I still get the error;
Connection failed: Access denied for user 'user1'#'localhost' (using password: YES)
I tried this:
GRANT ALL PRIVILEGES ON *.* TO 'user1'#'%'; FLUSH PRIVILEGES;
But I keep getting;
1045 - Access denied for user 'cpses_odldzcvpqv'#'localhost' (using password: YES)
It must have something to do with the USER_PRIVILEGES table in information_shema. when I type
SELECT * FROM `USER_PRIVILEGES`
IS_GRANTABLE is set to NO.
On unix based systems, mysql treats localhost and tcp/ip separately. If you wish to give access to localhost, you must also give an explicit permission to localhost along with %.
GRANT ALL PRIVILEGES ON *.* TO 'user1'#'localhost' identified by '<password>';
or you can connect via 127.0.0.1 instead of localhost. That'll work.
mysql -u user1 -p<password> --host 127.0.0.1
Related
How do I grant permissions to users in MySQL?
This is the order in which I tried:
First, connect from EC2 SERVER to MYSQL CLIENT RDS.
After connecting, MYSQL created a user to give you permission.
An error occurs when giving the user permission.
My attempt:
mysql> CREATE USER 'injekim'#'125.128.63.112' IDENTIFIED BY 'k12345678!!';
Query OK, 0 rows affected (0.02 sec)
mysql> GRANT ALL PRIVILEGES ON *.* TO 'injekim'#'125.128.63.112' WITH GRANT OPTION;
ERROR 1045 (28000): Access denied for user 'root'#'%' (using password: YES)
ERROR 1045 (28000): Access denied for user 'root'#'%' (using password: YES)
Also, I found similar error information in stackoverflow, but I couldn't solve it.
MySQL ERROR 1045 (28000): Access denied for user 'bill'#'localhost' (using password: YES)
How can I authorize the user who created it?
It looks like you are not logged into the host machine. To use the root user, you should actually be logged into the machine (ssh or rdp) that is hosting the MySQL server.
Example, let's say I am setting at my Mac but need to give a new user access to a MySQL database that is running on a server with an IP address of 192.168.1.10. Assuming it's a Linux server I would ssh to the server from my Mac's terminal by running:
ssh myuser#192.168.1.10
You can now either:
Log into MySQL as root by running: mysql -u root -p (you will be prompted for the password)
Or,
You could become the root user. In my case, I would run the following:
sudo su. Now that you are the root user, you can log into MySQL by running:
mysql -p
If you need an example in a Windows environment, let me know. It will be the same basic idea, but using RDP instead of ssh. From your local machine, get a session on the actual server running MySQL and then log into MySQL as root from the server.
I am trying to connect to my database through an ash tunnel using sequel pro but it is not working and forces me to use 127.0.0.1 when entering "localhost" which leads to the problem where if I run on the command line:
mysql --host "localhost"
It works
If I run:
mysql --host "127.0.0.1"
I get the access denied error:
ERROR 1698 (28000): Access denied for user 'root'#'localhost'
What is going on?
I have tried:
update user set host='%' where host='localhost'
but this does not work.
Many SQL servers have two or more different user entries for every user that might come in via either localhost or remote. (127.0.0.1 counts as remote).
For example, for the root user, you might have these three user entries.
CREATE USER 'root'#'localhost' IDENTIFIED BY REDACTED;
CREATE USER 'root'#'127.0.0.1' IDENTIFIED BY REDACTED;
CREATE USER 'root'#'%.example.com' IDENTIFIED BY REDACTED;
There's nothing much special about the name root except that it has been granted a lot of privileges when your MySQL was installed. You need to grant the same privileges to the other versions of root#whatever you create.
I created a new user:
CREATE USER 'non-root'#'localhost' IDENTIFIED BY '123';
and then granted them all the same privileges:
GRANT ALL PRIVILEGES ON * . * TO 'non-root'#'localhost';
and then deleted root and renamed non-root to root
and now it finally works.
I set up a VM (RHEL6) in our company's private cloud, and installed MySQL.
I opened up remote connections like the following so my coworkers and I could connect to it:
GRANT ALL PRIVILEGES ON `dbname`.* TO 'root'#'%';
FLUSH PRIVILEGES;
Here is the result from SHOW GRANTS FOR 'root'#'%';
| GRANT ALL PRIVILEGES ON `dbname`.* TO 'root'#'%' |
1) My coworker can connect to it from the mysql client on his laptop via
mysql -h <hostname> -u root -p dbname
2) I can create a separate VM and connect to the original VM using the same syntax.
However, on my laptop, I can not connect to it. I receive the following error:
ERROR 1045 (28000): Access denied for user 'root'#'<my-ip>' (using passwo
rd: YES)
I've even specifically opened it for my IP using GRANT ALL PRIVILEGES ONdbname.* TO 'root'#'<my-ip>'; FLUSH PRIVILEGES;, which of course shouldn't be necessary, but it didn't work.
I have restarted the MySQL server (which wasn't necessary for my coworkers).
Any idea what could be causing this?
I have been used following command but it was not working.
GRANT ALL PRIVILEGES ON *.* TO ROOT#LOCALHOST IDENTIFIED BY "my_password";
You are not connected (in the way of a login & username) to the database, you need to connect. depending on the way you acces the database.
in command line, you can use this:
mysql -pYourpassword -u username
I don't get how to give a user permissions in MySQL.
I am using MySQL RDS on aws. I am creating a user and need access to the reports database. I created a hash password and ran the below.
SELECT PASSWORD('Test123');
GRANT ALL PRIVILEGES ON reports.* TO 'central'#'localhost'
IDENTIFIED BY PASSWORD '*D1AD25EDF929F55FBFF703358EC527';
mysql -u central -pTest123 -h test.com
ERROR 1045 (28000): Access denied for user 'central'#'112.198.130.xxx' (using password: YES)
Why? What did I do wrong?
You granted permission to 'central'#'localhost' but are attempting to authenticate as 'central'#'112.198.130.xxx'. Either connect from localhost, or grant permission to the appropriate hosts.