View Single Post

   
  #8 (permalink)  
Old 02-28-2008, 06:35 AM
Gerald L. Clark
 
Posts: n/a
Default Re: Access Denied When Trying to Create Database

untz wrote:
> Ananda,
>
> Thank you for responding!
>
> I just tried this and got the following:
>
> mysql> grant super *.* to 'untz'@'localhost' identified by 'password';
> ERROR 1064 (42000): You have an error in your SQL syntax; check the
> manual that corresponds to your MySQL server version for the right
> syntax to use near '*.* to untz@localhost identified by password' at
> line 1
>
> Can anyone please help me?
>
> I am not a DBA....
>
> Kindest regards,
>
> untz
>
> On Jun 11, 2007, at 4:36 AM, Ananda Kumar wrote:
>
>> Is this a user "untz" going to do even the "create procedure", if yes
>> then
>> you need to grant "super" previliege to this user.
>>
>> grant super on *.* to 'untz'@'localhost' identified by 'password';
>>
>> regards
>> anandkl
>>
>> On 6/11/07, untz <untz786@yahoo.com> wrote:
>>
>>>
>>> Baron & Prathima,
>>>
>>> Thank for the information!
>>>
>>> What happened is that I hadn't used MySQL for a long time and looked
>>> up on the Internet on how to change my root and individual users'
>>> passwords.
>>>
>>> The last command the URL had me type was "flush privileges;" and once
>>> I did that, I think it created a problem for everything else.
>>>
>>> Here's what I got when I ran SHOW GRANTS:
>>>
>>> mysql> show GRANTS;
>>> +--------------------------------------------------------------------
>>> ---
>>> --------------------------------------+
>>> | Grants for
>>> untz@localhost
>>> |
>>> +--------------------------------------------------------------------
>>> ---
>>> --------------------------------------+
>>> | GRANT USAGE ON *.* TO 'untz'@'localhost' IDENTIFIED BY PASSWORD
>>> '*55C1BF0D7E49AB5343925CDD17F2F5F923B5248C'
>>> | GRANT ALL PRIVILEGES ON `depot_development`.* TO 'untz'@'localhost'
>>> | GRANT ALL PRIVILEGES ON `depot_test`.* TO 'untz'@'localhost'
>>> | GRANT ALL PRIVILEGES ON `depot_production`.* TO 'untz'@'localhost'
>>> | GRANT ALL PRIVILEGES ON `music_development`.* TO 'untz'@'localhost'
>>> | GRANT ALL PRIVILEGES ON `music_test`.* TO 'untz'@'localhost'
>>> | GRANT ALL PRIVILEGES ON `music_production`.* TO 'untz'@'localhost'
>>> +--------------------------------------------------------------------
>>> ---
>>> --------------------------------------+
>>> 7 rows in set (0.00 sec)
>>>
>>> What am I supposed to do? I can not run queries or even create
>>> tables...
>>>
>>> I also tried using a MySQL client (CocoaMySQL) and it displayed the
>>> same error as in the previous e-mail (see below).
>>>
>>> Am really stuck on this so any help, suggestions, etc. would be
>>> greatly appreciated!
>>>
>>> Sincerely yours,
>>>
>>> untz
>>>
>>> On Jun 10, 2007, at 5:44 AM, Baron Schwartz wrote:
>>>
>>> > Hi untz,
>>> >
>>> > untz wrote:
>>> >> Hello there,
>>> >> I am using MySQL 5 on OS X Tiger...
>>> >> After starting the server, I tried to create a sample database and
>>> >> this is what what happened:
>>> >> $ mysql -u untz -p
>>> >> Enter password:
>>> >> Welcome to the MySQL monitor. Commands end with ; or \g.
>>> >> Your MySQL connection id is 4 to server version: 5.0.16-standard
>>> >> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
>>> >> mysql> create database people_development;
>>> >> ERROR 1044 (42000): Access denied for user 'untz'@'localhost' to
>>> >> database 'people_development'
>>> >> mysql>
>>> >
>>> > Try running SHOW GRANTS while logged in, and see what privileges
>>> > you have. You probably need to grant your user some additional
>>> > privileges.
>>> >
>>> > Cheers
>>> > Baron
>>> >
>>> > --
>>> > MySQL General Mailing List
>>> > For list archives: http://lists.mysql.com/mysql
>>> > To unsubscribe: http://lists.mysql.com/mysql?
>>> > unsub=untz786@yahoo.com
>>> >
>>>
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe: http://lists.mysql.com/mysql? unsub=anandkl@gmail.com
>>>
>>>

>
>

The show grants you ran shows you the proper syntax.

--
Gerald L. Clark
Supplier Systems Corporation
Reply With Quote