Lost root Password. How To Reset The root Password On Linux?

(Doc ID 1023077.1)

Last updated on MARCH 26, 2018

Applies to:

MySQL Server - Version 4.0 and later
Generic Linux


If you set a root password previously, but have forgotten what it was, you can set a new password. The following procedure is for Linux servers.

An error you may see when trying to connect is:

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


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms