Problem adminstering users and creating databases

This is a discussion on Problem adminstering users and creating databases within the MySQL Database forums, part of the Database Forums category; I have set the 'root' password for my mysql instillation using :- SET PASSWORD FOR root = PASSWORD( '###'); Since doing this I ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-01-2008
Aaron Gray
 
Posts: n/a
Default Problem adminstering users and creating databases

I have set the 'root' password for my mysql instillation using :-

SET PASSWORD FOR root = PASSWORD( '###');

Since doing this I can no longer create databases under a new user name and
password.

I am confused as to how I go about creating and adminstering new users and
databases.

If someone could set me straight on how to do this please.

Many thanks in advance,

Aaron


Reply With Quote
  #2 (permalink)  
Old 02-01-2008
Jerry Stuckle
 
Posts: n/a
Default Re: Problem adminstering users and creating databases

Aaron Gray wrote:
> I have set the 'root' password for my mysql instillation using :-
>
> SET PASSWORD FOR root = PASSWORD( '###');
>
> Since doing this I can no longer create databases under a new user name and
> password.
>
> I am confused as to how I go about creating and adminstering new users and
> databases.
>
> If someone could set me straight on how to do this please.
>
> Many thanks in advance,
>
> Aaron
>
>
>


The manual is a good place to start...

http://dev.mysql.com/doc/refman/5.1/...ement-sql.html

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #3 (permalink)  
Old 02-01-2008
Aaron Gray
 
Posts: n/a
Default Re: Problem adminstering users and creating databases

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:v6-dnYmHiseKxj7anZ2dnUVZ_gydnZ2d@comcast.com...
> Aaron Gray wrote:
>> I have set the 'root' password for my mysql instillation using :-
>>
>> SET PASSWORD FOR root = PASSWORD( '###');
>>
>> Since doing this I can no longer create databases under a new user name
>> and password.
>>
>> I am confused as to how I go about creating and adminstering new users
>> and databases.
>>
>> If someone could set me straight on how to do this please.
>>
>> Many thanks in advance,
>>
>> Aaron
>>
>>
>>

>
> The manual is a good place to start...
>
> http://dev.mysql.com/doc/refman/5.1/...ement-sql.html


Ah I have been looking at OReilly's MySQL Packet Reference which only covers
version 4.0 which does not show CREATE USER command.

Many thanks,

Aaron


Reply With Quote
  #4 (permalink)  
Old 02-01-2008
Aaron Gray
 
Posts: n/a
Default Re: Problem adminstering users and creating databases

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:v6-dnYmHiseKxj7anZ2dnUVZ_gydnZ2d@comcast.com...
> Aaron Gray wrote:
>> I have set the 'root' password for my mysql instillation using :-
>>
>> SET PASSWORD FOR root = PASSWORD( '###');
>>
>> Since doing this I can no longer create databases under a new user name
>> and password.
>>
>> I am confused as to how I go about creating and adminstering new users
>> and databases.
>>
>> If someone could set me straight on how to do this please.
>>
>> Many thanks in advance,
>>
>> Aaron
>>
>>
>>

>
> The manual is a good place to start...
>
> http://dev.mysql.com/doc/refman/5.1/...ement-sql.html


I am getting an error when logging on on a newly created user :-

ERROR 1045 (28000): Access denied for user 'test3'@'localhost' (using
password: YES)

Using :-

mysql -p -u test3

I am doing the following while logged on as 'root' to create the user :-

CREATE USER test3;
SET PASSWORD FOR test3 = PASSWORD('xyzzyx');

Help,

Aaron


Reply With Quote
  #5 (permalink)  
Old 02-01-2008
Jerry Stuckle
 
Posts: n/a
Default Re: Problem adminstering users and creating databases

Aaron Gray wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:v6-dnYmHiseKxj7anZ2dnUVZ_gydnZ2d@comcast.com...
>> Aaron Gray wrote:
>>> I have set the 'root' password for my mysql instillation using :-
>>>
>>> SET PASSWORD FOR root = PASSWORD( '###');
>>>
>>> Since doing this I can no longer create databases under a new user name
>>> and password.
>>>
>>> I am confused as to how I go about creating and adminstering new users
>>> and databases.
>>>
>>> If someone could set me straight on how to do this please.
>>>
>>> Many thanks in advance,
>>>
>>> Aaron
>>>
>>>
>>>

>> The manual is a good place to start...
>>
>> http://dev.mysql.com/doc/refman/5.1/...ement-sql.html

>
> I am getting an error when logging on on a newly created user :-
>
> ERROR 1045 (28000): Access denied for user 'test3'@'localhost' (using
> password: YES)
>
> Using :-
>
> mysql -p -u test3
>
> I am doing the following while logged on as 'root' to create the user :-
>
> CREATE USER test3;
> SET PASSWORD FOR test3 = PASSWORD('xyzzyx');
>
> Help,
>
> Aaron
>
>
>


See the notes on the CREATE USER page:

CREATE USER 'test3'@'localhost';

Do not use the PASSWORD function. MySQL encrypts it for you:

SET PASSWORD FOR 'test3'@'localhost' = 'xyzzyx';

Or, all in one statement:

CREATE USER 'test3'@'localhost' IDENTIFIED BY 'xyzzyx';


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

Reply With Quote
  #6 (permalink)  
Old 02-01-2008
Aaron Gray
 
Posts: n/a
Default Re: Problem adminstering users and creating databases

"Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
news:B96dnRVP9K1A-D7anZ2dnUVZ_orinZ2d@comcast.com...
> Aaron Gray wrote:
>> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
>> news:v6-dnYmHiseKxj7anZ2dnUVZ_gydnZ2d@comcast.com...
>>> Aaron Gray wrote:
>>>> I have set the 'root' password for my mysql instillation using :-
>>>>
>>>> SET PASSWORD FOR root = PASSWORD( '###');
>>>>
>>>> Since doing this I can no longer create databases under a new user name
>>>> and password.
>>>>
>>>> I am confused as to how I go about creating and adminstering new users
>>>> and databases.
>>>>
>>>> If someone could set me straight on how to do this please.
>>>>
>>>> Many thanks in advance,
>>>>
>>>> Aaron
>>>>
>>>>
>>>>
>>> The manual is a good place to start...
>>>
>>> http://dev.mysql.com/doc/refman/5.1/...ement-sql.html

>>
>> I am getting an error when logging on on a newly created user :-
>>
>> ERROR 1045 (28000): Access denied for user 'test3'@'localhost' (using
>> password: YES)
>>
>> Using :-
>>
>> mysql -p -u test3
>>
>> I am doing the following while logged on as 'root' to create the user :-
>>
>> CREATE USER test3;
>> SET PASSWORD FOR test3 = PASSWORD('xyzzyx');
>>
>> Help,
>>
>> Aaron
>>
>>
>>

>
> See the notes on the CREATE USER page:
>
> CREATE USER 'test3'@'localhost';
>
> Do not use the PASSWORD function. MySQL encrypts it for you:
>
> SET PASSWORD FOR 'test3'@'localhost' = 'xyzzyx';
>
> Or, all in one statement:
>
> CREATE USER 'test3'@'localhost' IDENTIFIED BY 'xyzzyx';


Great that did the trick, obviously I was creating a hashed password value.
Duh !

Thanks alot,

Aaron


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:43 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0