Why do I receive error MySQL error 1045 (access denied for user 'root'@'servername')?

Article ID: 365
Category: Database
Applies to: All
Updated: 2019-06-26

The default MySQL permissions do not allow remote connections when using the "root" account, but the "root" account is needed to create, modify, or upgrade your EventSentry database. It is also the account normally used for purging data, so you may encounter this error when using the database purge utility or the maintenance wizard.

You can run the following command in MySQL Workbench to grant the necessary permission to the EventSentry server:

1
2
3
4
GRANT ALL PRIVILEGES ON *.* TO 'root'@'servername'
    IDENTIFIED BY 'yourpassword&' 
    WITH GRANT OPTION;
FLUSH PRIVILEGES;

Note: Replace "servername" with the exact name of the server as it is displayed in your error message, and replace "yourpassword" with the actual password of the root account.

If you already had the database wizard open on the EventSentry server, you'll need to close and reopen it for the permission change to take effect. If you were trying to use the database purge utility or the maintenance wizard, please re-execute the purge command.



Try EventSentry on-premise

FREE 30-day evaluation

Download Now