1044 - Access denied for user 'root'#'%' to database 'test' cleardb - mysql

I have an issue that when i try to connect to a database in cleardb it gives me this error:
1044 - Access denied for user 'root'#'%' to database 'test'
when it connect via navicat and try to upload new test.sql file to update my database i get the same error.
is there a way to do it?

Default root user in MySQL does not have permissions to access outside local host, so you should create a user to be able to do this like:
CREATE USER 'someuser'#'%' IDENTIFIED BY "your_password";
GRANT ALL PRIVILEDGES ON test.* TO 'someuser'#'%';
Then try connecting with this user

Related

Access denied for user 'user1'#'localhost' goddady

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

Access denied for user 'root'#'%' to database 'information_schema'

I created a Google Cloud sql database, and I tried to access it with DataGrip. However, I get this message when I try to create a table:
Access denied for user 'root'#'%' to database 'information_schema'
Access denied for user 'root'#'%' to database 'information_schema':
1.) Check username and password.
2.) Check user access permission.
Check your conection information or try creating a new username and password.
In other cases can be the host..
Regards!

Mysql: new user access denied to database

I'm using Mysql 5.5. I logged in mysql by root and created a new user.
Then I logged in using
mysql -u newuser -p
Then in mysql I entered
GRANT ALL PRIVILEGES ON db1.tablename TO 'newuser'#'localhost';
in order to access to the databases.
But there is an error message:
ERROR 1142 (42000): SELECT,INSERT,UP command denied to user 'newuser'#'localhost' for table 'tablename'
I even tried other commands such as GRANT CREATE or GRANT DROP, the same error keep showing.
ERROR 1142 (42000): CREATE,GRANT command denied to user 'newuser'#'localhost' for table 'tablename'
Can someone please help?
You logged into MySQL as root and created the new user, but you need to grant the permissions to the new user as well while logged in as root. Then you'll be able to login as newuser and execute statements.

MySQL: Access denied for user to database

I'm trying to create a database on my remote sql server - clearDB - on Heroku. I connected with this:
mysql --host='<<cleardbhostname>>' --user='<<lsdj234>> --password
My username and password are obtained from the result from running heroku config. When I tried to run
CREATE DATABASE mydb;
I got this:
ERROR 1044 (42000): Access denied for user '<<lsdj234>>'#'%' to database 'mydb'
When I ran SHOW GRANTS for current_user I got:
GRANT USAGE ON *.* TO '<<lsdj234>>'#'%' IDENTIFIED BY PASSWORD '*asfe4545235' WITH MAX_QUERIES_PER_HOUR 3600 MAX_USER_CONNECTIONS 10 |
| GRANT ALL PRIVILEGES ON `heroku_ljl4455lkj`.* TO '<<lsdj234>>'#'%'
What is happening? How do I resolve this?
The only database that your user can access (and even create) is heroku_ljl4455lkj
It can't create any other databases.

MySQL - granting permission

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.