Reset Mysql workbench root password

KKKK

I messed up something and I try creating a local server in the mysql workbench but an error message show up every time I test the connection.

enter image description here

I tried uninstalling the mysql workbench and installing again but the for user "root" is unknown. It did not tell anything about the root password during the installation process and I tried various password like empty string, my mac password etc but none of them works, I try researching in stackoverflow but I still cannot solve it.

Ankit Agrawal

For MAC user / OSX user

Try the command FLUSH PRIVILEGES when you log into the MySQL terminal. If that doesn't work, try the following set of commands while in the MySQL terminal

$ mysql -u root
mysql> USE mysql;
mysql> UPDATE user SET password=PASSWORD("NEWPASSWORD") WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> quit

Change out NEWPASSWORD with whatever password you want. Should be all set!

Update: As of MySQL 5.7, the password field has been renamed authentication_string. When changing the password, use the following query to change the password. All other commands remain the same:

mysql> UPDATE user SET authentication_string=PASSWORD("NEWPASSWORD") WHERE User='root';

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Reset MySQL root password using ALTER USER statement after install on Mac

From Dev

How to reset the forgotten MySQL root password?

From Dev

How to reset mysql password

From Dev

reset/change mysql root password

From Dev

Strange type of password in mysql workbench

From Dev

failed to reset root password for gitlab

From Dev

Reset MySQL root password not working

From Dev

How to reset password for root in arangodb?

From Dev

Unable to reset MySQL root password, tried everthing

From Dev

Unable to reset MySQL root password, tried everthing

From Dev

WAMP - Reset Root password on mysql

From Dev

unable to reset root password of mysql

From Dev

Problem with mysql root password

From Dev

MySql root password reset

From Dev

Can't start MySQL to reset root password

From Dev

Trying to reset forgotten MySql Root Password

From Dev

Can't reset MySQL (MariaDB) root password

From Dev

How do I reset my root password for MySQL on Mac OS X Yosemite?

From Dev

How do I reset mysql's root password?

From Dev

Change MySql root password

From Dev

Strange type of password in mysql workbench

From Dev

failed to reset root password for gitlab

From Dev

setting a mysql root password

From Dev

Is there a way to retrieve a root mysql password (no reset)

From Dev

Reset Root Password for MySQL via Package Configuration

From Dev

Reset MySQL root password not working

From Dev

Reset root password for Ubuntu 16.04 - recovery mode asks for root password

From Dev

Resetting MySQL root password

From Dev

unable to reset mysql 'root' password