Unable to set password for root@localhost in mysql

Waqas

I have tried various options I got from Google but unable to set password for root. I can login without any password, but the Java drivers require a password, so I have to set it.

In my last attempt, I tried following command in the MySQL console:

SET PASSWORD FOR root@localhost=PASSWORD('abc123');

But I got following error:

ERROR 1133 <42000>: Can't find any matching row in the user table
errakeshpd

Enter the following lines in your terminal.

Stop the MySQL Server.

sudo /etc/init.d/mysql stop

Start the mysqld configuration. (in safe mode)

sudo mysqld_safe --skip-grant-tables & 

Login to MySQL as root.

mysql -u root mysql

Replace YOURNEWPASSWORD with your new password!

UPDATE user SET Password=PASSWORD('YOURNEWPASSWORD') WHERE User='root'; 
FLUSH PRIVILEGES; 
exit;

sudo /etc/init.d/mysql start

REFERENCES :

http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password https://help.ubuntu.com/community/MysqlPasswordReset

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Unable to set password for root@localhost in mysql

From Dev

What is the password for root@localhost's password?

From Dev

What is the password for ``ssh root@localhost``?

From Dev

What is the password for ``ssh root@localhost``?

From Dev

unable to reset root password of mysql

From Dev

unable to reset mysql 'root' password

From Dev

Cannot Connect to Server at 'localhost' when Set the MySQL Root Password

From Dev

Unable to reset MySQL root password, tried everthing

From Dev

Unable to reset MySQL root password, tried everthing

From Dev

MySQL Error: Access denied for user root@localhost

From Dev

How can I grant all privileges to root@localhost in MySQL?

From Dev

How can I grant all privileges to root@localhost in MySQL?

From Dev

Cannot set password for MySQL root user

From Dev

unable to set password with the script

From Dev

root@localhost's password: localhost: Permission denied, please try again

From Dev

MariaDB 10.1 and Ubuntu 16.04: Unable to set password for the MariaDB "root" user

From Dev

MySQL damaged, unable to login to connect and root password is no longer working

From Dev

Unable to access MySQL from C# application because of Exception: "Access denied for user 'root'@'localhost' (using password: YES)"

From Dev

How to set password for MySQL?

From Dev

How to set password for MySQL?

From Dev

MYSQL Database Password Set

From Dev

PuPHPet vagrant up - Error: Duplicate declaration: Mysql_user[root@localhost]

From Dev

PuPHPet vagrant up - Error: Duplicate declaration: Mysql_user[root@localhost]

From Dev

Problem with mysql root password

From Dev

MySql root password reset

From Dev

Change MySql root password

From Dev

setting a mysql root password

From Dev

Resetting MySQL root password

From Dev

unable to connect MYSQL using PHP "Access denied for user ''@'localhost' (using password: NO)"

Related Related

  1. 1

    Unable to set password for root@localhost in mysql

  2. 2

    What is the password for root@localhost's password?

  3. 3

    What is the password for ``ssh root@localhost``?

  4. 4

    What is the password for ``ssh root@localhost``?

  5. 5

    unable to reset root password of mysql

  6. 6

    unable to reset mysql 'root' password

  7. 7

    Cannot Connect to Server at 'localhost' when Set the MySQL Root Password

  8. 8

    Unable to reset MySQL root password, tried everthing

  9. 9

    Unable to reset MySQL root password, tried everthing

  10. 10

    MySQL Error: Access denied for user root@localhost

  11. 11

    How can I grant all privileges to root@localhost in MySQL?

  12. 12

    How can I grant all privileges to root@localhost in MySQL?

  13. 13

    Cannot set password for MySQL root user

  14. 14

    unable to set password with the script

  15. 15

    root@localhost's password: localhost: Permission denied, please try again

  16. 16

    MariaDB 10.1 and Ubuntu 16.04: Unable to set password for the MariaDB "root" user

  17. 17

    MySQL damaged, unable to login to connect and root password is no longer working

  18. 18

    Unable to access MySQL from C# application because of Exception: "Access denied for user 'root'@'localhost' (using password: YES)"

  19. 19

    How to set password for MySQL?

  20. 20

    How to set password for MySQL?

  21. 21

    MYSQL Database Password Set

  22. 22

    PuPHPet vagrant up - Error: Duplicate declaration: Mysql_user[root@localhost]

  23. 23

    PuPHPet vagrant up - Error: Duplicate declaration: Mysql_user[root@localhost]

  24. 24

    Problem with mysql root password

  25. 25

    MySql root password reset

  26. 26

    Change MySql root password

  27. 27

    setting a mysql root password

  28. 28

    Resetting MySQL root password

  29. 29

    unable to connect MYSQL using PHP "Access denied for user ''@'localhost' (using password: NO)"

HotTag

Archive