search

Home  >  Q&A  >  body text

php - There is no root user in the mysql user table. Setting the root password will lead to anonymous access

Now the root password is empty by default. Set the root password according to the online method
SET PASSWORD FOR ‘root’@’localhost’ = PASSWORD(‘newpass’);
After entering, it is an anonymous user, resulting in no permissions, so I deleted this anonymous user.
I found that there is no Root user when checking mysql users. What is the reason for this? The system is windows

PHP中文网PHP中文网2757 days ago553

reply all(2)I'll reply

  • phpcn_u1582

    phpcn_u15822017-05-16 13:01:04

    show grnats for sgsl@'localhost' to see if the default super user is sgsl when you install it. If so, there is no need to configure root. The syntax for configuring the root password may be because you don’t have it. It is the root user that causes the failure

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-16 13:01:04

    After setting the password, you need to update the permission table

    reply
    0
  • Cancelreply