You're right.  As the root user, we've created dozens of databases on
this server.  I'm still not entirely sure what I was doing wrong but the
lines from Sudhir

mysql -u root -ppassword

mysql> create user  'user'@'localhost' identified by 'password' ; grant 
mysql> create on *.* to 'user'@'localhost'; flush privileges; quit

mysql -u user -ppassword
mysql> create database testdb1;
mysql>create database testdb2;

Did the trick.

Thank you all for your suggestions and help!

jc

> -----Original Message-----
> From: Jim Lyons [mailto:jlyons4...@gmail.com]
> Sent: 07 May 2009 14:55
> To: John Clement
> Cc: mysql@lists.mysql.com
> Subject: Re: grant user create privilege
> 
> It's hard to believe this to be the case since I assume you've created
> other
> databases in this instance, but the error on "create database", which
> is
> essentially a "mkdir" in Unix, makes me wonder if you don't have a
file
> permissions error on the datadir directory.
> 
> On Wed, May 6, 2009 at 9:14 AM, John Clement
> <john.clem...@readingroom.com>wrote:
> 
> > I'm clearly doing something wrong.  All I want is to grant a user
> rights
> > to create databases:
> >
> > grant create on *.* to 'user'@'localhost' identified by 'pass';
> >
> > doesn't do the trick, nor does
> >
> > grant super on *.* to 'user'@'localhost' identified by 'pass';
> >
> > The user in question was originally created using
> >
> > grant all privileges on their_db.* to 'user'@'localhost' identified
> by
> > 'pass';
> >
> > If I try logging in as this user though the following happens:
> >
> >
> >
> > mysql> create database testdb;
> > ERROR 1044 (42000): Access denied for user 'user'@'localhost' to
> > database 'testdb'
> >
> > Can someone point out the error of my ways?
> >
> > Many thanks, jc
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> http://lists.mysql.com/mysql?unsub=jlyons4...@gmail.com
> >
> >
> 
> 
> --
> Jim Lyons
> Web developer / Database administrator
> http://www.weblyons.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to