List:General Discussion« Previous MessageNext Message »
From:Clemens Eisserer Date:March 16 2012 9:20am
Subject:Can't connect as non-root user to database
View as plain text  
Hi,

All I would like to do is the create a small database with a non-root
user which is allowed to access the db, however after hours of trying
I gave up.
I am using MySQL-5.5.20 on Fedora16 .

CREATE USER 'someone'@'%' IDENTIFIED BY 'somepass';
CREATE DATABASE somedb;
GRANT ALL ON somedb.* TO 'someone' IDENTIFIED BY 'somepass';
FLUSH PRIVILEGES;

However, when I try to log in to somedb using someone, I always get:

mysql --user=someone -p somedb
Enter password:
ERROR 1045 (28000): Access denied for user 'someone'@'localhost'
(using password: YES)

Any idea whats going wrong here?
Connecting with mysql-workbench seems to work, although I don't see
somedb in the list of databases.

Thanks in advance, Clemens
Thread
Can't connect as non-root user to databaseClemens Eisserer16 Mar
  • Re: Can't connect as non-root user to databaseClaudio Nanni16 Mar
Re: Can't connect as non-root user to databaseClemens Eisserer16 Mar
  • Re: Can't connect as non-root user to databaseRik Wasmus16 Mar
    • Re: Can't connect as non-root user to databaseClemens Eisserer16 Mar
      • Re: Can't connect as non-root user to databaseClaudio Nanni16 Mar
        • Re: Can't connect as non-root user to databaseClaudio Nanni16 Mar
        • Re: Can't connect as non-root user to databaseClemens Eisserer16 Mar
          • Re: Can't connect as non-root user to databaseClaudio Nanni16 Mar
      • Re: Can't connect as non-root user to databaseRik Wasmus16 Mar
      • Re: Can't connect as non-root user to databaseshawn green16 Mar
        • how to sync mysql.user table between to two mysql instancesCharles Brown16 Mar
          • Re: how to sync mysql.user table between to two mysql instancesBaron Schwartz16 Mar
            • RE: how to sync mysql.user table between to two mysql instancesDavid Lerer16 Mar
              • RE: how to sync mysql.user table between to two mysql instancesCharles Brown16 Mar
                • RE: how to sync mysql.user table between to two mysql instancesDavid Lerer16 Mar
            • Re: how to sync mysql.user table between to two mysql instancesJohan De Meersman16 Mar
              • RE: how to sync mysql.user table between to two mysql instancesCharles Brown17 Mar
        • Re: Can't connect as non-root user to databaseClemens Eisserer16 Mar
          • Re: Can't connect as non-root user to databaseshawn green16 Mar