简体   繁体   English

phpMyAdmin-#1044-用户被拒绝访问

[英]phpMyAdmin - #1044 - Access denied for user

All I want to do is make a new user with all permissions on a database. 我要做的就是创建一个对数据库具有所有权限的新用户。 I am trying this: 我正在尝试:

GRANT ALL PRIVILEGES ON `some-db`.* To 'username'@'hostname' IDENTIFIED BY 'password';

Unfortunately, this returns 不幸的是,这又回来了

#1044 - Access denied for user 'username'@'hostname' to database 'some-db'

Although I am able to access the database some-db through phpMyAdmin, MySQL doesn't let me. 尽管我可以通过phpMyAdmin访问some-db数据库,但是MySQL不允许我这样做。 I don't understand this very well, can someone please help? 我不太了解,有人可以帮忙吗?

MySQL's user model is a user@host model, so my guess is that PHPMyAdmin is connecting from a different IP address than you are. MySQL的用户模型是user @ host模型,因此我的猜测是PHPMyAdmin从与您不同的IP地址进行连接。 You probably also lack global user creation privileges, meaning that you cannot create the user on your own. 您可能还缺少全局用户创建特权,这意味着您无法自行创建用户。

If you have a user account with the appropriate user creation privilege, you can use that. 如果您拥有一个具有相应用户创建特权的用户帐户,则可以使用该帐户。 Otherwise you will have to contact appropriate support or database administrators to have the account created. 否则,您将必须联系适当的支持或数据库管理员来创建帐户。

Also you are already connected as the same username and host? 您是否已经以相同的用户名和主机连接? I think your problem is you just want to create another user with a different remote host component. 我认为您的问题是您只想创建另一个具有不同远程主机组件的用户。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM