grant user create privilege
grant user create privilege
am 06.05.2009 16:14:05 von John Clement
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=20
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=3Dgcdmg-mysql-2@m.gmane.o rg
RE:grant user create privilege
am 07.05.2009 05:44:01 von Sudhir Menon
--0016e65385069faa2504694a5232
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
mysql -u root -ppassword
mysql> create user 'user'@'localhost' identified by 'password' ;
mysql> grant create on *.* to 'user'@'localhost';
mysql> flush privileges;
mysql> quit
mysql -u user -ppassword
mysql> create database testdb1;
mysql>create database testdb2;
Regards
Sudhir Menon
Regards
Sudhir Menon
--0016e65385069faa2504694a5232--
Re: grant user create privilege
am 07.05.2009 07:21:38 von devlin
John,
Are you loggin in as:
mysql -u 'user' -p
If not, you should (from the local host obviously).
The other thing to check is once you are logged in, run the following command:
mysql> show grants;
This will tell you what the grants are for the user that is logged in
(and whether or not you are the mysql user that you think you are).
Hope that helps-
--
Christopher Devlin
devlin@iamaquatics.org
O|ASS
American Red Cross - LGI, WSI
PADI - Divemaster
Illinois Department of Public Health - Certified Pool Operator
NSPF - CPO, CPOI
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
Re: grant user create privilege
am 07.05.2009 15:54:45 von Jim Lyons
--0016361e86c0c9b0fa046952da30
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
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
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=jlyons4435@gmail.com
>
>
--
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com
--0016361e86c0c9b0fa046952da30--
RE: grant user create privilege
am 07.05.2009 16:08:25 von John Clement
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=20
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:jlyons4435@gmail.com]
> Sent: 07 May 2009 14:55
> To: John Clement
> Cc: mysql@lists.mysql.com
> Subject: Re: grant user create privilege
>=20
> 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.
>=20
> On Wed, May 6, 2009 at 9:14 AM, John Clement
> wrote:
>=20
> > 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=3Djlyons4435@gmail.com
> >
> >
>=20
>=20
> --
> 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=3Dgcdmg-mysql-2@m.gmane.o rg
Re: grant user create privilege
am 07.05.2009 16:09:22 von Ian Simpson
Did you flush privileges after creating the user?
On Thu, 2009-05-07 at 08:54 -0500, Jim Lyons wrote:
> 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
> 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=jlyons4435@gmail.com
> >
> >
>
>
--
Ian Simpson
System Administrator
MyJobGroup
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org
RE: grant user create privilege
am 07.05.2009 16:15:57 von John Clement
Oh, and yep I did flush privileges, and testdb wasn't actually the name
of the db I was trying to create, the db I was trying to create didn't
already exist. Thanks again for all the replies!
jc
> -----Original Message-----
> From: Ian Simpson [mailto:ian@it.myjobgroup.co.uk]
> Sent: 07 May 2009 15:09
> To: Jim Lyons
> Cc: John Clement; mysql@lists.mysql.com
> Subject: Re: grant user create privilege
>=20
> Did you flush privileges after creating the user?
>=20
> On Thu, 2009-05-07 at 08:54 -0500, Jim Lyons wrote:
> > 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
> > 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=3Djlyons4435@gmail.com
> > >
> > >
> >
> >
> --
> Ian Simpson
> System Administrator
> MyJobGroup
>=20
>=20
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=3Djohn.clement@readingroo m.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg