Mobile app version of vmapp.org
Login or Join
Phylliss660

: MySQL can only log in as root, even after creating new users with their own database Problem: I just set up a Debian Wheezy installation for testing, and installed the LAMP packages and PMA.

@Phylliss660

Posted in: #Mysql

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.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Phylliss660

1 Comments

Sorted by latest first Latest Oldest Best

 

@Samaraweera270

Think I have found the problem:

You created the access for something@'%' but not for something@'localhost'

% is not localhost for MySQL, you have to make another addition.
This is why the error message is complaining about something@'localhost'
dev.mysql.com/doc/refman/5.5/en//adding-users.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme