开发者

Access denied to mysql database

开发者 https://www.devze.com 2023-03-01 12:07 出处:网络
I created a database named auth yesterday in mysql. Today, I went to access it by USE auth; but I got this output

I created a database named auth yesterday in mysql.

Today, I went to access it by USE auth; but I got this output

ERROR 1044 (42000): Access denied for user ''@'localhos开发者_开发技巧t' to database 'auth'

I never used to have this problem when I created and used databases.


Connect to database with root

mysql -u root -pyourpassword

(change yourpassword with password you have for root or leave in blank in case you havent set it). Now you should have access to your db. Check this thread how to set permissions for users MySQL Add User Guide.


maybe try creating and using a new database to see if the problem is repeatable, or if it's specific to that database.

0

精彩评论

暂无评论...
验证码 换一张
取 消