i moved magento 1.9 from one server to another server, but it is not working giving error "SQLSTATE[HY000]  Access denied for user 'root'@'localhost'"
for admin panel it is showing url not found.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
Your MySQL user (root) does not have
localhost access to the database. (the server itself).
Firstly you need to login to mysql from the command-line with your root user:
mysql -u root -p -h IP.Address.Of.DB -P PortNumber
It is never a good idea to use the root user for db access! Create a new mysql user
You need to create a new MySQL user and grant access to the database:
GRANT ALL PRIVILEGES ON newdbname.* TO 'username'@'localhost' IDENTIFIED BY 'password';
Also if you need to remotely access it, (for instance from a Mysql Client from your work desktop)
Specific IP only:
GRANT ALL PRIVILEGES ON newdbname.* TO 'username'@'ip';
GRANT ALL PRIVILEGES ON newdbname.* TO 'username'@'%';