Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm attempting to give a non-root mysql user access to log into phpMyAdmin and only see the DB they have access to.

I've already looked at the following articles and tried their advice: Configuring phpmyadmin for Multiple Users

I've granted the mysql user access with password to their DB and to select items in mysql db (as stated in one of the articles). I have configed phpmyadmin to use cookie auth_type, I have a pma control user, I've granted the user from not just '%' but from localhost and IPs, etc.

When the user logs in, they get #1045 Cannot log in to the MySQL server

My root user can log in fine to phpmyadmin. The user that needs access to phpmyadmin can log in from the command line fine as well.

The phpmyadmin directory has chmod -R 777 on it, except for the config file, which isn't world writable.

The applicable lines from the mysql logfile are:

130507 14:40:00 [Warning] 'user' entry 'someusername@mydomain' ignored in --skip-name-resolve mode.ve mode.
130507 14:40:00 [Warning] 'db' entry 'somedbname someusername@mydomain' ignored in --skip-name-resolve mode.
130507 14:40:00 [Warning] 'tables_priv' entry 'db someusername@mydomain' ignored in --skip-name-resolve mode.
130507 14:40:00 [Warning] 'tables_priv' entry 'host someusername@mydomain' ignored in --skip-name-resolve mode.
130507 14:40:00 [Warning] 'tables_priv' entry 'tables_priv someusername@mydomain' ignored in --skip-name-resolve mode.
130507 14:40:00 [Warning] 'tables_priv' entry 'user someusername@mydomain' ignored in --skip-name-resolve mode.

Just as a note, the actual someusername@mydomain does was granted privs with password.

My phpmyadmin config looks like this:

$cfg['blowfish_secret'] = '*******************';
$i = 0;
$i++;
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['extension'] = 'mysqli';
$cfg['Servers'][$i]['AllowNoPassword'] = false;
$cfg['Servers'][$i]['controluser'] = 'pma';
$cfg['Servers'][$i]['controlpass'] = '**********';
$cfg['Servers'][$i]['hide_db'] = 'information_schema';
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
$cfg['MaxRows'] = 500;
$cfg['AllowUserDropDatabase'] = true;

Any ideas on how to solve this issue?

Thanks.

share|improve this question

closed as off topic by mdpc, kce, Ward, Tom O'Connor, RolandoMySQLDBA May 9 '13 at 15:51

Questions on Server Fault are expected to relate to professional server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
The phpmyadmin directory has chmod -R 777 on it, except for the config file, which isn't world writable. - Uhm, if you are going to let people write to any other file why are you trying to protect the configuration file? As a general rule, nothing should ever be set to 0777, that is wrong 99% of the time. –  Zoredache May 7 '13 at 20:42

1 Answer 1

up vote 1 down vote accepted

You started MySQL with the skip-name-resolve option, either on the command line or in /etc/my.cnf, but you have MySQL users whose names include a hostname, rather than IP address. Since MySQL isn't resolving IP addresses to hostnames, it can't authenticate those users.

To resolve the issue, do one or both of:

  1. Remove the skip-name-resolve option.
  2. Create MySQL users with IP addresses rather than host names.
share|improve this answer
    
When I granted, I used the FQDN, IPs, and Aliases for everything, just to see if that would fix the problem. It didn't. I'm going to try and remove the skip-name-resolve thing and see if that works. Thank you for your quick reply! –  Morfie May 7 '13 at 20:34
    
I removed the skip-name-resolve and it worked!!! Thank you so much! –  Morfie May 7 '13 at 20:36
    
Welcome to Server Fault. After 15 minutes you'll be able to accept the answer by clicking the outline of the check mark; be sure to do so since it marks the question as solved, and you also gain reputation by doing so. –  Michael Hampton May 7 '13 at 20:37
    
Yep. I wanted to accept the answer immediately, but it told me I had to wait 8 minutes, so I set a timer. :) –  Morfie May 7 '13 at 20:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.