List:General Discussion« Previous MessageNext Message »
From:Mogens Melander Date:May 8 2007 1:42pm
Subject:Re: how to create new username n password in mysql
View as plain text  
On Tue, May 8, 2007 14:58, sunisundar wrote:
>
> no getting an error now like " check the manual that corresponds to your
> mysql version....."
> mine is mysql 5 version

And what does that error say?

Try quoteing poul@localhost ala. 'poul'@'localhost'

From the manual:

To create the accounts with GRANT, use the following statements:

shell> mysql --user=root mysql
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON bankaccount.*
    ->     TO 'custom'@'localhost'
    ->     IDENTIFIED BY 'obscure';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON expenses.*
    ->     TO 'custom'@'whitehouse.gov'
    ->     IDENTIFIED BY 'obscure';
mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->     ON customer.*
    ->     TO 'custom'@'server.domain'
    ->     IDENTIFIED BY 'obscure';

The three accounts can be used as follows:

The first account can access the bankaccount database, but only from the
local host.

The second account can access the expenses database, but only from the
host whitehouse.gov.

The third account can access the customer database, but only from the host
server.domain.


> Mogens Melander wrote:
>>
>> GRANT CREATE,INSERT,DELETE,UPDATE,SELECT PRIVILEGES ON pauldb.*
>> TO poul@localhost IDENTIFIED BY 'mysecretpassword';
>>
>> On Tue, May 8, 2007 13:57, sunisundar wrote:
>>>
>>> how to create new username n password in mysql using commands.
>>>
>>> followed these steps::
>>> mysql> create database pauldb;
>>> Query OK, 1 row affected (0.00 sec)
>>>
>>> #
>>> # Now we create the user paul and give him full
>>> # permissions on the new database
>>> mysql> grant CREATE,INSERT,DELETE,UPDATE,SELECT on pauldb.* to
>>> paul@localhost;
>>> Query OK, 0 rows affected (0.00 sec)
>>>
>>> #
>>> # Next we set a password for this new user
>>> #
>>> mysql> set password for paul = password('mysecretpassword');
>>> Query OK, 0 rows affected (0.00 sec)
>>>
>>> #
>>> # Cleanup and ext
>>> mysql> flush privileges;
>>> mysql> exit;
>>>
>>>
>>>
>>> when next time i login using this pwd not working.....
>>> Give me proper commands.
>>> --
>>> View this message in context:
>>>
> http://www.nabble.com/how-to-create-new-username-n-password-in-mysql-tf3709178.html#a10374454
>>> Sent from the MySQL - General mailing list archive at Nabble.com.
>>>
>>>
>>> --
>>> MySQL General Mailing List
>>> For list archives: http://lists.mysql.com/mysql
>>> To unsubscribe:
>>> http://lists.mysql.com/mysql?unsub=1
>>>
>>>
>>> --
>>> This message has been scanned for viruses and
>>> dangerous content by OpenProtect(http://www.openprotect.com), and is
>>> believed to be clean.
>>>
>>
>>
>> --
>> Later
>>
>> Mogens Melander
>> +45 40 85 71 38
>> +66 870 133 224
>>
>>
>>
>> --
>> This message has been scanned for viruses and
>> dangerous content by OpenProtect(http://www.openprotect.com), and is
>> believed to be clean.
>>
>>
>> --
>> MySQL General Mailing List
>> For list archives: http://lists.mysql.com/mysql
>> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>>
>>
>>
>
> --
> View this message in context:
>
> http://www.nabble.com/how-to-create-new-username-n-password-in-mysql-tf3709178.html#a10375368
> Sent from the MySQL - General mailing list archive at Nabble.com.
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>
> --
> This message has been scanned for viruses and
> dangerous content by OpenProtect(http://www.openprotect.com), and is
> believed to be clean.
>


-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.

Thread
how to create new username n password in mysqlsunisundar8 May
  • Re: how to create new username n password in mysqlMogens Melander8 May
    • Re: how to create new username n password in mysqlsunisundar8 May
      • Re: how to create new username n password in mysqlMogens Melander8 May