List:General Discussion« Previous MessageNext Message »
From:Claudio Nanni Date:March 16 2012 10:39am
Subject:Re: Can't connect as non-root user to database
View as plain text  
Hi,

1. FLUSH PRIVILEGES is not needed, the SQL commands to manage user and
grants reload automatically the grant tables,
that was used in the very past when people use to tinker directly the grant
tables.

2. you did not specify the @ part of the  'someone' :      GRANT ALL ON
somedb.* TO 'someone'@'.....' IDENTIFIED BY 'somepass';

cheers

Claudio
2012/3/16 Clemens Eisserer <linuxhippy@stripped>

> 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
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql
>
>


-- 
Claudio

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