Timur Mammadov2022-01-11 00:48:17
Timur Mammadov, 2022-01-11 00:48:17

#1045 - Access denied for user 'root'@'', what should I do?

In OpenServer -> PHPMyAdmin I created user root1:

CREATE USER 'root1'@'localhost' IDENTIFIED WITH mysql_native_password BY '***';ALTER USER 'root1'@'localhost' REQUIRE NONE;

But when I log in, it gives an error:

I set the password to the standard "1111"

Here are the user parameters:

Please help!
If you need extra. information, I will gladly provide it to you!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Akina, 2022-01-11

In OpenServer -> PHPMyAdmin I created user root1

It is not enough to create a user, you must also give him the rights necessary for work. At least elementary for reading for the database that is specified as the default database.
Here are the user options

The USAGE right is synonymous with the “no privileges” right . Those. a freshly created user is absolutely powerless.
Read and apply the GRANT Statement . Pay special attention to WITH GRANT OPTION .

Drno, 2022-01-11

We put ubuntu (you can on a virtual machine)
We try to do everything on it We transfer the virtual machine to a
real server
And on the question - you need to give privileges to this user on the necessary bases

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question