Cannot log in with created user in mysql

前端 未结 12 1775
小蘑菇
小蘑菇 2020-12-07 15:31

Using this command

GRANT ALL PRIVILEGES ON *.* to \'brian\'@\'%\' identified by \'password\';

I try to login with:

 mysql -         


        
12条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 16:14

    You can also connect from another host and then the localhost anonymous user is bypassed and you can remove it and flush privileges:

    mysql -u brian -ppassword -h 'other_host_than_localhost'
    

提交回复
热议问题