MySQL can only log in as root, even after creating new users with their own database

Posted by ionFish on Pro Webmasters See other posts from Pro Webmasters or by ionFish
Published on 2012-09-16T16:46:23Z Indexed on 2012/09/16 21:53 UTC
Read the original article Hit count: 181

Filed under:

Problem:

I just set up a Debian Wheezy installation for testing, and installed the LAMP packages and PMA.

I can log in as root with my pre-defined password, create/edit/delete both databases and users. The problem comes when I create a new user 'something', set a password for it, and grant it all privileges on a table 'something' (same as the username). Upon connecting, it denies access to the user.

Details:

  • Host: localhost using MySQL 5.5.24-8

  • Creating user: CREATE USER 'something'@'%' IDENTIFIED BY '***';GRANT USAGE ON *.* TO 'something'@'%' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;CREATE DATABASE IF NOT EXISTSsomething;GRANT ALL PRIVILEGES ONsomething.* TO 'something'@'%';

  • Checking privileges: GRANT USAGE ON *.* TO 'something'@'%' IDENTIFIED BY PASSWORD '*92F9DAF5F5129554509489FDB6A433510223C799';

  • Result: Access denied for user 'something'@'localhost' (using password: YES)

More Info:

I use this same exact procedure for the Squeeze distribution, and it works perfectly. Is there a chance it's because of Wheezy, or something else? I need to continue using Wheezy because of the updated packages (for this test server -- the others work fine), so 'just use Squeeze' is not an option. Note: I HAVE tried flush privileges; to no avail.

© Pro Webmasters or respective owner

Related posts about mysql