I have a mysql database running on k8s cluster inside pod. it was previously listing all the databases when i login through mysql -u root -p
and then entering password. But my application was not able to connect to that database and was showing 1045, "Access denied for user 'root'@'ipaddress' (using password: YES)"
there was just one host which is % and user was root
i have updated secrets as well and restart deployment but still it was showing the above error.
then i ran this command to grant all privileges to root user
GRANT ALL ON root.* TO 'root'@'localhost' IDENTIFIED BY 'password';
it creates one more host for root which is localhost. Now when i try to login with
mysql -u root -p
it is not listing my databases and just showing
And now host is localhost. what should i do to get my database back.