MySQL Forums
Forum List  »  Newbie

Re: How do I fix error 1045
Posted by: Zach Ellis
Date: November 01, 2023 03:06PM

hello Martin

see what grants the root user has by using this query should list the accounts privileges with Y or N the privileges might do more then whats based on their name so look through the manual if the privilege is not enabled.

select * from mysql.user where user = 'root' and host = 'localhost';

there's a grant column so the root user might not have it enabled.

there is also the global_grant privilege table if an variable is not enabled look into that variable to see if it is connected with the giving of grants / privileges to another account.

select * from mysql.global_grants where user = 'root' and host = 'localhost';

The optional WITH clause is used to enable a user to grant privileges to other users. The WITH GRANT
OPTION clause gives the user the ability to give to other users any privileges the user has at the
specified privilege level.

You cannot grant another user a privilege which you yourself do not have; the GRANT OPTION
privilege enables you to assign only those privileges which you yourself possess.

or you have to identify the password for the root user to change its privileges so not adding IDENTIFIED BY 'password' for the root might be why its throwing that error because Error 1045 is a MySQL error code that indicates a failed connection to the MySQL database server.

links on the error

Zach Ellis

Options: ReplyQuote

Written By
November 01, 2023 07:39AM
Re: How do I fix error 1045
November 01, 2023 03:06PM
December 05, 2023 11:14PM
November 03, 2023 07:32AM
November 03, 2023 09:26AM

Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.