Access denied error while connecting to MySQL database after database migration

Solution Verified - Updated -

Issue

  • Could't connnect to MySQL database after restoring the database dump on a new server, and using the old credentials.
  • Error 1045 (28000): Access denied for user 'username'@'localhost' (using password: YES)

Environment

  • Red Hat Enterprise Linux all versions.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content