MySQL Forums
Forum List  »  Newbie

Re: 'root' is denied access to all databases/connections
Posted by: Barry Galbraith
Date: April 17, 2023 12:42AM

Quote

mysqld --init-file="path/to/file.txt" --console
The refman says you should also provide the --defaults-file option.
C:\> mysqld
         --defaults-file="C:\\ProgramData\\MySQL\\MySQL Server 8.0\\my.ini"
         --init-file=C:\\mysql-init.txt

Quote

ALTER USER ALTER USER 'root'@'localhost' IDENTIFIED BY '[my password]'

The refman shows
ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
replacing MyNewPass with your new password.
You have ALTER USER ALTER USER which will give an error, and not change your password.

You need to follow the refman more closely.
https://dev.mysql.com/doc/refman/8.0/en/resetting-permissions.html

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
Re: 'root' is denied access to all databases/connections
April 17, 2023 12:42AM


Sorry, you can't reply to this topic. It has been closed.

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.