ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'

0 votes

Hi,

When I set the privilege with the help of this command:

mysql> select Host,User from mysql.user;

I came up with this error: 

ERROR 1142 (42000): SELECT command denied to user ''@'localhost' for table 'user'

Can anyone suggest how can I come up with this error?

Jun 19 in Big Data Hadoop by Jona
291 views

1 answer to this question.

0 votes

Hey,

This is a mysql command line error message, this Means you are logged into mysql with a default null user with just about zero privileges.

You can follow some steps to remove the error:

Run the mysql command which will bring you to mysql promt:

mysql -u root

Run the command

select user();



Then run another command:

select user from mysql.user;

I hope you won't get the error anymore.

answered Jun 19 by Gitika
• 25,340 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Hadoop hdfs "permission denied" error when I try to make new directory

This is because you dont have enough ...READ MORE

answered Nov 22, 2018 in Big Data Hadoop by Omkar
• 67,480 points
1,107 views
0 votes
1 answer

Hadoop: "DEPRECATED: Use of this script to execute hdfs command is deprecated." error

The use of dfs in your command is "Deprecated". ...READ MORE

answered Nov 26, 2018 in Big Data Hadoop by Omkar
• 67,480 points
674 views
0 votes
1 answer

Start-dfs.sh daemons not starting. localhost: mkdir: cannot create directory `/user': Permission denied

Make the following changes to the hadoop-env.sh ...READ MORE

answered Dec 5, 2018 in Big Data Hadoop by Omkar
• 67,480 points
174 views
0 votes
1 answer

Update hdfs data before stroring in MySql

Yes, you can update the data before ...READ MORE

answered Jan 27 in Big Data Hadoop by Omkar
• 67,480 points
27 views
0 votes
1 answer

Configure Oozie to use MySQL

To configure Oozie to use MySQL, open ...READ MORE

answered Jun 4 in Big Data Hadoop by Karan
29 views
0 votes
1 answer

Using Hadoop for Data Analytics.

Yes, your approach is correct - you ...READ MORE

answered Sep 28, 2018 in Big Data Hadoop by Frankie
• 9,810 points
35 views
0 votes
1 answer

error: Access denied for user 'sample'@'localhost'.

This kind of error occurs when we ...READ MORE

answered Apr 15 in Big Data Hadoop by Gitika
• 25,340 points
53 views