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
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.
Comments