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

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!

Related

Mysql Mariadb user not able to access DB

I created a schema and granted its permission to a specific user:
GRANT ALL PRIVILEGES ON USED_CARS.* TO ANDREW#LOCALHOST;
The database is created with root user and then granted these permissions to another user. now when I swith to another account I can list the schema with SHOW SCHEMAS; query however cannot switch to that DB with use USED_CARS; query.
Following error pops up:
ERROR 1044 (42000): Access denied for user 'ANDREW'#'localhost' to database 'USED_CARS'
What am I missing here? Thanks for the help in advance.
Sometimes depending on the configuration of server, you can use localhost or the ip:127.0.0.1
Could you try with this ...
GRANT ALL PRIVILEGES ON USED_CARS.* TO 'ANDREW'#'%';

Super User Privilege to MySQL user

I am trying to give super user privilege to MySQL user by executing below command
GRANT SUPER ON *.* TO indiaski_app#'localhost' IDENTIFIED BY 'appsocial'
But I am getting following error -
1045 - Access denied for user 'indiaskinexam'#'localhost' (using password: YES)
You don't have access to database with the user 'indiaskinexam'. Your password is wrong, that means you can't execute SQL-statements.

ACCESS denied error while GRANTing privileges

I want to allow remote connection from a certain IP.
I have a use coszi_crawl and DB name is same too.
I am logged into server using coszi_crawl user.
I have run this command
GRANT ALL PRIVILEGES ON coszi_crawl.* TO 'coszi_crawl'#'39.32.%' IDENTIFIED BY 'abcqwe' WITH GRANT OPTION;
But this is giving me this error
ERROR 1044 (42000): Access denied for user 'coszi_crawl'#'localhost' to database 'coszi_crawl'
P.S.:
Though I can access coszi_crawl DB from Browser using PHPmyadmin with user coszi_crawl
How can I can solve this problem?
You should use the root account on your database server to update the priviledges, by default the user coszi_crawldoes not have access to granting priviledges on databases.
It means You don't have GRANT OPTION privilege. Login to user having GRANT OPTION privileges, only that user can give grant to other users.
Generally or by default root user has all the privileges so use that user.
Grant privilege

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

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

mysql access denied while creating new user

I want to create a new mysql user and database demo in my company. Here is the commands i input in the mysql.exe :
create user 'admin'#'localhost' identified by 'admin';
create database dem;
Everytime i have that response:
access denied for user ''#'localhost' to database.
Actually i refered to that similar question :
MySQL - Access denied for user
Can anyone help please ???
I would suggest creating the database first then you can create a user, and use the GRANT option to allow permissions to that user for whatever you find necessary. However, creating a user first then a database while it's able to "potentially" work, isn't the best practice with MySQL. So you want to effectively do the Steps as such:
Create Database
Create User
GRANT permissions
???
Profit
You have to GRANT access to admin for dem.
GRANT ALL PRIVILEGES ON *.* TO 'admin'#'%' WITH GRANT OPTION;
You may have to also GRANT the same for admin#localhost as well. IIRC if you ever logon remotely with admin you would inherit the base privileges unless otherwise GRANTed
You can find many answers HERE.