How to Reset the Root Password
If you have never set a root
password for MySQL, the server does not require a password at all for connecting as root
. However, this is insecure. For instructions on assigning passwords, see , "Securing the Initial MariaDB Accounts".
If you know the root
password, but want to change it, see , "SET PASSWORD
Syntax".
If you set a root
password previously, but have forgotten it, you can set a new password. The following sections provide instructions for Windows and Unix systems, as well as generic instructions that apply to any system.