1
votes

My PhpAdmin was working fine but i have executed the follwing query after that I am not able to login in my phpmyadmin

1045 - Access denied for user 'root'@'localhost' (using password: YES)

mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

Query I have executed

mysql>create database bwadmindb

mysql>use bwadmindb;

mysql>GRANT ALL PRIVILEGES ON . TO root@ IDENTIFIED BY 'Tibco123'WITH GRANT OPTION;

grant create,select,update,insert,delete ON . to bwuser@ IDENTIFIED BY "bwuser";

Help me to restore the default setting of phpmyadmin!!!

1

1 Answers

0
votes

see this post:

Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).

$ mysqld --skip-grant-tables

Execute these statements.

$ mysql -u root mysql

$mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
$mysql> FLUSH PRIVILEGES;

If you face the unknown field Password error above use:

update user set authentication_string=password('my_password') where user='root';

Finally, restart the instance/daemon without the --skip-grant-tables option.

$ /etc/init.d/mysql restart