• Register
1 vote
662 views

Problem :

I am naïve to mysql. Currently I am continuously facing below error.

“Mysql access denied for user 'root'@'localhost' (using password yes)”.

I have recently started using mySQL Workbench and after doing research on above error I found that my root's schema privileges are null. I do not have any privileges at all.

Because of above issue I am facing a lot of troubles across the platforms for which my server is used for and one more information want to share here is it is the sudden issue.

I have already tried some things for example FLUSH HOSTS, FLUSH PRIVILEGES, etc but it was of no us. I want to get my root access back as soon as possible. Can somebody help me in getting my root access back?

8 5 2
3,230 points

Please log in or register to answer this question.

1 Answer

1 vote

Solution :

I had faced this issue in recent past. I had ubuntu 18 and I simply installed MySQL (password:root) with the help of below commands.

sudo apt install mysql-server
sudo mysql_secure_installation
I was able to login to MySQL very easily with the help of the super user. I used below commands and luckily I was able to log in with the help of normal user.
sudo mysql    
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
exit;

After above step I was able to login to my Mysql with a normal account.

8 4 1
5,680 points

Related questions

0 votes
1 answer 4 views
4 views
Problem: Please let me know how to solve the error: access denied for user 'root'@'localhost' (using password: yes)?
asked Apr 3 ashik 14.6k points
0 votes
1 answer 5 views
5 views
Problem: I'm having trouble finding a solution; could you please assist me “Access denied for user 'root'@'localhost' (using password yes) mysql”?
asked Mar 30 tuhin1 48.9k points
0 votes
1 answer 6 views
6 views
Problem: Please help me fix this dilemma “Access denied for user 'root'@'localhost' using password yes mysql”?
asked Mar 30 tuhin1 48.9k points
0 votes
1 answer 805 views
805 views
Problem : I have recently installed Ubuntu 16.04 and installed web server on it. Everything works well, but I am unable to access database. Even if I create new user and grant all privileges, I can't create database In PHP I am getting below error: SQLSTATE[HY000] [1698] ... ", $this->myname, $this->mypass, self::$mysettings);     } catch (PDOException $e) {         echo $e->getMessage();     } }
asked Jan 17, 2020 jwilliam 3.9k points
0 votes
1 answer 3 views
3 views
Problem: As I mentioned in my previous query, I'm having difficulties with my learning; I've tried searching the web but haven't been able to find adequate information; could you assist me in continuing my project?
asked Apr 1 rakib1 51.5k points
0 votes
1 answer 106 views
0 votes
1 answer 116 views
0 votes
1 answer 126 views
0 votes
1 answer 59 views
59 views
Problem: I had installed MySQL on my linux server sometimes back now I forgot the password so I tried to change it using the ways I found online. What I did was as shown below: /etc/init.d/mysql stop mysqld_safe --skip-grant-tables & mysql --user root mysql SELECT * ... it still shows me below errors  "Access denied for user 'root'@'localhost' (using password: Yes)". How to fix above MYSql error?
asked Jul 14, 2020 Raphael Pacheco 4.9k points