Removed WAMP user PHPMyadmin
By mistake one of my phpmyadmin users got deleted and then when opening phpmyadmin it gives an error
"# 1045 - Access denied for user 'root' @ 'localhost' (using password: YES)"
Please help how to recover this account with the same name and password, also I'm worried about my databases not opening. Will they be safe and recovered or lost?
source to share
Try the following:
Access denied for user 'root' @ 'localhost' (using password: YES)
-
service mysqld stop
Stopping mysqld: [OK]
-
mysqld_safe --skip-grant-tables &
mysqld_safe Login to '/var/lib/mysql/mysqld.err'.
mysqld_safe Start the mysqld daemon with databases from / var / lib / mysql
-
mysql -u root
-
mysql> UPDATE mysql.user SET password=PASSWORD("new_password") WHERE User='root';
mysql> grant all privileges on *.* to root@localhost identified by 'new_password' with grant option;
Query OK, 0 lines (0.00 sec)
mysql> flush privileges;
Query OK, 0 lines (0.00 sec)
-
service mysqld restart
Now try to login using the new root password
source to share