I want to resolve ERROR 1045(28000) in mysql

Asked 1 years ago, Updated 1 years ago, 37 views

I am learning mysql from dotinstall, but I have stopped with the following error:
I want to clear the error below and connect to mydb01, but I don't know how to do that.
I gave mydb01 permission to a user named cduser01 so that he could connect with the password '6AVAkig2', but when I had to say 'dbuser01@~' in the first line, I went ahead with 'dbuser', so I think I got an error.
You can delete it and start over from scratch, or you can do something else.
I would appreciate it if you could tell me the solution.
Thank you in advance.

mysql>create user dbuser @localhost identified by '6AVAkig2';
Query OK, 0 rows affected (0.01sec)
mysql>grant all on mydb01.* to dbuser01@localhost;
Query OK, 0 rows affected (0.00sec)
mysql>quit;
bye
[vagrant@localhostmysql_lessons]$ mysql-udbuser01-pmydb01
Enter password:
ERROR 1045 (28000): Access denied for user 'dbuser01'@'localhost' (using password: YES)

mysql

2022-09-30 19:42

1 Answers

Delete dbuser and try again by registering dbuser01.

mysql>drop user dbuser@localhost;

mysql>create user dbuser01 @localhost identified by '6AVAkig2';


2022-09-30 19:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.