简体   繁体   中英

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. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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